nginx+nagios+pnp4nagios(PNP无法显示图表)

Rain-lisir 发布于 2014/01/08 10:10
阅读 1K+
收藏 0

环境是centos 6.2

各组件的版本是nginx1.5.8+php5.5.7+mysql5.6.15+pnp0.6.21


错误日志如下:

2014/01/08 09:36:51 [error] 6329#0: *2502 open() "/usr/local/nagios/share/pnp/share/index.php/graph" failed (20: Not a directory), client: 61.185.178.205, server: localhost, request: "GET /pnp/share/index.php/graph?host=localhost&srv=$SERVICEDESC$ HTTP/1.1", host: "117.34.72.225", referrer: "http://117.34.72.225/nagios/cgi-bin/extinfo.cgi?type=1&host=localhost"


访问日志如下:

lisir [08/Jan/2014:09:36:51 +0800] "GET /pnp/share/index.php/graph?host=localhost&srv=$SERVICEDESC$ HTTP/1.1" 404 570 "http://117.34.72.225/nagios/cgi-bin/extinfo.cgi?type=1&host=localhost" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36" "-"
66.249.75.102 - - [08/Jan/2014:09:36:54 +0800] "GET /images/201206/thumb_img/153_thumb_P_1339611676571.jpg HTTP/1.1" 401 194 "-" "Googlebot-Image/1.0" "-"

2014/01/08 09:41:41 [error] 6329#0: *2541 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 183.60.213.58, server: localhost, request: "GET /category.php?id=6&brand=75&price_min=0&price_max=0&page=2&sort=last_update&order=DESC HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.ylguomaoego.com"
 


templates.cfg文件配置如下:



define service{
        name                            services-pnp
        register                        0
        action_url                      /pnp/share/index.php/graph?host=$HOSTNAME$srv=_HOST_
        process_perf_data               1
}
define host{
        name                            hosts-pnp
        register                        0
        action_url                      /pnp/share/index.php/graph?host=$HOSTNAME$&srv=$SERVICEDESC$
        process_perf_data               1
}

commands.cfg配置文件如下:



define command{
        command_name    process-host-perfdata
        command_line    /usr/local/nagios/share/pnp/libexec/process_perfdata.pl -d HOSTPERFDATA
        }

# 'process-service-perfdata' command definition
define command{
        command_name    process-service-perfdata
        command_line    /usr/local/nagios/share/pnp/libexec/process_perfdata.pl
        }
什么页面都正常,就加进去的pnp无法出图和访问,日志报错是找不到该目录,是不是哪里配置的有问题,或者装的插件不兼容或者什么的,麻烦大神给看看。

加载中
返回顶部
顶部