Status.log file disappears?

Russell Scibetti rscibetti at opensight.net
Tue Apr 6 20:35:43 CEST 2004


Oh - I misunderstood the email.  status.log does get removed when nagios
stops and gets recreated when nagios starts up again.  It only exists while
Nagios is running.  The status files that don't get removed are status.sav
(for state retention) and nagios.log.

Russell

----- Original Message -----
From: "Thomas Quinlan" <corsis_tom at yahoo.com>
To: <tjapko at xeloq.com>
Cc: <nagios-users at lists.sourceforge.net>
Sent: Tuesday, April 06, 2004 1:44 PM
Subject: Re: [Nagios-users] Status.log file disappears?


> Hi,
>
> Your information got me thinking... I didn't know
> exactly when the file was being "erased".  It turns
> out that it goes away when Nagios is *stopped*.  If I
> stop Nagios, create the file, and then start Nagios,
> the file is there.  (It never goes above 0 bytes
> though.)  If I stop Nagios, the file disappears.
>
> Here is how I create file:
>
> cd /var/nagios
> touch status.log
> chown nagios.nagios status.log
> chmod 0777 status.log
>
> ls -al shows:
>
> drwxrwxr-x    4 nagios   nagios        248 Apr  6
> 13:29 .
> drwxr-xr-x   15 root     root          384 Mar 17
> 02:29 ..
> -rw-r--r--    1 nagios   nagios          0 Dec  3
> 23:41 .keep
> drwxrwxr-x    2 nagios   nagios        392 Apr  6
> 00:00 archives
> -rw-r--r--    1 root     root            6 Apr  6
> 13:27 nagios.lock
> -rw-r--r--    1 nagios   nagios    3779904 Apr  6
> 13:29 nagios.log
> drwxrwsr-x    2 nagios   apache         72 Dec  3
> 23:41 rw
> -rwxrwxrwx    1 nagios   nagios          0 Apr  6
> 13:29 status.log
> -rw-r--r--    1 nagios   nagios          0 Apr  6
> 13:27 status.sav
>
> So I can see the file is there, and that the
> permission s I gave it are correct... and I can start
> Nagios and it will stay there.
>
> Then I do /etc/init.d/nagios stop, and ls -al shows:
>
> drwxrwxr-x    4 nagios   nagios        248 Apr  6
> 13:29 .
> drwxr-xr-x   15 root     root          384 Mar 17
> 02:29 ..
> -rw-r--r--    1 nagios   nagios          0 Dec  3
> 23:41 .keep
> drwxrwxr-x    2 nagios   nagios        392 Apr  6
> 00:00 archives
> -rw-r--r--    1 root     root            6 Apr  6
> 13:27 nagios.lock
> -rw-r--r--    1 nagios   nagios    3779904 Apr  6
> 13:29 nagios.log
> drwxrwsr-x    2 nagios   apache         72 Dec  3
> 23:41 rw
> -rw-r--r--    1 nagios   nagios          0 Apr  6
> 13:27 status.sav
>
> And the file is gone.
>
> If I leave the ownership as root.root, the file still
> disappears.  If I change the permissions to anything
> else, as either owner, the file disappears when Nagios
> is stopped.
>
> I tried entering some text into the file, thinking
> that Nagios might not like a 0 byte file, but that
> didn't make a difference either.
>
> Tom
>
> --- XeloQ Communications <tjapko at xeloq.com> wrote:
> > Hi, I just implemented nagios and ran into the same
> > issue. I ran nagios
> > as a root user and so the file was created as root.
> > When I changed it to owner nagios and gave it all
> > the rights my problems
> > disappeared.  Hope this helps.
> >
> >
> > On Tue, 2004-04-06 at 12:11, Thomas Quinlan wrote:
> > > All,
> > >
> > > I'm new to Nagios, and I seem to have been able to
> > get
> > > it up and running for the most part (though pings
> > only
> > > so far).  When I click around on the various
> > pages, I
> > > always get messages like "It appears Nagios isn't
> > > running, so command/process information isn't
> > > available."  I don't know what these errors mean,
> > when
> > > Nagios is obviously running.
> > >
> > > Also, for "Process Status Information", I always
> > get a
> > > critical error because the log couldn't be opened
> > for
> > > reading.  Checking my nagios.cfg file, the file
> > should
> > > be:
> > > /var/nagios/status.log
> > >
> > > This file doesn't exist.
> > >
> > > If I stop nagios, then create the file, and then
> > start
> > > nagios again, the file disappears (no matter what
> > > permissions or ownership I give it).
> > >
> > > Anyone have any idea why that occurs?
> > >
> > > Thanks.
> > >
> > > Tom
> > >
> > > __________________________________
> > > Do you Yahoo!?
> > > Yahoo! Small Business $15K Web Design Giveaway
> > > http://promotions.yahoo.com/design_giveaway/
> > >
> > >
> > >
> >
> -------------------------------------------------------
> > > This SF.Net email is sponsored by: IBM Linux
> > Tutorials
> > > Free Linux tutorial presented by Daniel Robbins,
> > President and CEO of
> > > GenToo technologies. Learn everything from
> > fundamentals to system
> > >
> >
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> > > _______________________________________________
> > > 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
> > >
> >
> >
> >
> >
> -------------------------------------------------------
> > This SF.Net email is sponsored by: IBM Linux
> > Tutorials
> > Free Linux tutorial presented by Daniel Robbins,
> > President and CEO of
> > GenToo technologies. Learn everything from
> > fundamentals to system
> >
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> > _______________________________________________
> > 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
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Small Business $15K Web Design Giveaway
> http://promotions.yahoo.com/design_giveaway/
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> _______________________________________________
> 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
>



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
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