cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2198
Views
5
Helpful
6
Replies

syslog messages via snmp-

getwithrob
Level 3
Level 3

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?

1 Accepted Solution

Accepted Solutions

6 Replies 6

nhabib
Level 9
Level 9

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.

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.....

That is correct.

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.....

Embedded Event Manager -

MarcoVienna
Level 1
Level 1

Hi!

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.

Cheers,

Marco

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: