Ways and tweaks to make nagios more efficient. load average on monitoring host edging up.
Kyle O'Donnell
kyleodonnell at gmail.com
Wed Jan 28 21:39:48 CET 2009
no active host checks
just active service checks (few passive too)
To disable change the host definition/template option active_checks_enabled 0
Host checks are done on demand when any service returns a critical
state (maybe a non-OK state I can't remember). This is default nagios
functionality.
The update of your host status check results will only happen when a
host check is intiated. If a service on that host never goes into a
non-OK state it will never execute the host check. If it does it will
execute a host check, if the host is down it will stop executing
service checks, and use your host check_interval to continue executing
host checks, when the host returns to an OK state service check
processing will begin again.
if you want to have a host alive check that does both ssh and ping i
would suggest writing a wrapper plugin which first executes check_ssh
and upon failure executes a ping:
#!/bin/sh
hostaddress=$1
check_ssh $hostaddress
if [ $? -eq 0 ]; then
echo "ssh up = host up"
exit 0
else
check_ping $hostaddress
fi
On 1/28/09, Rahul Nabar <rpnabar at gmail.com> wrote:
> On Wed, Jan 28, 2009 at 1:32 AM, Kyle O'Donnell
> <kyleodonnell at gmail.com>wrote:
>
>> I use service deps. Most of my services are nrpe checks and I create
>> a dep on nrpe. If a check comes back critical (or which ever state
>> you choose to execute the dep) it does an nrpe check, if nrpe returns
>> critical (or whichever state you choose) it stops executing the
>> services dependant on nrpe.
>>
>> My load is less than 2 on a machine with 800 hosts and 6000 services.
>>
>> Active host checks are disabled.
>
>
> So, you have no active checks at all? Or just no active host checks? I am a
> bit confused. All my checks are active. How does one disable active host
> checks? And then when will the host check be done at all?
>
>
>>
>> As for ping I don't check as a service only a host check which gets
>> executed if any service turns critical.
>
>
> That might be the exact functionality I was thinking of. If I look under
> "Host Status Details for all host groups" I see very recent and regular
> checks being done on all my hosts under the column for "Last Check". Even
> ones that do not have any services critical.
>
> Or will I only see the behavior you describe after I somehow disable
> "active
> host checks"?
>
>
>>
>> You can use check_ssh as the host check command instead of ping if you
>> prefer as well.
>>
>
> Good idea. But I still want ping to fall back on. If ssh fails only then
> ping. Is that logical?
>
> --
> Rahul
>
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
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