cancel
Showing results for 
Search instead for 
Did you mean: 

Script to monitor IP's

 
SOLVED
Go to solution
gsingh
Advisor

Script to monitor IP's

I am looking for script which will keep pinging to the list if IP's and if any IP does not respond it should trigger an E-mail.
Is there any script????
7 REPLIES
Torsten.
Acclaimed Contributor

Re: Script to monitor IP's

Search the HP web for "unreachable device notification" - part of HP SIM.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Torsten.
Acclaimed Contributor

Re: Script to monitor IP's

see also

http://docs.hp.com/en/5992-6213/ch07s01.html#d0e5593

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Hakki Aydin Ucar
Honored Contributor
Solution

Re: Script to monitor IP's

Roland Piette
Regular Advisor

Re: Script to monitor IP's

Hello,

You can have a lot of solution and need some scripting. I hope you can use command as awk, cat, .... but in any way you have to adapt this example to match your needs.
An simple example with use a file wich contains ip adresses (/etc/hosts will be a good idea but need more scripting command to extract good values) :

while read i
do
ping $i -n 1 -m 1 > /dev/null
if [ $? -ne 0 ]
then
echo $i
fi
done < list_ip | mailx -s "Ip timeout" email_addr

Where list_ip is a filename wich contains ip or hostname values and email_addr is the recipient address of the destination.

I tested under HP-UX 11.31

Regards,
Roland
Mel Burslan
Honored Contributor

Re: Script to monitor IP's

Roland's script snippet will do the magic for you but if you do this on a wide spectrum of IP addresses or do it too frequently, your network administrators are going to *LOVE* you for flooding the network with ICMP traffic.

If you are trying to come up with uptime charts, you might want to look into using SNMP monitoring, provided by HP OpenView (NNM product comes to mind straight away) and many other monitoring platforms.
________________________________
UNIX because I majored in cryptology...
gsingh
Advisor

Re: Script to monitor IP's

Thanks guys for your suggestion. I used script given by Hakki Aydin and it is exactly what I was looking for.

Thanks again!!
gsingh
Advisor

Re: Script to monitor IP's

Closing Thread.