[文章作者:张宴 本文版本: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技术 | 评论(1139) | 引用(0) | 阅读(185723)
mattjohnn Email Homepage
2020-8-5 03:18
Cash App Login, Go to the web browser of the device, in the URL bar address bar, type Cashapp Login, fill the login, credentials as asked. Make sure whatever the username and passwords you have filled are correct. Else, it will not allow you to proceed further for Cashapp Sign In. Connect with the team of experts.
trend micro download Email Homepage
2020-8-5 12:13
Trend micro provides the award-winning antivirus products to secure the computer and other smart devices and data. Install trend micro using trendmicro and proceed for trend micro activation to prevent your device and data from viruses and threats. With the Trendmicro, you can protect your data and device.
iPhone support Email Homepage
2020-8-7 14:11
There is no need to panic if your iPhone creates some minor technical problems. Are you getting a message SIM not supported iPhone? If your phone says contact carrier or restore factory settings, simply dial our toll free number to get instant help for your problem. SIM not supported iPhone
trendmicro-activate Email Homepage
2020-8-7 20:16
Trendmicro activate for your mac and pc.When you activate trendmicro antivirus, it protects your device from unwanted threats.Below mentioned are the services provided by trendmicro activation https://trendmicro-activate.com/https://trendmicro-activate.com/activate-trend-micro-internet-security/https://trendmicr... href="https://trendmicro-activate.com/">trend micro activation</a><a href="https://trendmicro-activate.com/activate-trend-micro-internet-security/">activate trend micro internet security</a><a href="https://trendmicro-activate.com/install-trend-micro-activation-code/">install trend micro activation code</a><a href="https://trendmicro-activate.com/trend-micro-internet-security-activation/">trend micro internet security activation</a><a href="https://trendmicro-activate.com/trendmicro-com-activate/">trendmicro.com/activate</a>
nordstarx Email Homepage
2020-8-11 16:22
Norton set up help to get you startedNorton is undoubtedly the most popular antivirus company. Its products are relied upon by not just individuals but businesses around the country for the security of their systems. Have you just purchased a license for a Norton antivirus program? Are you facing difficulties in setting up the program? Do not feel helpless as we are there to provide all help and assistance to you. To receive Norton set up help, just dial our toll free number 1-877-916-7666. If Norton set up not working, he will guide you through step by step instructions. This services remains active at all times on all 7 days of the week.
webroot.com/safe Email Homepage
2020-8-17 13:43
Webroot antivirus program, you can protect your devices such as Windows, Mac and mobile devices from malware, virus, spyware, etc. Through the webroot com safe link, you can Install Webroot with key code on multiple devices and activate the software. www.webroot.com/safe | webroot.com/safe
kaspersky Email Homepage
2020-8-19 17:13
kaspersky activation process online help and support regarding your product  stay safe and secure by activating your kaspersky antivirus
kaspersky Email Homepage
2020-8-19 17:14
kaspersky activation process online help and support regarding your product  stay safe and secure by activating your kaspersky antivirus
trendmicrobestbuy Email Homepage
2020-8-20 20:17
Trend micro best buy download trend micro antivirus and secure your computer against unwanted cyber threats available online. https://trendmicrobestbuy.com/https://trendmicrobestbuy.com/trend-micro-best-buy-activate/https://trendmicrobestbuy.com/... href="https://trendmicrobestbuy.com/">trendmicro best buy</a><a href="https://trendmicrobestbuy.com/trend-micro-best-buy-activate/">trend micro best buy activate</a><a href="https://trendmicrobestbuy.com/trend-micro-best-buy-activation/">trend micro best buy activation</a>
www.webroot.com/safe Email Homepage
2020-8-24 14:37
Trend micro provides the award-winning antivirus products to secure the computer and other smart devices and data. Install trend micro using trendmicro and proceed for trend micro activation to prevent your device and data from viruses and threats. With the Trendmicro, you can protect your data and device.www.trendmicro.com.au downloadme |www.trendmicro.com/downloadme |trend micro download
درب ضد سرقت Email Homepage
2020-8-25 06:33
اصالت سازند آن پی برد و به طور کلی سازنده آن خوش نام باشد بین تولید کنندگان <a href="https://sepahandarb.com/ ">درب ضد سرقت</a>     و درب تولید کارخانه ای باشد ونه تولید کارگاه  ونیز گارانتی های لازم از لحاظ قفل و سازه را داشته باشد
alexjones8285 Email Homepage
2020-8-25 20:08
Know everything about Delta Airlines Reservations like selecting your seats, changing your flight dates, check-in procedure, upgrading tickets to a higher class of service, and much more. Delta Airlines offers four classes of administration - Economy, Comfort Plus, First/Business Class, and Delta One.
nordstarx Email Homepage
2020-8-31 11:20
Most reliable Quickbooks customer service phone numberQuickbooks is an online accounting program that has come as a sigh of relief for thousands of self employed people and small business owners. It is packed with powerful features and makes bookkeeping very easy even for novices. However, there is no need to worry if your Quickbooks is not performing optimally. It is a technology based service that can suffer from small issues at time. We can solve your problem quickly on phone. Just dial 1-877-916-7666 to reach our highly popular and trusted tech centre. Hundreds of customers have utilized our Quickbooks customer service phone number in recent months.
office.com/setup Email Homepage
2020-9-4 12:26
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.
www.trendmicro.com.au downloade Email Homepage
2020-9-4 12:28
Trend Micro Software, a highly rated antivirus software that can be easily installed and run fast. Within a few seconds, it can defend yourself and your family. You can plan it manually or you can Scan automatically. Trend Micro will continue to defend you day and night. However check out the Prerequisite before download and install Trend Micro on your PC.
alex jones Email
2020-9-4 20:40
It's really nice post and. I am a travel blogger. If you want to go anywhere around the world, so visit Delta Airlines Reservations and get vacation packages and cheap flights.
virm1234 Email Homepage
2020-9-7 01:21
visite our site for more information about ustechiemaghttps://www.techiemag.net
jack Email
2020-9-8 14:06
Canon setup offers the Printer Setup download link where you can install the printer setup further. With the online, the user can set up the Canon Printer Model. webroot.com/safe Install webroot on new computer-Activate highly rated Webroot antivirus in your PC, Andriod or Laptops. Dragon Naturally Speaking is the solution for all the business, home and other projects in the world of writing, typing and documents making. https://canon-com-ij-setup.sitey.me/ | https://safe-webroot.sitey.me/ | https://nuance-dragonnaturallyspeaking.sitey.me/
درب ضد سرقت Email Homepage
2020-9-8 19:08
<a href="https://new-anti-theft-door.blogsky.com/ ">درب ضد سرقت</a>   تفاوت هاي بسياري باهم چه از نظر شکل ظاهري و چه از نظر متريال استفاده شده در ساختار   <a href="https://anti-theft-door.blogiran.net/ ">درب ضد سرقت</a>   دارند که در زير به بخشي از اين تفاوت ها     <a href="https://security-door.farsiblog.com/ ">درب ضد سرقت</a>    در زير پرداخته
office.com/setup Email Homepage
2020-9-10 16:24
office.com/setupOffice 365 can be more useful than just an email application if you pick the right participation plan. For business, improving benefit and joint exertion in the affiliation has gotten imperative to make it straightforward and progressively able for the delegates to work.But, amounts of associations are so far utilizing the major plans of Office 365, which limit them from utilizing the invigorated features. Thusly, to promise you get every component and use your Office 365 enrollment to the most.Buy your Office from Official www.office.com/setupwww.office.com/setup
分页: 18/57 第一页 上页 13 14 15 16 17 18 19 20 21 22 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]