[Fwd: Re: Uptime error]
Andy Shellam (Mailing Lists)
andy.shellam-lists at mailnetwork.co.uk
Wed Feb 28 15:00:00 CET 2007
A hostname check would be much more informative, or check_nrpe - if the
other guy in your office doesn't have NRPE installed, then a check_nrpe
will fail.
Note that the way you have it setup, check_uptime will always run on the
Nagios server, regardless, because it's a local plugin. So whatever the
IP of your router (Nagios machine), it will always succeed. You need to
be using NRPE in conjunction with it to get it to check by IP address.
Even that will always succeed at the moment because your IP in your
Nagios configuration is 127.0.0.1, which will always refer to itself.
You're much better off having this as a service. For every host in my
install I have a "Server Availability" service which is a check_ping, as
this constantly monitors that the servers are up and responding, every
minute, and doesn't create any havoc from host checks being run too often.
Andy.
-------- Original Message --------
Subject: Re: [Nagios-users] Uptime error
Date: Wed, 28 Feb 2007 19:12:50 +0530
From: sujith h <sujith.linux at gmail.com>
To: Andy Shellam (Mailing Lists) <andy.shellam-lists at mailnetwork.co.uk>
References:
<e4a2c74c0702270529r7c2b719alc208749e276eceed at mail.gmail.com>
<e4a2c74c0702280059r1cb9502eqffdf969b9f4a9ffa at mail.gmail.com>
<e4a2c74c0702280105w7b0a70a5v5d75868d497a65f6 at mail.gmail.com>
<45E5488D.8030103 at mailnetwork.co.uk>
<e4a2c74c0702280153g463c9f89pb0b5bd944f96c3ce at mail.gmail.com>
<45E55309.2050101 at mailnetwork.co.uk>
<e4a2c74c0702280222l2259ed83y70d1f36eb58b08 at mail.gmail.com>
<45E55A3F.20503 at mailnetwork.co.uk>
<e4a2c74c0702280333g5a41d7f0y776286187e1d1cde at mail.gmail.com>
<45E56942.8030701 at mailnetwork.co.uk>
Actually we used check_ping till 5 months before and then we decided to
move on to uptime .
The reason is that suppose I have a machine named don whose ip is
192.102.1.2 <http://192.102.1.2>
and if my machine is down for 1 day. And some other guy in my office
started his machine
his dhcpclient will run and give my ip (Think as if for the time being).
Now the ping will
work in any case but the uptime wont. So that is why I decided to move
on with uptime
in Host check.
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:
You can do it by setting scheduled host checks, but it's very
performance-intensive, and *will* affect your service checks.
Your uptime check will do what you want much better if you add it as
a service to your host.
Why are you so insistent you don't want to use check_ping as your
host command and Uptime as a service?
Andy.
sujith h wrote:
> The use of option : use_aggressive_host_checking=1
> in the nagios.cfg file will make any difference???
>
> 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:
>
> 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 <http://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.
>>
>
>
--
Andy Shellam
NetServe Support Team
the Mail Network
"an alternative in a standardised world"
p: +44 (0) 121 288 0832/0839
m: +44 (0) 7818 000834
!DSPAM:37,45e58730103001671241165!
--
Andy Shellam
NetServe Support Team
the Mail Network
"an alternative in a standardised world"
p: +44 (0) 121 288 0832/0839
m: +44 (0) 7818 000834
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20070228/cad51179/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