Network Connections, Stats and Bandwidth

check_ping_ip_list_from_file.sh

Description:

Read a fil with a list of ips. One ip per line, for example
For each ip, it will ping a specified number of times.
User will pass as parameters, miliseconds and percent of packet loss thresholds. Both for warning and for critical.

So the script will return OK if ping is OK and no threshold is exceeded.
Warning if all pings exceeding thresholds are between warning boundaries.
And of some is beyond critical warning, the script will return CRITICAL

Current Version

1.0

Last Release Date

2017-09-22

Compatible With

  • Nagios 1.x
  • Nagios 2.x
  • Nagios 3.x
  • Nagios 4.x

Project Files
Project Notes
Read a fil with a list of ips. One ip per line, for example $ cat ips.list 10.1.1.1 10.100.1.45 10.11.11.11 For each ip, it will ping a specified number of times. User will pass as parameters, miliseconds and percent of packet loss thresholds. Both for warning and for critical. So the script will return OK if ping is OK and no threshold is exceeded. Warning if all pings exceeding thresholds are between warning boundaries. And of some is beyond critical warning, the script will return CRITICAL ---------------------------------------------------------- SCRIPT USAGE EXAMPLE: ./check_ping_ip_list_file.sh -p 2 -w 600,3% -c 1000,6% -f /var/log/nagios/ips.list f_usage(){ echo "Usage: `basename $0` -f path_to_file -w X,X% -c X,X% [-p X]" echo " -f = Full path al archivo, con una lista de ip contra las que se quiere chequear conectividad." echo " -w = "warning_ms, warning_percentage% , por ejemplo : 10,2%"" echo " -c = "critical_ms, critical_percentage% , por ejemplo : 20,5%"" echo " -p = Optional : cantidad de pings a realizar. Default 5." echo " -h = Optional help mode." } ------------------------------------------------- USE : I copy the script into "/usr/local/nagios/libexec" , and thats all...
Reviews (0) Add a Review
Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
0 (0)
Favorites
0
Views
5,370