# Ping and email alert if no response



## DanNolan (May 5, 2011)

I run a network with around 30 PCs, 15 IP cameras, and a few other devices connected. I would like to have something ping some of the more important devices, and mail me if they are not responsive after 4 or so attempts. For example.

I have a time clock at 192.168.194.40. I am responsible for keeping it online and working, and while it continues to function when not connected to the network, a network connection is required to retrieve attendance records. The only way to know there is an issue is to ping it and get a non-result. I would like a windows app or linux script that pings a list of network devices once every 15 minutes, and if unresponsive for an hour, or less than 90% responsive in 24 hrs, generate an email alert to myself so I know there is an issue and can investigate/correct.

Is there anything currently existing that can perform this function, or can anyone with more experience than myself point me in the right direction to generate a Linux bash script. It is safe to assume I am a linux idiot, I can putty to a Linux server on our network that runs trixbox, but aside from setting it up, do not really use it. Script would ping around 50 devices, once every 15 minutes per device.

Yes, I have full permission to run a pinging alert script, I am the current IT Manager and this would save me at least an hour daily, as currently I have to make a tour of all equipment daily to ensure its all still functional.

Thanks in advance for the assistance!


----------



## DanNolan (May 5, 2011)

For further info, the network is split across 3 locations, with a sonic-wall gateway router at each location forming a VPN connection. The 3 locations are spread out several miles.

Location 1 - Retail Outlet.
192.168.192.* with 5 PCs, 2 VOIP phones, 2 Ethernet enabled printers, and 4 network IP cameras. 1 Switch

Location 2 - Central Office.
192.168.193.* 10 PCs, 10 VOIP phones, 5 Ethernet printers, and 1 server running trixbox and a discontinued Samba service. 1 Switch. Retail location NVR is stored here too.

Location 3 - Warehouse.
192.168.194.* 10 PCs, 10 VOIP Phones, 2 Ethernet Printers, 11 Network IP Cameras, Ethernet connected Time clock, 2 NVRs, 4 Switches.

Network is all Cat5e, 100mbps, peer to peer, no central server as of yet, as size does not yet really require it.

All 3 networks are pingable from the 192.168.193.* network.


----------



## Squashman (Apr 4, 2003)

Thinking we did something similar to this in a batch file a few years ago but I can't find the thread. You would need another program that can email from the command line to do it which there are a few out there.

This is a Windows program that does close to what you want but I think it emails the report regardless of success or failure.
http://www.snapfiles.com/get/mhostalive.html

This one looks like it will do what you need.
http://www.snapfiles.com/get/axnettools.html


----------



## DanNolan (May 5, 2011)

That axnettools is perfect, got it installed right now. Is already monitoring and has enough config to calculate daily loss % and alert when unresponsive for 30minutes.


----------



## DanNolan (May 5, 2011)

Here is a link to a screenshot of it running, during initial setup. http://img7.imageshack.us/img7/8661/desktopcz.jpg Looking good so far, will add the rest of the network important stuff tomorrow morning after this has run through a 24hr test.


----------

