Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

syslog messages via snmp-

I'm still trying to understand this command:

snmp-server enable traps syslog

I think this will send log messages via snmp to the snmp host configured in the snmp-server host statement.

Is there a way to pick and chose which messages or message severity levels you want sent to the snmp-server host?


Accepted Solutions

Re: syslog messages via snmp-

That is correct.


Re: syslog messages via snmp-

You are correct, the syslog messages will be converted into snmp traps (as defined in the CISCO-SYSLOG-MIB) and sent to the ip address listed in snmp-server host

The severity is controlled by the logging trap command.

New Member

Re: syslog messages via snmp-

Let me make sure I have this part correct. The only control of what syslog messages can be sent to the snmp-server host is by syslog severity levels?

I can't send some messages from a severity level 3 and not others? It's an all or none situation I'm guessing.....


Re: syslog messages via snmp-

That is correct.

New Member

Re: syslog messages via snmp-

I guess this is what the guy was talking about on how only specific syslog messages could be selected and sent....

event syslog pattern regular-expression [occurs num-occurrences] [period period-value] [priority priority-level] [severity-level]

I'm sure there are a number of requirements before this can happen and the code must be at a certain level.....

New Member

Re: syslog messages via snmp-

Embedded Event Manager -

New Member

Re: syslog messages via snmp-


I think what you are asking is:

When the device sends a syslog message also as SNMP trap (snmp-server host ... syslog) how can I specify what syslog message is send as trap.

the config command on the device would be:

device(config)#logging history ?

<0-7> Logging severity level

alerts Immediate action needed (severity=1)

critical Critical conditions (severity=2)

debugging Debugging messages (severity=7)

emergencies System is unusable (severity=0)

errors Error conditions (severity=3)

informational Informational messages (severity=6)

notifications Normal but significant conditions (severity=5)

warnings Warning conditions (severity=4)

So if you want to receive syslog traps only for syslog error messages then configure:

device(config)#logging history 3

I hope this is what you were looking for.