nagios 监控页面脚本
来源:互联网 发布:医保大数据分析 编辑:程序博客网 时间:2024/05/21 17:24
在企业应用当中,监控网站服务有时只靠端口的存活是不够的。
本脚本利用python监控网页url,靠网页返回关键字判断服务器服务状态是否正常,虽然简单但可满足很多需求:
[root@localhost nagios]# cat check_web
'''
Create 20131101
@cuc yangyang.feng
'''
#!/usr/bin/env python
import commands
import sys
from optparse import OptionParser
import urllib
import re
filehandle = urllib.urlopen("http://192.168.20.200/index.html")
content=filehandle.read()
filehandle.close()
#print(content)
if __name__ == '__main__':
if content.find('status:0 ok')>=0:
# if content.index('status:0 ok')==0:
print 'status:0 ok'
sys.exit(0)
else:
print 'No'
sys.exit(1)
- nagios 监控页面脚本
- 懒人nagios页面监控脚本
- nagios 监控脚本
- nagios 监控hadoop脚本
- nagios io监控脚本
- nagios监控http页面
- nagios监控https页面
- Nagios监控mfs运行状态插件脚本
- nagios监控服务器磁盘空间的脚本
- nagios监控cpu使用率的脚本代码
- nagios系统监控IO异常脚本
- python nagios简单监控进程数脚本
- Nagios监控ORACLE ALERT日志脚本
- Nagios监控LINUX /var/log/message脚本
- Nagios自己编写监控磁盘脚本check_disk
- nagios 被监控端一键配置脚本
- Nagios搭建配置及监控脚本开发
- nagios邮件报警发送中文、nagios监控页面乱码解决
- Mysql数据库优化技术
- 设置通过response返回的信息设置客户端的输出编码
- System
- 好的技术博客推荐
- 一个用户如何访问另一个用户的表
- nagios 监控页面脚本
- pydev快捷键汇总
- MySQL命令行导出导入数据库
- Runtime
- Linux内核学习实践之红外驱动分析—RCA38KHz软解码
- hadoop-2.0.0-cdh4.4.0 doc
- 最简单的模块编程编译出错了?!新手请教…
- 如何通过session控制单点登录
- 关于OC 的Initialize