Description

The syslog message severity level does not always correspond with the importance of the message to a customer. This article provides a workaround for changing the severity of a syslog message dynamically.

Solution

Some issues manifest themselves with a syslog message with low severity (for example, Debug). In a typical configuration, such log messages appear only in the debug file on the router and are not sent to an external syslog server. These log messages are difficult to monitor among many routers. A possible workaround is to apply the following event-policy:

policy raiseLogSeverity {
    events system;
    attributes-match {
        system.message matches “ <some sentence from the syslog message> ”;
    }
    then {
        priority-override {
            severity <new severity level> ;
        }
    }
}

 

For example, the following message has, by default, the severity Debug:

May 4 11:57:10 router1 jdhcpd: %USER-7: NACK received for profile request with id=0xaaaaa from bbe-smgd daemon: Subscriber prefix cannot be added retry FALSE


By using the following policy, the severity of the log is raised to Warning:

policy nackLog {
    events system;
    attributes-match {
        system.message matches “Subscriber prefix cannot be added retry FALSE”;   
    }
    then {
        priority-override {
             severity warning;
     }
   }
}

Modification History

2025-10-14 : Removed the MX from the title since the KB applies to all Junos/EVO devices.