Created
May 16, 2018 12:45
-
-
Save shokoe/ffeb5636e8c8f3af4026cd251037a70c to your computer and use it in GitHub Desktop.
naemon status on liner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mklive_cmd='/usr/bin/naemon-unixcat /omd/sites/magisto/tmp/run/live'; while true; do O=$((echo "Host,Check,Status,Interval,Delay,Exec"; echo -e 'GET services\nColumns: host_name description last_state check_interval last_check execution_time' | $mklive_cmd | awk -F';' -v N=`date +%s` 'N-$5 > $4*60 {printf "%s,%s,%d,%d,%d,%.2f\n", $1, $2, $3, $4*60, N-$5, $6}') | column -s , -t); clear; date; echo; uptime; echo; free -m; echo; echo "$O"; echo " Count:`echo \"$O\" | wc -l`"; sleep 10; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment