I've installed nagios 3.4.1 on several Ubuntu 12.04 servers according to Quickstart,
apache2 is listening on port 9088; php5 has been installed, in localhost, web works normally.
Then, srever0 is responsible for monitoring server1 and server2.
I've installed nrpe,define my hosts and service and check_ping commands etc.
check_nrpe on server0, nrpe daemon on server1 and server2.
command line test is ok:
nagios@server0:/usr/local/nagios/etc$ ../libexec/check_nrpe -H server1 -c check_ping
PING OK - Packet loss = 0%, RTA = 0.03 ms|rta=0.029000ms;100.000000;500.000000;0.000000 pl=0%;20;60;0
nagios@server0:/usr/local/nagios/etc$ ../libexec/check_nrpe -H server2 -c check_ping
PING OK - Packet loss = 0%, RTA = 0.02 ms|rta=0.022000ms;100.000000;500.000000;0.000000 pl=0%;20;60;0
But in web interface, server1 and server2 host status is DOWN, all defined services are UNKNOWN,
apache2 log indicates PHP MagpieRSS failed to parse RSS file:
# less /var/log/apache2/error.log
......
[Wed Aug 01 14:58:38 2012] [error] [client *.*.*.*] Attribute without value at line 1, column 65, referer: http://front:9088/nagios/main.php
[Wed Aug 01 14:58:38 2012] [error] [client *.*.*.*] PHP Warning: MagpieRSS: Failed to parse RSS file. (Attribute without value at line 1, column 65) in /usr/local/nagios/share/includes/rss/rss_fetch.inc on line 238, referer: http://front:9088/nagios/main.php
Can anyone give some advice? thx!
Nagios PHP MagpieRSS failed to parse RSS file
Re: Nagios PHP MagpieRSS failed to parse RSS file
Can you post the command definitions for the hosts and services?
Nicholas Scott
Former Nagios employee
Former Nagios employee
Re: Nagios PHP MagpieRSS failed to parse RSS file
I've found where the error comes.
on server0:
$ cd /usr/local/nagios/etc
$ cat servers/hosts.cfg
define host{
name linux-server-template
check_period 24x7
check_interval 5
retry_interval 1
max_check_attempts 10
contact_groups admins
notifications_enabled 1
event_handler_enabled 1
flap_detection_enabled 1
process_perf_data 1
retain_status_information 1
notification_interval 120
notification_period workhours
notification_options d,u,r
register 0
}
define host{
use linux-server-template
host_name server0
alias nagiosserver
address 192.168.1.10
check_command check_nrpe
}
define host{
use linux-server-template
host_name server1
alias server1
address 192.168.1.11
check_command check_nrpe
}
define service{
name linux-service-template
active_checks_enabled 1
passive_checks_enabled 1
parallelize_check 1
obsess_over_service 1
check_freshness 0
notifications_enabled 1
event_handler_enabled 1
flap_detection_enabled 1
failure_prediction_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 10
retry_check_interval 2
contact_groups admins
notification_options w,u,c,r
notification_interval 60
notification_period workhours
register 0
}
define service{
use linux-service-template
host_name server1,server2
service_description PING
check_command check_nrpe!check_ping
}
define service{
use linux-service-template
host_name server1,server2
service_description CPU Load
check_command check_nrpe!check_load
}
define service{
use linux-service-template
host_name server1,server2
service_description Current Users
check_command check_nrpe!check_users
}
define service{
use linux-service-template
host_name server1,server2
service_description Total Processes
check_command check_nrpe!check_total_procs
}
$ cat servers/command.cfg
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -C $ARG1$ // it should be -c
}
on server0:
$ cd /usr/local/nagios/etc
$ cat servers/hosts.cfg
define host{
name linux-server-template
check_period 24x7
check_interval 5
retry_interval 1
max_check_attempts 10
contact_groups admins
notifications_enabled 1
event_handler_enabled 1
flap_detection_enabled 1
process_perf_data 1
retain_status_information 1
notification_interval 120
notification_period workhours
notification_options d,u,r
register 0
}
define host{
use linux-server-template
host_name server0
alias nagiosserver
address 192.168.1.10
check_command check_nrpe
}
define host{
use linux-server-template
host_name server1
alias server1
address 192.168.1.11
check_command check_nrpe
}
define service{
name linux-service-template
active_checks_enabled 1
passive_checks_enabled 1
parallelize_check 1
obsess_over_service 1
check_freshness 0
notifications_enabled 1
event_handler_enabled 1
flap_detection_enabled 1
failure_prediction_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 10
retry_check_interval 2
contact_groups admins
notification_options w,u,c,r
notification_interval 60
notification_period workhours
register 0
}
define service{
use linux-service-template
host_name server1,server2
service_description PING
check_command check_nrpe!check_ping
}
define service{
use linux-service-template
host_name server1,server2
service_description CPU Load
check_command check_nrpe!check_load
}
define service{
use linux-service-template
host_name server1,server2
service_description Current Users
check_command check_nrpe!check_users
}
define service{
use linux-service-template
host_name server1,server2
service_description Total Processes
check_command check_nrpe!check_total_procs
}
$ cat servers/command.cfg
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -C $ARG1$ // it should be -c
}
Re: Nagios PHP MagpieRSS failed to parse RSS file
Provided that you've fixed the -C -> -c problem, and its still not working, can you show me the permissions in your libexec directory?
ll /usr/local/nagios/libexec
ll /usr/local/nagios/libexec
Nicholas Scott
Former Nagios employee
Former Nagios employee