cacti监控lighttpd

简介:

 

先配置加载lighttpdmod_status模块

这里是用的lighttpd-1.4.28版本的,有两种方法

第一中,1编辑lighttpdmodule.conf 配置文件,加载mod_status模块,并取消include conf.d/status.conf 注释

           server.modules =

                         mod_access”;

                           mod_status“;

                             ……

                            )

       编辑mod_status 的配置文

               #cd conf.d

               #vim  status.conf

                  #server.modules += ( "mod_status" )

                     注:注释此项因为已经在module.conf中已经加载了该模块,如果再次加载,回报下面的错误

Starting lighttpd: 2010-09-09 02:33:15: (plugin.c.131) Cannot load plugin mod_status more than once, please fix your config (we may not accept such configs in future releases

 

$HTTP["remoteip"] == "192.168.2.194" {

   #注:此项是设置 允许那台主机访问http://ip/server-status 这个页面,来查看lighttpd的工作状态

                   status.status-url          = "/server-status"

  status.config-url          = "/server-config"

                   status.statistics-url      = "/server-statistics"

                   status.enable-sort         = "enable"

}

 

   第二种方法就是在module.conf文件中只需要取消include conf.d/status.conf 注释

           并编辑mod_status的配置文件

                             server.modules += ( "mod_status" )

 

$HTTP["remoteip"] == "192.168.2.194" {

                             status.status-url          = "/server-status"

                             status.config-url          = "/server-config"

                             status.statistics-url      = "/server-statistics"

 status.enable-sort         = "enable"

}

 

 

 

 

 

 

下载cacti监控lighttpd的模板

      http://forums.cacti.net/about19676.html 

                  lighttpd_stats_1.0.tar

 

解压并把对应的php 脚本拷贝到caciscripts的目录下面

 

    #tar xvf lighttpd_stats_1.0.tar

    #cd  lighttpd_stats_1.0

    #cp  ss_lighttpd_stats.php  /var/www/html/cacti/scripts

 注意并修改该脚本的属主,不然cacti会报错

     

09/09/2010 11:55:07 AM - PHPSVR: Poller[0] WARNING: Function does not exist

09/09/2010 11:55:07 AM - PHPSVR: Poller[0] WARNING: Function does not exist

09/09/2010 11:55:07 AM - PHPSVR: Poller[0] WARNING: Function does not exist

09/09/2010 11:55:07 AM - PHPSVR: Poller[0] WARNING: Function does not exist

所以一定要修改该php脚本的权限

   #chown cactiuer ss_lighttpd_stats.php

cacti监控lighttpd的模板cacti_host_template_webserver_lighttpd.xml 导入到cacti










本文转自 freehat08 51CTO博客,原文链接:http://blog.51cto.com/freehat/391270,如需转载请自行联系原作者
目录
相关文章
|
9月前
|
监控
Zabbix监控httpd服务
Zabbix监控httpd服务
92 0
|
数据采集 监控 Unix
Cacti/Nagios/Zabbix/centreon/Ganglia之抉择
一、Cacti 二、Nagios 三、Zabbix 四、Ganglia 五、Centreon 六、对比图
|
数据采集 运维 监控
Cacti/Nagios/Zabbix/centreon/Ganglia之抉择| 学习笔记
快速学习Cacti/Nagios/Zabbix/centreon/Ganglia之抉择。
135 0
|
JSON 数据安全/隐私保护 数据格式
|
监控 安全 开发工具
|
Web App开发 监控 关系型数据库
|
监控 PHP 数据安全/隐私保护