您好,登錄后才能下訂單哦!
#wget http://exchange.nagios.org/components/com_mtree/p_w_upload.php?link_id=3379&cf_id=24
# chmod +x /usr/local/nagios/libexec/check_iostat # chown nagios. /usr/local/nagios/libexec/check_iostat
# ./check_iostat -d sda -w 100 -c 200 OK - I/O stats tps=0.31 KB_read/s=5.94 KB_written/s=6.66 | 'tps'=0.31; 'KB_read/s'=5.94; 'KB_written/s'=6.66;
# vi /usr/local/nagios/etc/nrpe.cfg command[check_iostat]=/usr/local/nagios/libexec/check_iostat -d sda -w 100 -c 200
# /etc/init.d/xinetd restart Stopping xinetd: [ OK ] Starting xinetd: [ OK ]
# vi /usr/local/nagios/etc/objects/commands.cfg define command{ command_name check_iostat command_line $USER1$/check_iostat -d $ARG1$ -w $ARG2$ -c $ARG3$ }
# vi /usr/local/nagios/etc/services/mail_156.cfg define sevice{ use generic-service host_name mail_156 service_description check-iostat check_command check_nrpe!check_iostat!sda!100!200 }
[root@mail ~]# /usr/local/nagios/libexec/check_iostat -d sda1 -w 100 -c 200 /usr/local/nagios/libexec/check_iostat: line 54: sda1: command not found /usr/local/nagios/libexec/check_iostat: line 55: sda1: command not found /usr/local/nagios/libexec/check_iostat: line 56: sda1: command not found /usr/local/nagios/libexec/check_iostat: line 60: bc: command not found /usr/local/nagios/libexec/check_iostat: line 60: bc: command not found /usr/local/nagios/libexec/check_iostat: line 61: bc: command not found /usr/local/nagios/libexec/check_iostat: line 64: bc: command not found /usr/local/nagios/libexec/check_iostat: line 64: bc: command not found /usr/local/nagios/libexec/check_iostat: line 65: bc: command not found OK - I/O stats tps= KB_read/s= KB_written/s= | 'tps'=; 'KB_read/s'=; 'KB_written/s'=;
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。