nagios plugins之check_http
来源:互联网 发布:印度外汇储备数据 编辑:程序博客网 时间:2024/06/13 12:49
//显示版本
#./check_http-V
check_http v2053 (nagios-plugins 1.4.13)
//-H <vhost> -u<uri> -p<port>
(不能直接-u写URL,用-u时要用-H;-u带的URL可以写全或相对)
#./check_http -H www.****.com
HTTP OK HTTP/1.1 200 OK - 106540 bytes in 1.833 seconds|time=1.833151s;;;0.000000 size=106540B;;;0
#./check_http -H www.****.com -u /url1/url2/index.html
#./check_http -H www.****.com -u http://www.****.com/url1/url2/index.html
#./check_http -H www.****.com -p 80 -u http://www.****.com/url1/url2/index.html
//-I<ipaddress>
#./check_http-I xxx.xxx.xxx -u /url1/url2/index.html
//-e <string>;预期服务器返回的第一行字串匹配
# ./check_http -H www.laabaa.com -e "200OK"
HTTP OK HTTP/1.1 200 OK - 106540 bytesin 1.736 seconds |time=1.736245s;;;0.000000 size=106540B;;;0
# ./check_http -H www.laabaa.com -e "200notOK"
HTTP CRITICAL - Invalid HTTP responsereceived from host: HTTP/1.1 200 OK
HTTP OK HTTP/1.1 200 OK - 106540 bytesin 1.736 seconds |time=1.736245s;;;0.000000 size=106540B;;;0
# ./check_http -H www.laabaa.com -e "200notOK"
HTTP CRITICAL - Invalid HTTP responsereceived from host: HTTP/1.1 200 OK
//-s <string>;预期页面代码中的字串
//-M <age>;检测页面的 Lastmodified时间,如1m,1h,1d等(分钟,小时,天);
# ./check_http -I 192.168.100.107 -u/cehq/zhishu.html -M 1m
HTTP CRITICAL - Last modified 1:11:40ago
HTTP CRITICAL - Last modified 1:11:40ago
//-m<min_pg_size>:<max_pg_size>;最小页面size(bytes):最大页面size(bytes)
# ./check_http -I 192.168.100.107 -u/cehq/zhishu.html -m 100:200
HTTP WARNING: page size 3466 toolarge|size=3466B;100;0;0
HTTP WARNING: page size 3466 toolarge|size=3466B;100;0;0
//-w和-c;定义warning和critical的告警阀值(单元:seconds)
# ./check_http -I 192.168.100.107 -u/cehq/zhishu.html -w 0.0001
HTTP WARNING: -HTTP/1.1 200 OK - 0.002 second response time|time=0.001646s;0.000100;;0.000000 size=3466B;;;0
HTTP WARNING:
# ./check_http -I 192.168.100.107 -u/cehq/zhishu.html -c 0.0001
HTTP CRITICAL: -HTTP/1.1 200 OK - 0.002 second response time|time=0.001778s;;0.000100;0.000000 size=3466B;;;0
HTTP CRITICAL:
// -N;检查一个页面访问,为了获得较好的响应时间,不读取页面体,no-body:
# ./check_http -H www.ce.cn-u /index.shtml -N
HTTP OK: HTTP/1.1 200 OK - 4300 bytes in 0.015 second response time|time=0.014826s;;;0.000000 size=4300B;;;0
# ./check_http -H www.ce.cn-u /index.shtml -N
HTTP OK: HTTP/1.1 200 OK - 4300 bytes in 0.015 second response time|time=0.014826s;;;0.000000 size=4300B;;;0
// -a; 以用户名密码访问一个需认证的页面:
# ./check_http -I 10.10.10.32 -u/nagios/
HTTP WARNING: HTTP/1.1 401 Authorization Required - 717 bytes in 0.004 secondresponse time |time=0.004006s;;;0.000000 size=717B;;;0
# ./usr/lib/nagios/plugins/check_http -I192.168.10.2 -u /nagios/ -anagios:nagios
HTTP OK: HTTP/1.1 200 OK - 911 bytesin 0.005 second response time |time=0.004724s;;;0.000000size=911B;;;0
# ./check_http -I 10.10.10.32 -u/nagios/
HTTP WARNING: HTTP/1.1 401 Authorization Required - 717 bytes in 0.004 secondresponse time |time=0.004006s;;;0.000000 size=717B;;;0
# ./usr/lib/nagios/plugins/check_http -I192.168.10.2 -u /nagios/ -anagios:nagios
HTTP OK: HTTP/1.1 200 OK - 911 bytesin 0.005 second response time |time=0.004724s;;;0.000000size=911B;;;0
//-t;连接超时的时间(default:10seconds)
#./check_http -Hlaabaa.com
HTTP OK HTTP/1.1 200 OK - 106540 bytes in 1.840 seconds|time=1.839614s;;;0.000000 size=106540B;;;0
#./check_http -H laabaa.com-t 1
CRITICAL - Socket timeout after 1 seconds
HTTP OK HTTP/1.1 200 OK - 106540 bytes in 1.840 seconds|time=1.839614s;;;0.000000 size=106540B;;;0
#./check_http -H laabaa.com
CRITICAL - Socket timeout after 1 seconds
//-v;verbose,show details for command-linedebugging
以上常用的,没有post、header等相关的参数。
- nagios plugins之check_http
- nagios-plugins-1.4.15 客户端 make 时报错 make[2]: *** [check_http.o] Error 1
- nagios网页监控check_http
- nagios plugins
- check_http: Invalid option - SSL…
- nagios使用check_http监控网页及用法实例
- nagios实例配置2-关于nagios 的check_http 监控报警的设置
- Nagios通过check_http监控一台web应用服务器上多个tomcat服务
- nagios监控mysql(percona-monitoring-plugins)
- 安装nagios-plugins-1.4.15的make的报错
- 编译安装nagios-4.3.2+plugins-2.2.1+check_mysql
- 【原创】PyCharm plugins Vim 插件
- Android eclipse之plugins
- Npp plugins 之 TaskList
- linux nagios 安装 nagios-plugins-1.4.15 、nrpe以及 遇到的报错的解决方法
- Nagios 探索之 总结
- nagios报警,禁用之
- Nagios备忘之安装
- shell之“>/dev/null 2>&1”
- linux里的CPU负载
- grep、awk、sed学习笔记
- 运行awk脚本文件遇到不能执行问题
- CHECK_NRPE: Error - Could not co…
- nagios plugins之check_http
- Linux--date命令
- 整合Cacti+Nagios出现打开php文件…
- http协议学习笔记
- 在Ubuntu整合Cacti与Nagios(一)
- check_http: Invalid option - SSL…
- nagios中sendmail邮件报警设置
- putty使用教程
- java对cookie的操作