check_nagios isn't very smart.

Jason Lancaster jason at teklabs.net
Tue Sep 30 19:57:17 CEST 2003


If nagios runs but does not update the status log, the only way to even 
know it is running would be to check for the process in a ps or to see 
if the web interface works (because when nagios is not running you get 
that can't read status.log error) so:

Why don't you eliminate the idea of using check_nagios and use 
check_proc and check_http to monitor your nagios installation. Yeah, 
it's not quite as accurate for those of us who are expecting constant 
updates but for someone like you, this will work perfectly.

This is not the only solution, I just don't see why you're using 
check_nagios if it does not work for you ;)

Jason

jeff vier wrote:

> Okay, I tuned our nagios system, here.
> 
> With an increase in efficiency and "intelligence" there's a lot less
> false alerts.
> 
> However, that in itself is causing another problem.
> 
> Since check_nagios depends on the log being updated to figure out if
> nagios is running, it often thinks it's dead.  We can easily go an hour
> without an update to the log file.
> 
> I fixed this by setting log_service_retries=1, but that seems
> ridiculous.  Turning on what amounts to debugging to trick another
> element of nagios.
> 
> So, my question is, is there another way to watch nagios that doesn't
> cause me to have to pile tons of garbage into my filesystem?
> 
> Some things I was considering, and the reasons I haven't [yet?]:
> 
> option 1 - cron once per 1 min (and have a 2 min nagios_check max):
> 	if [ "`ps -ef |grep nagios|grep -v grep|wc`" -gt 2 ]; then echo "[`date
> +%s`] Heartbeat">> nagios.log; fi
> 
>   problem - What about zombied processes?  I'm falsely assuming 1 or
> more nagios processes means it's okay.
> 
> option 2 - change the nagios_check_command in cgi.cfg to use a script
> with a bunch more logic, but basically use
> 'lynx -head -dump -auth=user:pwd \
> "http://localhost/nagios/cgi-bin/extinfo.cgi?type=1&host=hostname"'
> 
>   problem - I'm depending on http, which I guess is okay, since if http
> is failing, I'd be updating the nagios.log anyway with that error and
> sending out alerts.  also, I have to re-invent the process with, so far,
> unknown feasibility, and I don't have much time to waste if it turns out
> this is a bad idea for reasons I didn't think of (hence my asking).
> 
> Thoughts?  If I do end up figuring out a new way to do it, I'll
> certainly post it.
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> 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:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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