cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1329
Views
20
Helpful
4
Replies

EEM scripting help

Tazio4436
Level 1
Level 1

Hi,

I am not sure if EEM is the solution .Please let me know what would best suit my requirements.

I have about 30 Cisco Switch in my network. Some Sw are 24 port and some are 48 ports.

All the ports have been patched to a patch panel with a patch cord. But all the ports are not in use only 50 % of the ports are up up and the remaining are down down as there is no device connected. But if I plug a device it goes up up. This was done for future growth as there will be no need to run cable anymore.

But now the problem is that workers are bring their own device from home and they see a free port anywhere in the building they just plug their device and start using .

I did proposed to do a manual shut on all ports that are not in use for now but management did dot agree.

I want to know if I can use EEM to monitor the ports when they go down and ports that are down when they go up through email. I have put a description on  all the ports that are not supposed to be in production as " NOT ACTIVE" and if I see a port that is not active as up up this means that someone plugged a device in that port.

 

Any suggestion or better solution will be much appreciated.

Thanks

Tazio

4 Replies 4

balaji.bandi
Hall of Fame
Hall of Fame

EEM Script also does, but you do not achieve information, if i were you i  would suggest having SNMP trap for interface status Log or Syslog server config.

 

Under interface add below command :  (you get many syslog servers in google for free)

 

Configure syslog server 

no logging console

logging trap notifications

logging x.x.x.x ( where Syslog IP address)

 

interface gix/x

Logging event link-status

 

1. Make sure you automate and make all the port descriptions as expected - so you get right alert

2. you want NOT Active port go up and down you like to know (other than Live one)

3. you can use different descriptions.

 

if you like to go EEM Script route , then you need to create EEM in all devices :

 

https://www.cisco.com/c/en/us/support/docs/ios-nx-os-software/ios-xe-16/216091-best-practices-and-useful-scripts-for-ee.html

BB

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

How to Ask The Cisco Community for Help

Thank you a lot for your reply and others also.

I have tried doing the syslog one and it works but not quite well as I am expecting as the description does not come with the log messages. I have put a description as NOT ACTIVE under one interface to do the test and I can see the log messages in the syslog server but not with the description.

Please see attached file.

Maybe there is a way to get the description in the log messages which I don't know how to do.

Please see attached file.

I will also try the eem later and will see which one suits my situation better.

 

 

 

i do not belive that can be done,

 

But  you know the easy device have port description, i save that information, on the syslog server and co-related with device logs with port-description.

 

examlple :

 

you have data

Switch1 - Gig 1 description my server

 

as soon as you see Switch G1 down, you will co-related with Log message generated or email to you Switch1-G1-Server down

 

BB

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

How to Ask The Cisco Community for Help

Leo Laohoo
Hall of Fame
Hall of Fame

@Tazio4436 wrote:

I want to know if I can use EEM to monitor the ports when they go down and ports that are down when they go up through email.


EEM can do this but the question is about practicality.   

EEM cannot differentiate if the port went down/up due to someone plugged in to the port or whether or not someone has logged out/in from the computer.  

Finally, the recipient of the email will get flooded with emails.  It will not last long before you'll be ask to turn this "madness" off.  

If the objective is to get a port utilization count, like find out what port(s) have not been used for X amount of days, then I will recommend getting a 3rd party tool like AKiPS.

Review Cisco Networking for a $25 gift card