PNP4NAGIOS не видно графиков
swichmen 6 мая, 2011 - 18:03
Народ помогите разобраться с настройкой плагина для nagios - pnp4nagios/
При обращении по ссылке http://x.x.x.x/nagios/pnp/index.php?host=yyyy выдаёт ошибку
Not Found The requested URL /nagios/pnp/graph was not found on this server. Apache Server at 172.16.11.155 Port 80
Вот мой nagios.conf для apache
<IfDefine nagios>
<VirtualHost *:80>
ServerName monitoring.lan
DocumentRoot /usr/share/nagios/
ScriptAlias /nagios/pnp/ /usr/share/pnp/
<Directory "/usr/share/pnp">
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>
Alias /nagios/cgi-bin/ /usr/lib/nagios/cgi-bin/
<Directory "/usr/lib/nagios/cgi-bin">
AllowOverride AuthConfig
Options +ExecCGI
Order allow,deny
Allow from all
</Directory>
Alias /nagios/ /usr/share/nagios/htdocs/
<Directory "/usr/share/nagios">
Options None
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
</IfDefine>
во всех каталогах вроде всё есть. chmod 755 /usr/share/pnp/ и chmod 755 /etc/pnp/ делал.
cat /etc/nagios/nagios.cfg | grep -v ^# | grep perf perfdata_timeout=5 process_performance_data=1 host_perfdata_command=process-host-perfdata service_perfdata_command=process-service-perfdata
В файле /etc/nagios/objects/commands.cfg всё прописано
define command {
command_name process-service-perfdata
command_line /usr/bin/perl /usr/libexec/process_perfdata.pl
}
define command {
command_name process-host-perfdata
command_line /usr/bin/perl /usr/libexec/process_perfdata.pl -d HOSTPERFDATA
}
В tail -F /var/log/apache2/error_log
[Fri May 06 17:36:09 2011] [error] [client 172.16.11.55] File does not exist: /usr/share/nagios/htdocs/pnp/graph [Fri May 06 17:50:16 2011] [error] [client 172.16.11.55] File does not exist: /usr/share/nagios/htdocs/pnp, referer: http://172.16.11.155/nagios/cgi-bin/status.cgi?host=all [Fri May 06 17:50:17 2011] [error] [client 172.16.11.55] File does not exist: /usr/share/nagios/htdocs/pnp, referer: http://172.16.11.155/nagios/cgi-bin/status.cgi?host=all [Fri May 06 17:50:18 2011] [error] [client 172.16.11.55] File does not exist: /usr/share/nagios/htdocs/pnp, referer: http://172.16.11.155/nagios/cgi-bin/status.cgi?host=all [Fri May 06 17:50:19 2011] [error] [client 172.16.11.55] File does not exist: /usr/share/nagios/htdocs/pnp, referer: http://172.16.11.155/nagios/cgi-bin/status.cgi?host=all
В tail -F /var/log/apache2/access_log
172.16.11.55 - - [06/May/2011:17:54:32 +0400] "GET /nagios/pnp/graph?host=adm-duma HTTP/1.1" 404 277 172.16.11.55 - - [06/May/2011:17:54:33 +0400] "GET /nagios/pnp/graph?host=adm-duma HTTP/1.1" 404 277 172.16.11.55 - - [06/May/2011:17:54:34 +0400] "GET /nagios/pnp/graph?host=adm-duma HTTP/1.1" 404 277
Нашол по форумам дебаг но что то не пойму его
/usr/libexec/verify_pnp_config.pl --basedir=/etc/nagios/ --config=/etc/nagios/nagios.cfg --binary=/usr/sbin/nagios --RRDpath=/var/nagios/perfdata/ --mode=default
Check Nagios/Icinga/PNP integration, v0.1.24 [E] Language "ru" is not valid / not supported [I] OS: This is . ( ) [I] Perl: 5.012003 [I] install_opts: -o nagios -g nagios [I] PNP-version: 0.6.7 [I] using Nagios basedir "/etc/nagios/" [I] using Nagios config "/etc/nagios/nagios.cfg" [I] using Nagios binary "/usr/sbin/nagios" [I] PNP mode: "NPCD" [I] Nagios info: Nagios Core 3.2.1 [A] verifying Nagios config [A] processing "/etc/nagios/nagios.cfg" [I] nagios_user=nagios [I] nagios_group=nagios [A] checking RRDtool (/usr/bin/rrdtool) [I] RRDtool: RRDtool 1.3.8 [I] RRDs perl module not installed [A] processing "/etc/nagios/resource.cfg" [I] using "/var/nagios/objects.cache" entries [E] "service_perfdata_command" not valid in "NPCD" mode [H] http://docs.pnp4nagios.org/ru/pnp-0.6/config [E] "host_perfdata_command" not valid in "NPCD" mode [H] http://docs.pnp4nagios.org/ru/pnp-0.6/config [E] "service_perfdata_file" not found in nagios.cfg [H] http://nagios.sourceforge.net/docs/3_0/configmain.html#service_perfdata_file [E] "service_perfdata_file_template" not found in nagios.cfg [H] http://nagios.sourceforge.net/docs/3_0/configmain.html#service_perfdata_file_template [E] "service_perfdata_file_mode" not found in nagios.cfg [H] http://nagios.sourceforge.net/docs/3_0/configmain.html#service_perfdata_file_mode [E] "service_perfdata_file_processing_interval" not found in nagios.cfg [H] http://nagios.sourceforge.net/docs/3_0/configmain.html#service_perfdata_file_processing_interval [E] "service_perfdata_file_processing_command" not found in nagios.cfg [H] http://nagios.sourceforge.net/docs/3_0/configmain.html#service_perfdata_file_processing_command [E] NPCD config file required [H] http://docs.pnp4nagios.org/ru/pnp-0.6/config#npcd [A] checking of RRDpath "/var/nagios/perfdata/" [I] 4 dir(s) with a total of 20 rrd file(s) Errors found. Please check the settings and have a look at the documentation.
»
- Для комментирования войдите или зарегистрируйтесь

Для дефолтного PNP4Nagios
Для дефолтного PNP4Nagios 0.6.x твой конфиг APACHE не подходит.
Так что:
Если не используешь URL rewriting, отключи ее в /etc/pnp/config.php
Если URL rewriting нужен, поправь конфиг apache, пример есть в /etc/apache2/modules.d/pnp4nagios.conf
Alias /pnp4nagios /usr/share/pnp/ <Directory /usr/share/pnp> AllowOverride AuthConfig Order allow,deny Allow from all <IfModule mod_rewrite.c> # Turn on URL rewriting RewriteEngine On Options FollowSymLinks # Installation directory RewriteBase /pnp4nagios # Protect application and system files from being viewed RewriteRule ^(application|modules|system) - [F,L] # Allow any files or directories that exist to be displayed directly RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # Rewrite all other URLs to index.php/URL RewriteRule .* index.php/$0 [PT,L] </IfModule> </Directory>Большое спасибо
Большое спасибо