status.dat not created

Ethan Galstad nagios at nagios.org
Wed Dec 3 04:09:39 CET 2003


The status file is only created/updated:

	1. At regular intervals when aggregated updates are enabled 

	and/or

	2. When the status of a host or service changes (i.e. a check is 
performed, a notification occurs, etc.)

Check the log file to make sure the passive checks are being received 
and processed.  I'm guessing that's where the problem lies - if the 
passive checks aren't being processed, there's no reason for Nagios 
to create the status file.  Actually, that might not be totally 
correct.  Nagios should create a status file immediately upon 
startup.  Check your config file to make sure you don't have more 
than one status_file definition, etc.

I would also suggest that you enable aggregated status updates - not 
doing so is a huge waste of CPU/disk time when you have a lot of 
monitoring activity.



On 26 Nov 2003 at 14:42, Marc Powell wrote:

> Hey all,
> 
> I'm starting to play with 2.0a1 (CVS autobuild dated 11/25) and I'm
> having a problem right off the bat. I'm starting with a pretty simple
> compile (only specifying cgi/htmurl) and configuration (3 hosts, 4
> services, 1 contact). The hosts and services are set up to be passive
> --
> 
> (template definitions)
> 
> define host{
>         name                            generic-host   
>         notifications_enabled           1       ; Host notifications
>         are
> enabled
>         event_handler_enabled           1       ; Host event handler
>         is
> enabled
>         flap_detection_enabled          1       ; Flap detection is
> enabled
>         process_perf_data               1       ; Process performance
> data
>         retain_status_information       1       ; Retain status
> information across program restarts
>         retain_nonstatus_information    1       ; Retain non-status
> information across program restarts
>         max_check_attempts              10
>         notification_interval           10080
>         notification_period             24x7
>         notification_options            d,r
> 
>         register                        0       ; DONT REGISTER THIS
> DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
>         }
> 
> # Generic service definition template
> define service{
>         name                            generic-service
>         active_checks_enabled           1       ; Active service
>         checks
> are enabled
>         passive_checks_enabled          1       ; Passive service
>         checks
> are enabled/accepted
>         parallelize_check               1       ; Active service
>         checks
> should be parallelized
>         obsess_over_service             1       ; We should obsess
>         over
> this service (if necessary)
>         check_freshness                 0       ; Default is to NOT
> check service 'freshness'
>         notifications_enabled           1       ; Service
>         notifications
> are enabled
>         event_handler_enabled           1       ; Service event
>         handler
> is enabled
>         flap_detection_enabled          1       ; Flap detection is
> enabled
>         process_perf_data               1       ; Process performance
> data
>         retain_status_information       1       ; Retain status
> information across program restarts
>         retain_nonstatus_information    1       ; Retain non-status
> information across program restarts
>         is_volatile                     0
>         check_period                    none
>         max_check_attempts              5
>         normal_check_interval           5
>         retry_check_interval            3
>         notification_interval           10080
>         notification_period             24x7
>         notification_options            c,r
> 
>         register                        0       ; DONT REGISTER THIS
> DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
>         }
> 
> (example host and service definitions) --
> 
> # Host definition
> define host {
>         use                     generic-host
>         host_name               tnops-cedarbluff-int.knox.tn.ena.net
>         alias                   cedarbluff-int.knox.tn.ena.net address
>                         172.31.73.20 contact_groups     tnops }
> 
> #Service definition
> define service {
>         use                     generic-service
>         host_name               tnops-cedarbluff-int.knox.tn.ena.net
>         service_description     PING contact_groups          tnops
>         check_command           check_ping }
> 
> pre-flight check looks good --
> 
> -bash-2.05b$ bin/nagios -v etc/nagios.cfg
> Nagios 2.0a1
> Copyright (c) 1999-2003 Ethan Galstad (nagios at nagios.org)
> Last Modified: 11-18-2003
> License: GPL
> Reading configuration data...
> Running pre-flight check on configuration data...
> Checking services...
>         Checked 4 services.
> Checking hosts...
>         Checked 3 hosts.
> Checking host groups...
>         Checked 3 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 100 commands.
> Checking time periods...
>         Checked 4 time periods.
> Checking extended host info definitions...
>         Checked 0 extended host info definitions.
> Checking extended service info definitions...
>         Checked 0 extended service info definitions.
> 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
> 
> 
> Nagios starts fine --
> 
> -bash-2.05b$ cat nagios.log
> [1069877273] Nagios 2.0a1 starting... (PID=9588)
> [1069877273] LOG VERSION: 2.0
> [1069877273] Finished daemonizing... (New PID=9589)
> 
> And all the .dat files get created except the most important one,
> status.dat --
> 
> -bash-2.05b$ cd /usr/local/nagios/var
> -bash-2.05b$ ls -al
> total 56
> drwxrwxr-x    4 nagios   nagios       4096 Nov 26 14:07 .
> drwxrwxr-x    7 nagios   nagios       4096 Nov 26 14:13 ..
> drwxrwxr-x    2 nagios   nagios       4096 Nov 25 14:47 archives
> -rw-rw-r--    1 nagios   nagios        240 Nov 26 14:07 comments.dat
> -rw-rw-r--    1 nagios   nagios        241 Nov 26 14:07 downtime.dat
> -rw-r--r--    1 nagios   nagios          5 Nov 26 14:07 nagios.lock
> -rw-r--r--    1 nagios   nagios        216 Nov 26 14:07 nagios.log
> -rw-r--r--    1 nagios   nagios      21153 Nov 26 14:07 objects.cache
> -rw-r--r--    1 nagios   nagios          0 Nov 26 14:07 retention.dat
> drwxrwsr-x    2 nagios   nagios       4096 Nov 26 14:07 rw
> 
> 
> The relevant config file entries are --
> 
> status_file=/usr/local/nagios/var/status.dat
> temp_file=/usr/local/nagios/var/nagios.tmp
> aggregate_status_updates=0
> status_update_interval=5 (not needed)
> 
> I've done an strace on the process (strace -fF -s 512
> /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg) and
> see where all the other dat files are created but don't see where even
> a stat of status.dat is done let alone an open. I've tried submitting
> passive service checks in case that was the key but it's still not
> created.
> 
> Is there something obvious that I've missed? I can be a dork like that
> sometimes.
> 
> --
> Marc
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive?  Does it
> help you create better code?  SHARE THE LOVE, and help us help
> YOU!  Click Here: http://sourceforge.net/donate/
> _______________________________________________
> Nagios-devel mailing list
> Nagios-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-devel
> 



Ethan Galstad,
Nagios Developer
---
Email: nagios at nagios.org
Website: http://www.nagios.org



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/




More information about the Developers mailing list