Nagios running checks way too often

Doug Eubanks admin at dougware.net
Fri Dec 7 06:34:28 CET 2012


I removed the spaces from the command.  I noticed that there were two
Nagios processes running, so I killed them both and restarted Nagios.

Within a few minutes, it was checking the site more often that it should:
Nagios - - [07/Dec/2012:00:29:05 -0500] "GET / HTTP/1.1" 200 22458 "-"
"check_http/v1.4.16 (nagios-plugins 1.4.16)"
Nagios - - [07/Dec/2012:00:29:28 -0500] "GET / HTTP/1.1" 200 22459 "-"
"check_http/v1.4.16 (nagios-plugins 1.4.16)"
Nagios - - [07/Dec/2012:00:30:13 -0500] "GET / HTTP/1.1" 200 22459 "-"
"check_http/v1.4.16 (nagios-plugins 1.4.16)"
Nagios - - [07/Dec/2012:00:31:19 -0500] "GET / HTTP/1.1" 200 22459 "-"
"check_http/v1.4.16 (nagios-plugins 1.4.16)"
Nagios - - [07/Dec/2012:00:31:22 -0500] "GET / HTTP/1.1" 200 22459 "-"
"check_http/v1.4.16 (nagios-plugins 1.4.16)"
Nagios - - [07/Dec/2012:00:31:44 -0500] "GET / HTTP/1.1" 200 22459 "-"
"check_http/v1.4.16 (nagios-plugins 1.4.16)"
Nagios - - [07/Dec/2012:00:32:29 -0500] "GET / HTTP/1.1" 200 22458 "-"
"check_http/v1.4.16 (nagios-plugins 1.4.16)"
Nagios - - [07/Dec/2012:00:33:36 -0500] "GET / HTTP/1.1" 200 22459 "-"
"check_http/v1.4.16 (nagios-plugins 1.4.16)"
Nagios - - [07/Dec/2012:00:33:38 -0500] "GET / HTTP/1.1" 200 22459 "-"
"check_http/v1.4.16 (nagios-plugins 1.4.16)"

Doug Eubanks
admin at dougware.net
K1DUG
(919) 201-8750



On Thu, Dec 6, 2012 at 11:22 AM, Claudio Kuenzler <ck at claudiokuenzler.com>wrote:

>
>
> On Thu, Dec 6, 2012 at 1:13 AM, Doug Eubanks <admin at dougware.net> wrote:
>
>> Of course you are correct, here's one of the services.  According to the
>> site log, it looks like Nagios is firing off three to four requests to the
>> server, each time it's being checked.  These log entries are all from one
>> vhost log file, so it's not like Nagios is checking 4 sites, it's checking
>> the same site 4 times at once.
>>
>> NagiosServer - - [05/Dec/2012:19:09:40 -0500] "GET / HTTP/1.1" 200 22459
>> "-" "check_http/v1.4.16 (nagios-plugins 1.4.16)"
>> NagiosServer - - [05/Dec/2012:19:09:40 -0500] "GET / HTTP/1.1" 200 22459
>> "-" "check_http/v1.4.16 (nagios-plugins 1.4.16)"
>> NagiosServer - - [05/Dec/2012:19:09:40 -0500] "GET / HTTP/1.1" 200 22459
>> "-" "check_http/v1.4.16 (nagios-plugins 1.4.16)"
>> NagiosServer - - [05/Dec/2012:19:09:40 -0500] "GET / HTTP/1.1" 200 22459
>> "-" "check_http/v1.4.16 (nagios-plugins 1.4.16)"
>>
>> define service {
>>         host_name       server
>>         service_description     www.website.com
>>         initial_state   o
>>         is_volatile     0
>>         max_check_attempts      2
>>         normal_check_interval   2
>>         retry_interval  1
>>         first_notification_delay        0
>>         active_checks_enabled   1
>>         passive_checks_enabled  1
>>         check_period    24x7
>>         parallelize_check       1
>>         obsess_over_service     1
>>         check_freshness 1
>>         freshness_threshold     60
>>         event_handler_enabled   1
>>         process_perf_data       1
>>         retain_status_information       1
>>         retain_nonstatus_information    1
>>         notification_interval   4
>>         notification_period     24x7
>>         notifications_enabled   1
>>         action_url
>>  /pnp4nagios/index.php?host=$HOSTNAME$&srv=$SERVICEDESC$
>>         check_command   check_http - vhost - url - string!www.website.com
>> !/!Ap$
>>         icon_image      www.png
>>         display_name    website.com
>>         notification_options    w,u,c,r,f,s
>>         stalking_options        o,w,u,c
>>         contact_groups  Null Placeholder Group
>>         servicegroups   Public Facing Services
>> }
>>
>>
> You're right, the check should only happen every 2 mins
> (normal_check_interval).
> But what looks strange to me is the check_command.
> Do you actually have command definition called "check_http - vhost - url -
> string" ? I'm not sure if spaces are allowed in the definition.
> Can you post the command definition?
>
>
> What happens if you change the check_command to the following:
>
> check_command    check_website!www.website.com!-u /
>
> where the command definition of check_website looks like that:
>
> define command{
>         command_name    check_website
>         command_line    $USER1$/check_http -H $ARG1$ $ARG2$
>         }
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20121207/adb1ef41/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
-------------- 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