cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2308
Views
0
Helpful
3
Replies

Notification of alarms via email (EEM) of chassis temperature

ErickArteaga234
Level 1
Level 1

hi all

I have a question regarding the EEM feature, I have a catalyst 4500 switch with the version (cat4500e-universalk9.SPA.03.11.02.E.152-7.E2.bin ").

I have looked for documentation regarding the sending of temperature alarms and that these are sent via email, I have carried out a test through an interface and this is satisfactory.

 

when entering the command "show environment temperature "

throws me the following:

 

Module Sensor                                       Temperature Status
------+--------------------------+--------------------+------------
1         Air inlet                                       34C (56C,68C,71C) ok
1        Air inlet remote                             23C (46C,59C,62C) ok
1        Air outlet                                       36C (66C,76C,79C) ok
1       Air outlet remote                            29C (60C,71C,74C) ok
2        air inlet                                         26C (43C,58C,61C) ok
2      air outlet (front)                              27C (51C,66C,69C) ok
2       air outlet (back)                             28C (43C,58C,61C) ok
3      Stub A                                           34C (58C,71C,74C) ok
3      Stub B                                            27C (54C,68C,71C) ok
3      XPP                                                46C (67C,81C,84C) ok
3      VFE                                                57C (79C,90C,93C) ok
3      NFE                                                46C (68C,80C,83C) ok
3      CPU                                               46C (69C,83C,86C) ok
3       FPGA                                             32C (57C,71C,74C) ok
4       Stub A                                            31C (58C,71C,74C) ok
4       Stub B                                            26C (54C,68C,71C) ok
4       XPP                                                45C (67C,81C,84C) ok
4       VFE                                                 52C (79C,90C,93C) ok
4      NFE                                                  42C (68C,80C,83C) ok
4      CPU                                                  43C (69C,83C,86C) ok
4       FPGA                                              31C (57C,71C,74C) ok
5       Air inlet                                            34C (56C,68C,71C) ok
5       Air inlet remote                                  25C (46C,59C,62C) ok
5       Air outlet                                           35C (66C,76C,79C) ok
5       Air outlet remote                                29C (60C,71C,74C) ok
6       Air inlet                                              34C (56C,68C,71C) ok
6       Air inlet remote                                   25C (46C,59C,62C) ok
6       Air outlet                                           36C (66C,76C,79C) ok
6       Air outlet remote                                31C (60C,71C,74C) ok
7       Air inlet                                              38C (56C,68C,71C) ok
7       Air inlet remote 27C (46C,59C,62C) ok
7       Air outlet 39C (66C,76C,79C) ok
7        Air outlet remote 33C (60C,71C,74C) ok

 

My question is, can temperature alarms be generated and these can be sent via mail, I can generate by means of EEM, the sending of the first temperature threshold of each module and sensor?

 

note: I share my script, based on one where cpu notifications were sent

 

event manager environment _email_to (xxxxxx)
event manager environment _email_server (xxxxxx)
event manager environment _dns_server (xxxxxxx)
event manager environment _email_from (xxxxxxx)
event manager environment _email_from_cc (xxxxxxx)

event manager applet environment
event syslog pattern "%ENVMON-:"
trigger
action 1.0 syslog priority notifications msg "envi error - mailC1 sent"
action 1.5 mail server "104.x.x.x" to "_email_to" from "_email_from" cc "_email_from_cc" subject "Environment" body "$_syslog_msg"
action 2.0 info type syslog history
action 2.5 syslog msg "$_syslog_msg"
action 3.0 cli command "show environment temperature"
action 4.0 set lines "0"
action 5.0 foreach line "$_cli_result" "\n"
action 6.0 if $lines gt "30"
action 7.0 break
action 8.0 append output "$line"
action 9.0 increment lines

 

 

regards!

 

 

1 Accepted Solution

Accepted Solutions

Ok no issue, the way you configured CPU, you get an alert in event when the chassis temp go higher  ( you can also do with SNMP if you have any NMS in house)

 

 

based in the Logs you can generate email. (same way you do in EEM)  - for now all OK you wont be able to test (not you can simulate in production)

 

just for reference how the alerts generated when the chassis get higher temp.

 

https://content.cisco.com/chapter.sjs?uri=/searchable/chapter/www.cisco.com/content/en/us/td/docs/switches/lan/catalyst4500/XE3-10-0E/configuration/guide/xe-310-cg/pwr_envr.html.xml

 

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

View solution in original post

3 Replies 3

balaji.bandi
Hall of Fame
Hall of Fame

For now you doing based on the syslog alert trigger sending email, this is working, just to clarity of requirement, you looking ""show environment temperature " command send email using EEM Script ? is this correct ?

 

action 1.0 cli command "show environment temperature | redirect flash:environ.txt"
action 2.0 cli command "more flash:environ.txt"
action 3.0 mail server "x.x.x.x" to "myname@bb.com" from "eemcisco@bb.com" subject "Environment report" body "$_cli_result"
action 4.0 cli command "del /force flash:environ.txt"

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Hi ....Tanks for helping me !!

Not entirely, I was wrong to explain it, sorry. When entering the “show environment temperarure” command... and validating the temperature of the box, he observed that there is a temperature alarm threshold for each module and sensor... so I'm trying to automate an email (alert)... when a certain module or sensor .. exceeds that threshold.

Regards!!

Ok no issue, the way you configured CPU, you get an alert in event when the chassis temp go higher  ( you can also do with SNMP if you have any NMS in house)

 

 

based in the Logs you can generate email. (same way you do in EEM)  - for now all OK you wont be able to test (not you can simulate in production)

 

just for reference how the alerts generated when the chassis get higher temp.

 

https://content.cisco.com/chapter.sjs?uri=/searchable/chapter/www.cisco.com/content/en/us/td/docs/switches/lan/catalyst4500/XE3-10-0E/configuration/guide/xe-310-cg/pwr_envr.html.xml

 

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Review Cisco Networking for a $25 gift card