nagios loses the state of some monitors

Uwe Bartels uwe.bartels at gmail.com
Fri Feb 13 12:42:38 CET 2009


Hi

I'm running nagios3 on a linux box since about 3 months. so far everything
went fine with manually added service-definitions.

Now some service-definitions are configured automaticly by a script each
hour. All these service-definitions go into one file and it is always the
same file. The file is created every hour anew. Then nagios is reloaded.
Often the content of the file doesn't change of course.

Now directly after reloading nagios, all those services defined it this file
loose their state and show status=PENDING. Their historical data is still
there.
Other services of these hosts keep their state and show OK (hopefully).

retain_state_information=1
state_retention_file is set and looks valid

The update process works as shown below:
- reload nagios, to check if the configuration is still valid
- backup nagios config
- write the dynamic config file anew (creates the file even if it exists)
- reload nagios (and check config)
- restore config, when "check config" fails

There is nothing in the logfile that shows me something about deleting data.
If I just reload nagios without rewriting this file the state is kept as it
should.

The service definitions are based on the same templates and parameters as
the fixed monitors. here is one exmple:
define service{
        use generic-app-service
        host_name host7
        service_description openmq
        check_command
check_nrpe_raw_t300_arg!check_apps!/nagios/plugins/check_gd_openmq
        notifications_enabled 0

}

generic-app-service is defined as follows:
define service {
  name       generic-app-service
  use        generic-service
  register   0
  action_url /nagios3/pnp/index.php?host=$HOSTNAME$&srv=$SERVICEDESC$
}

generic-service itself I left unchanged.


Does anybody have an idea, what it is or where to look at?
Best Regards,
Uwe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20090213/94aa70c8/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list