RE: [Nagios-devel] status.dat not created

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

RE: [Nagios-devel] status.dat not created

Post by Guest »

Thanks for the input Ethan. I've made progress but I'm still not seeing
status.dat created. See inline comments --

> -----Original Message-----
> From: Ethan Galstad [mailto:[email protected]]
> Sent: Tuesday, December 02, 2003 9:10 PM
> To: [email protected]
> Subject: Re: [Nagios-devel] status.dat not created
>=20
> The status file is only created/updated:
>=20
> 1. At regular intervals when aggregated updates are enabled
>=20
> and/or
>=20
> 2. When the status of a host or service changes (i.e. a check is
> performed, a notification occurs, etc.)
>=20
> 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.

Actually, I was having a problem with the passive checks. I didn't
realize that iptables was configured on this machine. Once that was
corrected (read 'disabled'), I am able to see nagios accept the passive
check (via strace), but nothing ever gets logged, nor is the status.dat
file ever created. As you mentioned, I would expect nagios to create the
status_file on startup regardless (even if it is with faked info). First
some more relevant config information --

[root@daginbox etc]# grep status_file nagios.cfg
status_file=3D/usr/local/nagios/var/status.dat

[root@daginbox etc]# grep passive nagios.cfg | grep -v "^#"
log_passive_checks=3D1
accept_passive_service_checks=3D1
accept_passive_host_checks=3D1

and these --
aggregate_status_updates=3D1
status_update_interval=3D10

(I have all the logging options enabled as well as compiled with
--enable-DEBUG0 and --enable-DEBUG1 now) Nagios.log only shows --

[1070473990] Nagios 2.0a1 starting... (PID=3D7131)
[1070473990] LOG VERSION: 2.0
[1070474026] Nagios 2.0a1 starting... (PID=3D7169)
[1070474026] LOG VERSION: 2.0
[1070474089] Nagios 2.0a1 starting... (PID=3D7263)
[1070474089] LOG VERSION: 2.0
[1070474138] Nagios 2.0a1 starting... (PID=3D7305)
[1070474138] LOG VERSION: 2.0
[1070474805] Nagios 2.0a1 starting... (PID=3D7565)
[1070474805] LOG VERSION: 2.0



Strace output of nagios reading passive check from command file --

[snip]
[pid 7169] open("/usr/local/nagios/var/retention.dat", O_RDONLY) =3D 4
[pid 7169] fstat64(4, {st_mode=3DS_IFREG|0644, st_size=3D0, ...}) =3D 0
[pid 7169] mmap2(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =3D 0xbeb47000
[pid 7169] read(4, "", 4096) =3D 0
[pid 7169] close(4) =3D 0
[pid 7169] munmap(0xbeb47000, 4096) =3D 0
[pid 7169] time([1070474033]) =3D 1070474033
[pid 7170] ) =3D 0 (Timeout)
[pid 7170] read(3, "[1070474024]
PROCESS_SERVICE_CHECK_RESULT;tnops-rhea-hs.rhea.tn.ena.net;WCCP;0;WCCP
OK: Total Packets Redirected: 30729337\n[1070474024]
PROCESS_SERVICE_CHECK_RESULT;tnops-scott-ecr-cache.scott.tn.ena.net;CACH
ING;0;HTTP ok: HTTP/1.0 =
200
OK - 1 second response time \n[1070474024]
PROCESS_SERVICE_CHECK_RESULT;tnops-rhea-alt.rhea.tn.ena.net;MULTI-EGRESS
;0;EGRESS CHECK OK =
-
All circuits up\n", 4096) =3D 262
[pid 7170] read(3, "", 4096) =3D 0
[pid 7170] select(0, NULL, NULL, NULL, {0, 500000}) =3D 0 (Timeout)
[pid 7170] read(3, "", 4096) =3D 0


...[email truncated]...


This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked