RE: [Nagios-users] Reloading nagios config

2006-05-24 Thread Tiernan, Michael C.
I have found that since /etc/init.d/nagios is unavailable to the nagios
user since it requires root privs (in my paranoid world), I created a
simple script owned by nagios itself called "trigger-restart" based on
one of the samples which says:

# This is a sample shell script showing how you can submit the
RESTART_PROGRAM command
# to Nagios.  Adjust variables to fit your environment as necessary.

now=$( ${DATE} +%s )
commandfile='/usr/local/nagios/var/rw/nagios.cmd'

${PRINTF} "Requesting restart at [%lu]\n" ${now}
${PRINTF} "[%lu] RESTART_PROGRAM\n" ${now} > ${commandfile}


This gives me a reliable restart/reload without having to be worried
about zombies.

I have a "check" command done before this on the current config files to
make sure there's no surprises coming my way too, if it passes, it does
the restart.


---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
___
Nagios-users mailing list
Nagios-users@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


RE: [Nagios-users] Reloading nagios config

2006-05-24 Thread Marc Powell


> -Original Message-
> From: jeff vier [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 24, 2006 10:01 AM
> To: Marc Powell
> Cc: nagios-users@lists.sourceforge.net
> Subject: RE: [Nagios-users] Reloading nagios config
> 
> On Wed, 2006-05-24 at 09:53 -0500, Marc Powell wrote:
> > > And when you get "weirdness" with your CGIs the phrase you'll be
> > looking
> > > for is 'zombie processes'.
> > That should only occur on restart, when a new daemon is started, not
> > reload since the currently running daemon is maintained.
> 
> "should", perhaps.
> 
> It's bitten me.
> 
> Any zombies would maintain the old config, no?
> 
> I can say, for sure, I have seen it with my server here.
> I've gotten out of the habit of using reload long ago, so, perhaps
it's
> fixed, but it also seems logical to me that it could cause the zombie
> problem.

I've just switched from using restarts to reloads a week ago so we'll
see if it crops up ;)

My understanding of the issue (from personal experience) is that a
restart didn't always kill the old daemon before starting the new one,
resulting in two (or more, after several restarts) daemons running and
writing to the same status files. Since a reload doesn't spawn a new
daemon process, the problem shouldn't occur. It seems I might not have a
complete understanding...

--
Marc

--
Marc


---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642
___
Nagios-users mailing list
Nagios-users@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


RE: [Nagios-users] Reloading nagios config

2006-05-24 Thread jeff vier
On Wed, 2006-05-24 at 09:53 -0500, Marc Powell wrote:
> > And when you get "weirdness" with your CGIs the phrase you'll be
> looking
> > for is 'zombie processes'.
> That should only occur on restart, when a new daemon is started, not
> reload since the currently running daemon is maintained.

"should", perhaps.

It's bitten me.

Any zombies would maintain the old config, no?

I can say, for sure, I have seen it with my server here.
I've gotten out of the habit of using reload long ago, so, perhaps it's
fixed, but it also seems logical to me that it could cause the zombie
problem.


signature.asc
Description: This is a digitally signed message part


RE: [Nagios-users] Reloading nagios config

2006-05-24 Thread Marc Powell


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:nagios-users-
> [EMAIL PROTECTED] On Behalf Of Ben O'Hara
> Sent: Wednesday, May 24, 2006 9:37 AM
> To: Oliver Marshall
> Cc: Aaron K. Moore; Norman Harebottle;
nagios-users@lists.sourceforge.net
> Subject: Re: [Nagios-users] Reloading nagios config
> 
> On 5/24/06, Oliver Marshall <[EMAIL PROTECTED]> wrote:
> 
>   For the sake of google, using Mandriva (and prob loads others),
you
> can
>   do this to reload the nagios config files;
> 
>   /etc/init.d/nagios reload
> 
>   Olly
> 
> 
> Is this actually nagios related or general *nix admin skills?

All daemons and init scripts are not created equal ;) Whether or not
reload works and what it actually does depends on the application.

For the OP, it works with all versions of nagios --

http://nagios.sourceforge.net/docs/2_0/stoprestart.html

--
Marc


---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642
___
Nagios-users mailing list
Nagios-users@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


RE: [Nagios-users] Reloading nagios config

2006-05-24 Thread Marc Powell


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:nagios-users-
> [EMAIL PROTECTED] On Behalf Of jeff vier
> Sent: Wednesday, May 24, 2006 9:33 AM
> To: Oliver Marshall
> Cc: nagios-users@lists.sourceforge.net
> Subject: Re: [Nagios-users] Reloading nagios config
> 
> On Wed, 2006-05-24 at 13:32 +0100, Oliver Marshall wrote:
> > For the sake of google, using Mandriva (and prob loads others), you
can
> > do this to reload the nagios config files;
> >
> > /etc/init.d/nagios reload
> 
> And when you get "weirdness" with your CGIs the phrase you'll be
looking
> for is 'zombie processes'.
> 
> Just for future reference.

That should only occur on restart, when a new daemon is started, not
reload since the currently running daemon is maintained.

--
Marc


---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] Reloading nagios config

2006-05-24 Thread Ben O'Hara
On 5/24/06, Oliver Marshall <[EMAIL PROTECTED]> wrote:
For the sake of google, using Mandriva (and prob loads others), you cando this to reload the nagios config files;/etc/init.d/nagios reloadOllyIs this actually nagios related or general *nix admin skills?
Ben -- "A Scientist will earn a living by taking a really difficult problem and spends many years solving it, an engineer earns a living by finding really difficult problems and side stepping them"


Re: [Nagios-users] Reloading nagios config

2006-05-24 Thread jeff vier
On Wed, 2006-05-24 at 13:32 +0100, Oliver Marshall wrote:
> For the sake of google, using Mandriva (and prob loads others), you can
> do this to reload the nagios config files;
> 
> /etc/init.d/nagios reload

And when you get "weirdness" with your CGIs the phrase you'll be looking
for is 'zombie processes'.

Just for future reference.


signature.asc
Description: This is a digitally signed message part