JonJohnstonWHen the agent goes offline for x(5?) minutes, run a script. The script pauses for x minutes and then checks to see if the agent is back online. If so send email it is online, else trigger an alert that the server is down. We have something like this setup on half of our servers right now. This way we get alerted when server goes down during the day almost immediately, but it must be down for over 30 minutes before we get alerted at night.
Script Name: Connection Check Script Description: Pings to Google to check connection. IF True THEN Pause Script Parameter 1 : 1800 OS Type : 0 Execute Shell Command Parameter 1 : ping client_IP >>C:\utility\offline\#id#ping.txt Parameter 2 : 0 OS Type : 0 Execute Script Parameter 1 : Test Agent Online (NOTE: Script reference is NOT imported. Correct manually in script editor. Parameter 2 : Parameter 3 : 0 OS Type : 0 ELSE
Script Name: Test Agent Online Script Description: Test if machine is online, if so sends email saying is online or else triggers alert. IF Check Variable Parameter 1 : #qt# >= :#at# THEN Send Email Parameter 1 : support@domain.com Parameter 2 : #id# is online Parameter 3 : #id# is online at #qt#. OS Type : 0 ELSE Execute Script Parameter 1 : Alert to Email/Pager (NOTE: Script reference is NOT imported. Correct manually in script editor. Parameter 2 : Parameter 3 : 0 OS Type : 0
Script Name: Alert to Email/Pager Script Description: IF Test File Parameter 1 : C:\utility\offline\#id#ping.txt Contains :bytes= THEN Send Email Parameter 1 : support@domain.com, pageralert@wireless.net Parameter 2 : Server offline #id# Parameter 3 : The client gateway is pinging but #id# is offline. This needs checked immediately. The last check in was at #qt#. OS Type : 0 ELSE Send Email Parameter 1 : support@get-covered.com Parameter 2 : #id# offline and no ping Parameter 3 : #id# is offline, and the gateway is unreachable. This is probably an internet down situation or a power outage but still needs checked into. The last check in was at #qt#. OS Type : 0
garryThanks for the post... One question though. How do you specify the client_IP to ping in script 1. Do you have a separate script for each site. Do you use some sort of variable to calculate the gateway IP and (if so) would you mind sharing how you lookup the gateway IP.
rbjseaJohn, thanks again for the scripts. One question, and please forgive my ignorance. How do the variables #id# #qt# and #at# work? I would think the #id# would be the machine the script is running on. when i implemented it here, the e-mails wouldn't actually go out if I used the script with the variables in it. Once I took them out it was OK.