mirror of
https://github.com/m8tin/cis.git
synced 2025-12-06 07:48:26 +01:00
Monitoring framework for minute-by-minute service testing, including live dashboard
This commit is contained in:
9
script/monitor/generic/PING_CHECK.sh
Executable file
9
script/monitor/generic/PING_CHECK.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
_SERVER="${1:?"FQDN of server missing"}"
|
||||
|
||||
# -4 Use IPv4
|
||||
# -W SECONDS Wait seconds for an answer
|
||||
# -c COUNT_VALUE Count of pings being executed
|
||||
_RESULT="$(ping -4 -W 1 -c 1 "${_SERVER}" | grep "time=" | cut -d'=' -f4)"
|
||||
! [ -z "${_RESULT}" ] && echo "OK#RTT: ${_RESULT}" || echo "FAIL#PLEASE USE FALLBACK!"
|
||||
Reference in New Issue
Block a user