Build precise queries to find exactly what you need
Press ESC to close
Nagios World Conference 2026: Sept. 14-17 in St. Paul, MN | Learn More
Your review has been submitted and is pending approval.
This script will check the ping time off what you want.
Current Version
1
Last Release Date
2014-05-28
Owner
CRDP
License
GPL
Compatible With
Hello,
check_time_ping
#!/bin/bash
HOST2=$1 TimePingWarning=$2 TimePingCritical=$3
if [ $# -lt 3 ] then echo "utilisation : ./check_time_ping @IpHost TimePingWarning TimePingCritical" exit 3 fi
TIME=$(ping -c 1 $HOST2 | tail -1| awk '{print $4}' | cut -d '/' -f 2) TIME1=${TIME%.*}
if [ $TIME1 -ge $TimePingCritical ] then echo "TimePing Critical = $TIME1|Time = $TIME1;${TimePingWarning};${TimePingCritical}" exit 2
elif [ $TIME1 -lt ${TimePingWarning} ] then echo "TimePing Ok = $TIME1|Time = $TIME1;${TimePingWarning};${TimePingCritical}" exit 0
else echo "TimePing warning = $TIME1|Time = $TIME1;${TimePingWarning};${TimePingCritical}" exit 1 fi
---------------------------------------------------------
In service :
define service { hostname ( what you want ) service_description Current Users check_command check_time_ping!25!35 use generic-service notification_interval 0 }
In command :
#Check time ping define command{ command_name check_time_ping command_line sh /usr/lib/nagios/plugins/check_time_ping $HOSTADDRESS$ $ARG1$ $ARG2$ }
You must be logged in to submit a review.
To:
From: