[文章作者:张宴 本文版本:v1.1 最后修改:2007.08.31 转载请注明出处:http://blog.zyan.cc]

  8月3日,我写了“Linux服务器监控系统 ServMon V1.0”,今天,ServMon V1.1 版本亮相。

  ServMon的原理是用shell脚本定时抓取被监控Linux服务器上的信息,再用curl POST到监控机的PHP接口程序上,由PHP接口程序对信息进行分析,如果存在异常,则发送报警邮件给管理员。报警邮件演示页面请见:http://blog.zyan.cc/read.php/276.htm

  点击在新窗口中浏览此图片

  ServMon V1.1 在 1.0 的基础上,增加了对Linux系统负载的监控,并编写了客户端自动安装包:

  1、被监控端服务器(Linux)
  (1)、下载并安装ServMon Client
引用
wget http://blog.zyan.cc/soft/linux/servmon/servmon-1.1.linux.tar.gz
tar zxvf servmon-1.1.linux.tar.gz
cd servmon-1.1
./install -i http://yourdomain/servmon/interface.php password

  注:此处的password为interface.php程序中设置的数据传输验证密码。

  客户端安装包源码:
  │
  ├─install
  ├─[src]
  │  ├─[bin]
  │  │  ├─diskstat_send
  │  │  ├─loadstat_send
  │  │  └─swapstat_send
  │  ├─[cron]
  │  │  └─servmon
  │  └─[data]

  屏幕演示:
  点击在新窗口中浏览此图片




  2、监控端服务器配置(Linux)
  (1)、启动sendmail
  /usr/sbin/sendmail -bd -q30m
  -b:指定Sendmail在后台运行,并且监听端口25的请求。
  -d:指定Sendmail以Daemon方式运行(守护进程)。
  -q:当Sendmail无法将邮件成功地发送到目的地时,它会将邮件保存在队列里。该参数指定邮件在队列里保存的时间。其中的30m表示保留30分钟。

  (2)、修改php.ini的[mail function]部分为以下内容,然后重启Apache,使PHP能够使用mail()函数发送电子邮件
引用
[mail function]
; For Win32 only.
;SMTP = localhost
;smtp_port = 25

; For Win32 only.
;sendmail_from = me@example.com

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
sendmail_path = /usr/sbin/sendmail -t -i


  (4)、在MySQL上创建一个数据库servmon,然后在该数据库中执行以下SQL语句创建表:
引用
CREATE TABLE `tb_diskstat` (
 `ip` varchar(128) NOT NULL default '',
 `date` int(10) NOT NULL default '0',
 UNIQUE KEY `ip` (`ip`)
) TYPE=MyISAM;

  备注:这张表是PHP接口程序用来记录发送磁盘分区报警邮件的时间,避免在一段时间内重复发送大量报警邮件的。

  (3)、PHP接口程序
  http://yourdomain/servmon/interface.php


Tags:



技术大类 » 其他Unix技术 | 评论(1088) | 引用(0) | 阅读(146500)
www.bullguard.com/is-mdl-install Email Homepage
2020-6-20 16:31
Download and install BullGuard Internet security with bullguard URL. If you have purchased the subscription or want a trial of BullGuard Internet security, then visit bullguard and download the setup. You can download the software for windows, macOS and Android. You can then safeguard your device and data with full virus protection with firewall, Identity Protection and many more.www.bullguard.com/is-mdl-install |  www.bullguard.com is-install-mdl-install
www.bullguard.com/is-mdl-install Email Homepage
2020-6-20 16:31
Download and install BullGuard Internet security with bullguard URL. If you have purchased the subscription or want a trial of BullGuard Internet security, then visit bullguard and download the setup. You can download the software for windows, macOS and Android. You can then safeguard your device and data with full virus protection with firewall, Identity Protection and many more.www.bullguard.com/is-mdl-install |  www.bullguard.com is-install-mdl-install
office.com/setup Email Homepage
2020-6-25 12:44
To activate the Microsoft Office, you are required to enter the product key. You will get the product key on the basis of your Office version. In case you have purchased a retail office.com/setup, then the activation key will be available inside the package. On the other side, the key will be sent to your registered email address if you brought an online version through www.office.com/setup . Here is the full breakdown of how the client can activate the Office on the desired system.
jhonmark Email Homepage
2020-6-25 14:12
Login to Microsoft 365 account and enter the product key at www.office.com/setup page on the relevant field. Use your Microsoft account for everything you work on office products. Being a prominent software program in the work field, Microsoft offers many apps for Windows, Mac, tablets, and phones.www.office.com/setup |  office.com/setup
www.office.com/setup Email Homepage
2020-6-25 14:13
Login to Microsoft 365 account and enter the product key at www.office.com/setup page on the relevant field. Use your Microsoft account for everything you work on office products. Being a prominent software program in the work field, Microsoft offers many apps for Windows, Mac, tablets, and phones.www.office.com/setup |  office.com/setup
www.office.com/setup Email Homepage
2020-6-25 14:13
Login to Microsoft 365 account and enter the product key at www.office.com/setup page on the relevant field. Use your Microsoft account for everything you work on office products. Being a prominent software program in the work field, Microsoft offers many apps for Windows, Mac, tablets, and phones.www.office.com/setup |  office.com/setup
www.office.com/setup Email Homepage
2020-6-25 14:14
Login to Microsoft 365 account and enter the product key at www.office.com/setup page on the relevant field. Use your Microsoft account for everything you work on office products. Being a prominent software program in the work field, Microsoft offers many apps for Windows, Mac, tablets, and phones.www.office.com/setup |  office.com/setup
www.mcafee.com/activate Email Homepage
2020-6-25 14:14
The present digital world is filled with threats. If you are an optimist and have total faith in your device’s first-party antivirus, then it’s great but fighting against advanced malware and viruses requires modern technology. www.mcafee.com/activate |  mcafee.com/activate
jollyjoseph Email Homepage
2020-6-27 13:33
http://mydriveconnect.chhttp://bt-maill.com
jollyjoseph Email Homepage
2020-6-27 13:33
http://wwwhulucomactivate.us/http://officecomsetupl.com
jollyjoseph Email Homepage
2020-6-27 13:34
http://netgearextendersetupp.comhttp://garmincomexpress.global/
jollyjoseph Email Homepage
2020-6-27 13:34
http://garminexpress.pro/https://webrootloginz.com/
jollyjoseph Email Homepage
2020-6-27 13:34
http://nortonloginz.com/http://myrokucomlinkz.comhttp://iwebrootcomsafez.com
Hulu Login Email Homepage
2020-6-29 16:59
Entertainment can be more fun with Hulu as here you get access to a world full of your favorite TV shows. Here will get the opportunity to enjoy the latest content that you can stream in any of your devices supporting the app. Get your free trial and access to your device in theHulu Loginhttp://hulu-login.us/
Garmin.com/Express Email Homepage
2020-6-29 17:01
Garmin Express is an extremely versatile software application available for both Windows and Mac devices. However, you are required to check the specified requirements and ensure your system conforms to it. This is extremely important for flawless setup and unmatched performance.  Garmin.com/ExpressGarmin.com/Express
Garmin.com/Express Email Homepage
2020-6-29 17:02
The software gives you desktop notifications and step-by-step instructions so that you can update your devices with ease. Even if your application is not open or the device is not connected to your system, it will give you alerts on a regular basis. So for garmin.com/express setup, you need to follow all the full-proof steps given below. Garmin.com/expressGarmin.com/express
Garmin.com/Express Email Homepage
2020-6-29 17:03
Garmin.com/express is a computer application for easily setting up, registering and managing your Garmin device. The software gives you alerts whenever there are new updates available so that you can install them easily. You can also save multiple maps and preferred places with Garmin Express. Garmin.com/expressGarmin.com/express
Linksys Router Login Email Homepage
2020-6-29 17:04
The Linksys router web interface is the place where all the router settings are stored for example connectivity, wireless, security, etc. For making changes to the default settings, you need to login to your Linksys router. Also, you can change your router password after signing into your account. Once you have logged in, you will be able to adjust all the available settings according to your preference.Linksys Router LoginLinksys Router Login
Webroot.com/safe Email Homepage
2020-6-29 17:05
The more we are becoming tech-savvy, the more we need the cybersecurity. It becomes important to remain protected against all the existing and emerging online threats as they can damage your system and can also steal your data. For getting protection, you must need a comprehensive and ultimate security solution. Webroot.com/safe is one such software that can provide world-class security solutions to provide you and your device with outstanding protection Webroot.com/safeWebroot.com/safe
分页: 15/55 第一页 上页 10 11 12 13 14 15 16 17 18 19 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]