有人发邮件问我用nagios怎么监控windows的端口。
check_nt就可以实现
使用方法:
Usage:check_nt -H host -v variable [-p port] [-w warning] [-c critical][-l params] [-d SHOWALL] [-t timeout]
Options:
-h, --help
Print detailed help screen
-V, --version
Print version information
Options:
-H, --hostname=HOST
Name of the host to check
-p, --port=INTEGER
Optional port number (default: 1248)
-s <password>
Password needed for the request
-w, --warning=INTEGER
Threshold which will result in a warning status
-c, --critical=INTEGER
Threshold which will result in a critical status
-t, --timeout=INTEGER
Seconds before connection attempt times out (default: 10)
-h, --help
Print this help screen
-V, --version
Print version information
-v, --variable=STRING
Variable to check
简单说明:
check_nt就可以实现
使用方法:
Usage:check_nt -H host -v variable [-p port] [-w warning] [-c critical][-l params] [-d SHOWALL] [-t timeout]
Options:
-h, --help
Print detailed help screen
-V, --version
Print version information
Options:
-H, --hostname=HOST
Name of the host to check
-p, --port=INTEGER
Optional port number (default: 1248)
-s <password>
Password needed for the request
-w, --warning=INTEGER
Threshold which will result in a warning status
-c, --critical=INTEGER
Threshold which will result in a critical status
-t, --timeout=INTEGER
Seconds before connection attempt times out (default: 10)
-h, --help
Print this help screen
-V, --version
Print version information
-v, --variable=STRING
Variable to check
简单说明:
-H 主机名或者IP
-p NSClient端口,一般12489
-s NSClient密码,如果客户端设定了,就必须指定
-w 警告状态报告
-c 危险状态报告
-p NSClient端口,一般12489
-s NSClient密码,如果客户端设定了,就必须指定
-w 警告状态报告
-c 危险状态报告
-v 变量,指定相关
实例:
$ ./check_nt -H 192.168.1.11 -p 21 -s 123456 -v CLIENTVERSION
220-FileZilla Server version 0.9.31 beta
220-FileZilla Server version 0.9.31 beta
$ ./check_nt -H 192.168.1.11 -p 21 -s 123456 -v CPULOAD -l 60,90,95
CPU Load 220% (60 min average) | '60 min avg Load'=220%;90;95;0;100
CPU Load 220% (60 min average) | '60 min avg Load'=220%;90;95;0;100
本文转自守住每一天51CTO博客,原文链接:http://blog.51cto.com/liuyu/181370,如需转载请自行联系原作者