Uptime error

Andy Shellam (Mailing Lists) andy.shellam-lists at mailnetwork.co.uk
Wed Feb 28 11:32:31 CET 2007


sujith h wrote:
> I think i foregot to explain a crucial point that nagios is running in 
> my router not in my
> machine. If i had told u my machine, then I really apolagise for 
> stealing your precious
> time. 

No, I understand that.

> And is there anyway that I can trigger the check_uptime (plugin 
> written by me)
> all the time when the router is up???

Yes.  Define it as a service for your host that runs, say, every 5 
minutes 24x7.

> . If so please do tell me. If the router is down and
> nagios doesnt run then its ok for me. Since that is a different issue. 
> But from your reply
> I came to understand that check_uptime will be called for the first 
> time when the nagios
> is started and then if any of the services fails then again the 
> check_uptime is called.

Yes.  Nagios only checks a host status when it absolutely needs to, not 
any other time.  This is usually when a service fails, or a network 
blockage is detected.  check_ping to 127.0.0.1 on this check would work 
fine in your case.

Andy.

>
>
> Sujith
>
> Bangalore.
>
> On 2/28/07, *Andy Shellam (Mailing Lists) * 
> <andy.shellam-lists at mailnetwork.co.uk 
> <mailto:andy.shellam-lists at mailnetwork.co.uk>> wrote:
>
>     Again, as I and Patrick have said, your host's check_command is
>     only getting run when a service is deemed to have problems.
>
>     You're getting the difference in the uptime output in Nagios and
>     the console because Nagios hasn't run the uptime command for the
>     host for over a day.
>     If you're not retaining status information, then when you restart
>     Nagios, it re-runs all it's checks, hence why it then gets
>     updated.  After that it is only run when a service fails.
>
>     What I still don't understand is how your uptime command ensures
>     the router is up?  If the router is not up, then Nagios won't be
>     running (as you're running it on the same host) so it seems quite
>     pointless really.  If the Lanlink checks that the LAN interface is
>     up and connected - that makes sense, but then a check_ping to
>     127.0.0.1 <http://127.0.0.1> as your host check_command would give
>     the same result as the uptime, then you could have an "Uptime"
>     service with your check_uptime command. 
>
>     That way you could be confident that the status detail in Nagios
>     is reasonably up-to-date.
>
>     Andy.
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20070228/9ab3a55e/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
-------------- next part --------------
_______________________________________________
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