PDA

View Full Version : SLES 11 Nagios - Error: Could not read object configuration!



kent2612
16-Jul-2012, 07:45
I've installed Nagios version 3.0.6 via Yasts, installation is successful but when I tried to browsed to the sub menu under http://nagios-server/nagios
I keep getting this 'Error:Could not read object configuration data!'
I've also verify the configuration using -v command-line option, as shown below no error is found.

sles11sp2:/etc/nagios # nagios -v ./nagios.cfg

Nagios 3.0.6
Copyright (c) 1999-2008 Ethan Galstad (http://www.nagios.org)
Last Modified: 12-01-2008
License: GPL

Reading configuration data...

Running pre-flight check on configuration data...

Checking services...
Checked 8 services.
Checking hosts...
Checked 1 hosts.
Checking host groups...
Checked 1 host groups.
Checking service groups...
Checked 0 service groups.
Checking contacts...
Checked 1 contacts.
Checking contact groups...
Checked 1 contact groups.
Checking service escalations...
Checked 0 service escalations.
Checking service dependencies...
Checked 0 service dependencies.
Checking host escalations...
Checked 0 host escalations.
Checking host dependencies...
Checked 0 host dependencies.
Checking commands...
Checked 24 commands.
Checking time periods...
Checked 5 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check

The nagios.log file below do show error

sles11sp2:/etc/nagios # tail /var/log/nagios/nagios.log
[1342287481] Error: Unable to create temp file for writing status data!
[1342287491] Error: Unable to create temp file for writing status data!
[1342287501] Error: Unable to create temp file for writing status data!
[1342287511] Error: Unable to create temp file for writing status data!
[1342287521] Error: Unable to create temp file for writing status data!
[1342287531] Error: Unable to create temp file for writing status data!
[1342287541] Error: Unable to create temp file for writing status data!
[1342287551] Error: Unable to create temp file for writing status data!
[1342287561] Error: Unable to create temp file for writing status data!
[1342287571] Error: Unable to create temp file for writing status data!

jmozdzen
16-Jul-2012, 12:48
Hi Kent,

concerning the errors from nagios.log: The Nagios executables invoked via the web server run in the web server's context - so you might need to give wwwrun the proper permissions to the "temp file directory". Being unable to write some intermediate status data may very well be the root cause... otoh, maybe the permissions to read the configuration files are too restrictive, too. I'm sure you invoked pre-flight checks from the root user context ;)

Regards,
Jens

kent2612
16-Jul-2012, 15:59
Hi Jens,

I'm not sure which "temp file directory" to give the permission to? Yes, I invoked the checks using the root account, however the user account needed to login to the web interface were created via
htpasswd2 -c /etc/nagios/htpasswd.users nagiosadmin
and another user nagios was created automatically during installation of nagios in passwd
nagios:x:108:113:User for Nagios:/var/lib/nagios:/bin/false

jmozdzen
16-Jul-2012, 16:54
Hi Kent,


Hi Jens,

I'm not sure which "temp file directory" to give the permission to? Yes, I invoked the checks using the root account, however the user account needed to login to the web interface were created via
htpasswd2 -c /etc/nagios/htpasswd.users nagiosadmin
and another user nagios was created automatically during installation of nagios in passwd
nagios:x:108:113:User for Nagios:/var/lib/nagios:/bin/false

regarding the errors in nagios.log, a major Internet search engine suggested the following thread: http://forums.meulie.net/viewtopic.php?t=780

it was a permission error , chown nagios:nagios /usr/local/nagios fix it !
I doubt that your Nagios is installed in /usr/local, but probably /opt/nagios. That's where I'd search for the directories that are giving problems. OTOH, the installer should have set up those permissions already.

Anything else in the Apache error logs that may be helpful?

The "web users" that you create via htpasswd2 have nothing to do with actual system accounts used to access ie the file system - it's either the context of httpd (user "wwwrun") or, in case of setuid CGI programs, the user owning those specific binaries.

With regards,
Jens

jmozdzen
16-Jul-2012, 17:44
re,

> "/opt/nagios"
The directories for interim files are more likely under "/var/nagios"...

kent2612
17-Jul-2012, 03:44
re,

> "/opt/nagios"
The directories for interim files are more likely under "/var/nagios"...

So far no luck yet and there is no /opt/nagios or /var/nagios, below are the location of nagios files and directories.

etc/apache2/conf.d/nagios.conf
/etc/cron.weekly/suse.de-nagios
/etc/init.d/nagios
/etc/nagios
/etc/nagios/cgi.cfg
/etc/nagios/command.cfg
/etc/nagios/htpasswd.users
/etc/nagios/nagios.cfg
/etc/nagios/nrpe.cfg
/etc/nagios/nsca.cfg
/etc/nagios/objects
/etc/nagios/objects/commands.cfg
/etc/nagios/objects/contacts.cfg
/etc/nagios/objects/localhost.cfg
/etc/nagios/objects/nrpe_check_control.cfg
/etc/nagios/objects/printer.cfg
/etc/nagios/objects/switch.cfg
/etc/nagios/objects/templates.cfg
/etc/nagios/objects/timeperiods.cfg
/etc/nagios/objects/windows.cfg
/etc/nagios/resource.cfg
/etc/nagios/send_nsca.cfg
/etc/sysconfig/nagios
/usr/lib/nagios
/usr/lib/nagios/brokers
/usr/lib/nagios/cgi
/usr/lib/nagios/cgi/avail.cgi
/usr/lib/nagios/cgi/cmd.cgi
/usr/lib/nagios/cgi/config.cgi
/usr/lib/nagios/cgi/extinfo.cgi
/usr/lib/nagios/cgi/histogram.cgi
/usr/lib/nagios/cgi/history.cgi
/usr/lib/nagios/cgi/notifications.cgi
/usr/lib/nagios/cgi/outages.cgi
/usr/lib/nagios/cgi/showlog.cgi
/usr/lib/nagios/cgi/status.cgi
/usr/lib/nagios/cgi/statusmap.cgi
/usr/lib/nagios/cgi/statuswml.cgi
/usr/lib/nagios/cgi/statuswrl.cgi
/usr/lib/nagios/cgi/summary.cgi
/usr/lib/nagios/cgi/tac.cgi
/usr/lib/nagios/cgi/traceroute.cgi
/usr/lib/nagios/cgi/trends.cgi
/usr/lib/nagios/p1.pl
/usr/lib/nagios/plugins
/usr/lib/nagios/plugins/check_apt
/usr/lib/nagios/plugins/check_breeze
/usr/lib/nagios/plugins/check_by_ssh
/usr/lib/nagios/plugins/check_clamd
/usr/lib/nagios/plugins/check_cluster
/usr/lib/nagios/plugins/check_dhcp
/usr/lib/nagios/plugins/check_dig
/usr/lib/nagios/plugins/check_disk
/usr/lib/nagios/plugins/check_disk_smb
/usr/lib/nagios/plugins/check_dns
/usr/lib/nagios/plugins/check_dummy
/usr/lib/nagios/plugins/check_file_age
/usr/lib/nagios/plugins/check_flexlm
/usr/lib/nagios/plugins/check_fping
/usr/lib/nagios/plugins/check_ftp
/usr/lib/nagios/plugins/check_game
/usr/lib/nagios/plugins/check_hpjd
/usr/lib/nagios/plugins/check_http
/usr/lib/nagios/plugins/check_icmp
/usr/lib/nagios/plugins/check_ide_smart
/usr/lib/nagios/plugins/check_ifoperstatus
/usr/lib/nagios/plugins/check_ifstatus
/usr/lib/nagios/plugins/check_imap
/usr/lib/nagios/plugins/check_ircd
/usr/lib/nagios/plugins/check_jabber
/usr/lib/nagios/plugins/check_ldap
/usr/lib/nagios/plugins/check_ldaps
/usr/lib/nagios/plugins/check_linux_raid.pl
/usr/lib/nagios/plugins/check_load
/usr/lib/nagios/plugins/check_log
/usr/lib/nagios/plugins/check_mailq
/usr/lib/nagios/plugins/check_mrtg
/usr/lib/nagios/plugins/check_mrtgtraf
/usr/lib/nagios/plugins/check_mysql
/usr/lib/nagios/plugins/check_mysql_query
/usr/lib/nagios/plugins/check_nagios
/usr/lib/nagios/plugins/check_netapp.pl
/usr/lib/nagios/plugins/check_nntp
/usr/lib/nagios/plugins/check_nntps
/usr/lib/nagios/plugins/check_nrpe
/usr/lib/nagios/plugins/check_nt
/usr/lib/nagios/plugins/check_ntp
/usr/lib/nagios/plugins/check_ntp_peer
/usr/lib/nagios/plugins/check_ntp_time
/usr/lib/nagios/plugins/check_nwstat
/usr/lib/nagios/plugins/check_oracle
/usr/lib/nagios/plugins/check_overcr
/usr/lib/nagios/plugins/check_pgsql
/usr/lib/nagios/plugins/check_ping
/usr/lib/nagios/plugins/check_pop
/usr/lib/nagios/plugins/check_procs
/usr/lib/nagios/plugins/check_real
/usr/lib/nagios/plugins/check_rpc
/usr/lib/nagios/plugins/check_sensors
/usr/lib/nagios/plugins/check_simap
/usr/lib/nagios/plugins/check_smtp
/usr/lib/nagios/plugins/check_snmp
/usr/lib/nagios/plugins/check_spop
/usr/lib/nagios/plugins/check_ssh
/usr/lib/nagios/plugins/check_ssmtp
/usr/lib/nagios/plugins/check_swap
/usr/lib/nagios/plugins/check_tcp
/usr/lib/nagios/plugins/check_time
/usr/lib/nagios/plugins/check_udp
/usr/lib/nagios/plugins/check_ups
/usr/lib/nagios/plugins/check_users
/usr/lib/nagios/plugins/check_wave
/usr/lib/nagios/plugins/check_xenvm
/usr/lib/nagios/plugins/eventhandlers
/usr/lib/nagios/plugins/eventhandlers/disable_active_service_checks
/usr/lib/nagios/plugins/eventhandlers/disable_notifications
/usr/lib/nagios/plugins/eventhandlers/distributed-monitoring
/usr/lib/nagios/plugins/eventhandlers/distributed-monitoring/obsessive_svc_handler
/usr/lib/nagios/plugins/eventhandlers/distributed-monitoring/submit_check_result_via_nsca
/usr/lib/nagios/plugins/eventhandlers/enable_active_service_checks
/usr/lib/nagios/plugins/eventhandlers/enable_notifications
/usr/lib/nagios/plugins/eventhandlers/redundancy-scenario1

sbuinosquy
02-Jul-2014, 13:13
Hi kent, i have the same issue with the default nagios installation in sles11... try chmoding 777 the /var/lib/nagios


regards



So far no luck yet and there is no /opt/nagios or /var/nagios, below are the location of nagios files and directories.

etc/apache2/conf.d/nagios.conf
/etc/cron.weekly/suse.de-nagios
/etc/init.d/nagios
/etc/nagios
/etc/nagios/cgi.cfg
/etc/nagios/command.cfg
/etc/nagios/htpasswd.users
/etc/nagios/nagios.cfg
/etc/nagios/nrpe.cfg
/etc/nagios/nsca.cfg
/etc/nagios/objects
/etc/nagios/objects/commands.cfg
/etc/nagios/objects/contacts.cfg
/etc/nagios/objects/localhost.cfg
/etc/nagios/objects/nrpe_check_control.cfg
/etc/nagios/objects/printer.cfg
/etc/nagios/objects/switch.cfg
/etc/nagios/objects/templates.cfg
/etc/nagios/objects/timeperiods.cfg
/etc/nagios/objects/windows.cfg
/etc/nagios/resource.cfg
/etc/nagios/send_nsca.cfg
/etc/sysconfig/nagios
/usr/lib/nagios
/usr/lib/nagios/brokers
/usr/lib/nagios/cgi
/usr/lib/nagios/cgi/avail.cgi
/usr/lib/nagios/cgi/cmd.cgi
/usr/lib/nagios/cgi/config.cgi
/usr/lib/nagios/cgi/extinfo.cgi
/usr/lib/nagios/cgi/histogram.cgi
/usr/lib/nagios/cgi/history.cgi
/usr/lib/nagios/cgi/notifications.cgi
/usr/lib/nagios/cgi/outages.cgi
/usr/lib/nagios/cgi/showlog.cgi
/usr/lib/nagios/cgi/status.cgi
/usr/lib/nagios/cgi/statusmap.cgi
/usr/lib/nagios/cgi/statuswml.cgi
/usr/lib/nagios/cgi/statuswrl.cgi
/usr/lib/nagios/cgi/summary.cgi
/usr/lib/nagios/cgi/tac.cgi
/usr/lib/nagios/cgi/traceroute.cgi
/usr/lib/nagios/cgi/trends.cgi
/usr/lib/nagios/p1.pl
/usr/lib/nagios/plugins
/usr/lib/nagios/plugins/check_apt
/usr/lib/nagios/plugins/check_breeze
/usr/lib/nagios/plugins/check_by_ssh
/usr/lib/nagios/plugins/check_clamd
/usr/lib/nagios/plugins/check_cluster
/usr/lib/nagios/plugins/check_dhcp
/usr/lib/nagios/plugins/check_dig
/usr/lib/nagios/plugins/check_disk
/usr/lib/nagios/plugins/check_disk_smb
/usr/lib/nagios/plugins/check_dns
/usr/lib/nagios/plugins/check_dummy
/usr/lib/nagios/plugins/check_file_age
/usr/lib/nagios/plugins/check_flexlm
/usr/lib/nagios/plugins/check_fping
/usr/lib/nagios/plugins/check_ftp
/usr/lib/nagios/plugins/check_game
/usr/lib/nagios/plugins/check_hpjd
/usr/lib/nagios/plugins/check_http
/usr/lib/nagios/plugins/check_icmp
/usr/lib/nagios/plugins/check_ide_smart
/usr/lib/nagios/plugins/check_ifoperstatus
/usr/lib/nagios/plugins/check_ifstatus
/usr/lib/nagios/plugins/check_imap
/usr/lib/nagios/plugins/check_ircd
/usr/lib/nagios/plugins/check_jabber
/usr/lib/nagios/plugins/check_ldap
/usr/lib/nagios/plugins/check_ldaps
/usr/lib/nagios/plugins/check_linux_raid.pl
/usr/lib/nagios/plugins/check_load
/usr/lib/nagios/plugins/check_log
/usr/lib/nagios/plugins/check_mailq
/usr/lib/nagios/plugins/check_mrtg
/usr/lib/nagios/plugins/check_mrtgtraf
/usr/lib/nagios/plugins/check_mysql
/usr/lib/nagios/plugins/check_mysql_query
/usr/lib/nagios/plugins/check_nagios
/usr/lib/nagios/plugins/check_netapp.pl
/usr/lib/nagios/plugins/check_nntp
/usr/lib/nagios/plugins/check_nntps
/usr/lib/nagios/plugins/check_nrpe
/usr/lib/nagios/plugins/check_nt
/usr/lib/nagios/plugins/check_ntp
/usr/lib/nagios/plugins/check_ntp_peer
/usr/lib/nagios/plugins/check_ntp_time
/usr/lib/nagios/plugins/check_nwstat
/usr/lib/nagios/plugins/check_oracle
/usr/lib/nagios/plugins/check_overcr
/usr/lib/nagios/plugins/check_pgsql
/usr/lib/nagios/plugins/check_ping
/usr/lib/nagios/plugins/check_pop
/usr/lib/nagios/plugins/check_procs
/usr/lib/nagios/plugins/check_real
/usr/lib/nagios/plugins/check_rpc
/usr/lib/nagios/plugins/check_sensors
/usr/lib/nagios/plugins/check_simap
/usr/lib/nagios/plugins/check_smtp
/usr/lib/nagios/plugins/check_snmp
/usr/lib/nagios/plugins/check_spop
/usr/lib/nagios/plugins/check_ssh
/usr/lib/nagios/plugins/check_ssmtp
/usr/lib/nagios/plugins/check_swap
/usr/lib/nagios/plugins/check_tcp
/usr/lib/nagios/plugins/check_time
/usr/lib/nagios/plugins/check_udp
/usr/lib/nagios/plugins/check_ups
/usr/lib/nagios/plugins/check_users
/usr/lib/nagios/plugins/check_wave
/usr/lib/nagios/plugins/check_xenvm
/usr/lib/nagios/plugins/eventhandlers
/usr/lib/nagios/plugins/eventhandlers/disable_active_service_checks
/usr/lib/nagios/plugins/eventhandlers/disable_notifications
/usr/lib/nagios/plugins/eventhandlers/distributed-monitoring
/usr/lib/nagios/plugins/eventhandlers/distributed-monitoring/obsessive_svc_handler
/usr/lib/nagios/plugins/eventhandlers/distributed-monitoring/submit_check_result_via_nsca
/usr/lib/nagios/plugins/eventhandlers/enable_active_service_checks
/usr/lib/nagios/plugins/eventhandlers/enable_notifications
/usr/lib/nagios/plugins/eventhandlers/redundancy-scenario1

***************

ab
02-Jul-2014, 13:48
On 07/02/2014 06:14 AM, sbuinosquy wrote:
>
> Hi kent, i have the same issue with the default nagios installation in
> sles11... try chmoding 777 the /var/lib/nagios

Besides being a two-year-old thread, chmod-ing to 777 seems a bit
excessive. Is there any reason you'd add execute on anything in or
read/write/execute for other (non-user/group-owner) users?

--
Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below...

sbuinosquy
17-Jul-2014, 16:32
of course, but it worked.