Script check_uptime:
#!/bin/bash
#
# Uptime for Linux Host
#
# Date: 2009-05-13
# Author: Marcio Jose Atanasio
#
OUTPUT=`uptime | awk '{ print $3" "$4" "$5 }' | sed s/,//g`
echo -n "Uptime - $OUTPUT"
Declaração do script para comando (arquivo commands.cfg):
# 'check_uptime' Uptime do Servidor
define command{
command_name check_uptime
command_line /usr/local/nagios/libexec/check_uptime
}
Nenhum comentário:
Postar um comentário