cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

293
Views
5
Helpful
1
Replies
Highlighted
Beginner

EEM on Nexus 5K - only one "event syslog occurs 1" taken and 2nd "event syslog occurs 1" statement does not show

 

I'd like to use this config for EEM in the Nexus 5K. The Nexus only takes the first event syslog occurs statement so I don't understand why it's losing the 2nd statement. See below for sh run eem. Nexus 5548 version 7.0(7)N1(1).  Am I violating a syntax rule?

 

no event manager applet EM-CHECK-FEX
event manager applet EM-CHECK-FEX
description "Checks FEX for availability because no trap would be sent"
event syslog occurs 1 pattern "FEX-2-NOHMS_ENV_FEX_OFFLINE"
action 1.0 snmp-trap strdata "$_syslog_msg"
event syslog occurs 1 pattern "FEX-2-NOHMS_ENV_FEX_ONLINE"
action 2.0 snmp-trap strdata "$_syslog_msg"

 

 

Nexus5K(config-applet)# do sh run eem

!Command: show running-config eem
!Time: Tue Mar 31 16:59:18 2020

version 7.0(7)N1(1)
event manager applet EM-CHECK-FEX
description "Checks FEX for availability because no trap would be sent"
event syslog occurs 1 pattern "FEX-2-NOHMS_ENV_FEX_ONLINE"
action 1.0 snmp-trap strdata "$_syslog_msg"
action 2.0 snmp-trap strdata "$_syslog_msg"

Everyone's tags (3)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Beginner

Re: EEM on Nexus 5K - only one "event syslog occurs 1" taken and 2nd "event syslog occurs 1" statement does not show

Pattyj,

In your configuration:

no event manager applet EM-CHECK-FEX
event manager applet EM-CHECK-FEX
description "Checks FEX for availability because no trap would be sent"
event syslog occurs 1 pattern "FEX-2-NOHMS_ENV_FEX_OFFLINE"
action 1.0 snmp-trap strdata "$_syslog_msg"
event syslog occurs 1 pattern "FEX-2-NOHMS_ENV_FEX_ONLINE"
action 2.0 snmp-trap strdata "$_syslog_msg"

The event manager applet will overwrite the first statement as there can be only one event statement per applet.

See the Embedded Event Manager Configuration Guide - here.

In order to perform this you would have to do the following:

no event manager applet EM-CHECK-FEX
event manager applet EM-CHECK-FEX-OFFLINE
description "Checks FEX for availability because no trap would be sent"
event syslog occurs 1 pattern "FEX-2-NOHMS_ENV_FEX_OFFLINE"
action 1.0 snmp-trap strdata "$_syslog_msg"
exit
event manager applet EM-CHECK-FEX-ONLINE
description "Checks FEX for availability because no trap would be sent"
event syslog occurs 1 pattern "FEX-2-NOHMS_ENV_FEX_ONLINE"
action 1.0 snmp-trap strdata "$_syslog_msg"
exit

However, keep in mind that the event syslog pattern can match on any part of the pattern. So for example if you wanted it to match any state such as offline or online you could simply match the pattern on everything except for offline or online.

For example:

event syslog occurs 1 pattern "FEX-2-NOHMS_ENV_FEX"

Another thing to keep in mind is that in order to send traps using the event manager you must also configure the following command:

snmp-server enable traps event-manager

Hope this helps!


View solution in original post

1 REPLY 1
Highlighted
Beginner

Re: EEM on Nexus 5K - only one "event syslog occurs 1" taken and 2nd "event syslog occurs 1" statement does not show

Pattyj,

In your configuration:

no event manager applet EM-CHECK-FEX
event manager applet EM-CHECK-FEX
description "Checks FEX for availability because no trap would be sent"
event syslog occurs 1 pattern "FEX-2-NOHMS_ENV_FEX_OFFLINE"
action 1.0 snmp-trap strdata "$_syslog_msg"
event syslog occurs 1 pattern "FEX-2-NOHMS_ENV_FEX_ONLINE"
action 2.0 snmp-trap strdata "$_syslog_msg"

The event manager applet will overwrite the first statement as there can be only one event statement per applet.

See the Embedded Event Manager Configuration Guide - here.

In order to perform this you would have to do the following:

no event manager applet EM-CHECK-FEX
event manager applet EM-CHECK-FEX-OFFLINE
description "Checks FEX for availability because no trap would be sent"
event syslog occurs 1 pattern "FEX-2-NOHMS_ENV_FEX_OFFLINE"
action 1.0 snmp-trap strdata "$_syslog_msg"
exit
event manager applet EM-CHECK-FEX-ONLINE
description "Checks FEX for availability because no trap would be sent"
event syslog occurs 1 pattern "FEX-2-NOHMS_ENV_FEX_ONLINE"
action 1.0 snmp-trap strdata "$_syslog_msg"
exit

However, keep in mind that the event syslog pattern can match on any part of the pattern. So for example if you wanted it to match any state such as offline or online you could simply match the pattern on everything except for offline or online.

For example:

event syslog occurs 1 pattern "FEX-2-NOHMS_ENV_FEX"

Another thing to keep in mind is that in order to send traps using the event manager you must also configure the following command:

snmp-server enable traps event-manager

Hope this helps!


View solution in original post

CreatePlease to create content
Content for Community-Ad