This post is more than 5 years old
6 Posts
0
2099
Email Notification when router gets down
Hi Team,
Basically I am looking some script which will trigger an email once any of the router goes down for 5 times within 60 minutes.
In this i think we need to set a counter which will increment by 1 whenever it finds router down notification.
Problem is in case of many router down events , how can set set n number of counters for n number of router down events.
Thanks ,
Raghav
PaulORourke
170 Posts
0
December 3rd, 2012 01:00
Hi David,
Yes, you are correct.
Also, Raghv mentioned 5 times within 60 minutes, my hook script was looking for notifications where the difference between first notify and last notify was greater than 60 mins.
Therefore I have altered the script, so that for notifications with a count value equal to 5 and time difference of less that 60 mins between first notify and last notify, the hook script will place the string "Alert" into the User Defined Field 1.
Please find attached.
Kind Regards,
Paul O'Rourke
1 Attachment
dxa-sample-hook.asl
PaulORourke
170 Posts
0
November 29th, 2012 01:00
Hi Raghav,
Instead of using a script, perhaps you could use the trap adapter in Smarts IP and the RestartTrapThreshold?
A System Unstable notification will be generated for a device if the number of coldStart traps received from a device exceeds the threshold in one hour:
1.) Configure the routers to send SNMP traps to the Smarts IP trap adapter.
2.) Configure the RestartTrapThreshold and RestartTrapWindow settings in Smarts IP -> Polling & Thresholds -> Thresholds tab -> System Resource Groups -> Routers -> Settings -> Connectivity.
3.) Set the RestartTrapThreshold to 5.
4.) Set the RestartTrapWindow to 3600 seconds (1 hour).
The router will send a coldStart SNMP trap to the Smarts IP Trap adapter each time it starts up.
If the number of coldStart traps received from one particular device in one hour exceeds 5 the Unstable Event is generated.
As regards generating an email, you could simply using the Mail Notify Adapter in Smarts IP to notify you when the Device Unstable notification is generated.
Please see the Smarts IP documentation for more information, specifically the IP deployment Guide.
Kind Regards,
Paul O'Rourke
vigneshkadirvel
13 Posts
0
November 29th, 2012 01:00
Paul,
thanks for your knowledge sharing, it's easy to understand.
raghavengi
6 Posts
0
November 29th, 2012 04:00
Hello Paul,
In our environment we do not have TA. If I configure TA then I need to ask device configuration team to enable SNMP on each device beacuse at present the configuration doesnot support it and this will be a huge job.
Normally we create an escalation policy with class=router ,event=down and we can add count as 5.
Now if we want to compare with time, I think Last notify compared with First notify which should be equal to 60 mins. I am not sure if this will work or not.
Any suggestions would be highly appreciated !!!
Regards,
Raghav
PaulORourke
170 Posts
1
November 30th, 2012 02:00
Hi Raghav,
Similar to what you have mentioned below, you could achieve this using a hook script.
Please find hook script attached.
I have tested this in my test SAM domain.
Basically, the hook script checks the time difference between the First Notify and Last Notify values.
If the values are greater than one hour (3600 seconds) and if the Count value is greater that 4, the hook script will place the string "Alert" into the User Defined Field 1.
You can then setup an escalation policy to email you if any Router Down notifications have the string "Alert" in the User Defined Field 1.
Please find hook script attached.
Kind Regards,
Paul O'Rourke
1 Attachment
dxa-sample-hook.asl
Anonymous
5 Practitioner
5 Practitioner
•
274.2K Posts
1
November 30th, 2012 08:00
Hello Paul,
what if event happened again on count 5.... it will again send out an email and keep sending out emails for every count after 4, unless this is what Raghv is looking for.
Regards,
David Zhou
raghavengi
6 Posts
0
December 4th, 2012 20:00
Thanks Paul you are a gem of a person..... Thanks for your support ....