check-host-alive pinging every second?

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
pixelpshr
Posts: 14
Joined: Sun Feb 23, 2014 7:51 am

Re: check-host-alive pinging every second?

Post by pixelpshr »

I don't think so. I don't have any service groups defined yet, and my host groups all look like this:

Code: Select all

define hostgroup{
    hostgroup_name      comm-servers
    alias               Communications servers
    members             forum-server,mail-server
}
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: check-host-alive pinging every second?

Post by abrist »

Do you have ""hostgroup_name" defined on any of your services?
Are multiple nagios parent processes running?

Code: Select all

ps -aef | grep nagios.cfg
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
pixelpshr
Posts: 14
Joined: Sun Feb 23, 2014 7:51 am

Re: check-host-alive pinging every second?

Post by pixelpshr »

No, only one nagios process and no occurrences of "host group_name" outside of the host group definitions.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: check-host-alive pinging every second?

Post by lmiltchev »

Can you open the "objects.cache" file, find the "web-server" host, copy the host definition, and post it?
Be sure to check out our Knowledgebase for helpful articles and solutions!
pixelpshr
Posts: 14
Joined: Sun Feb 23, 2014 7:51 am

Re: check-host-alive pinging every second?

Post by pixelpshr »

I've changed its label to be "forum-server", but the data hasn't changed. There does seem to be one strange thing in here. Both the high- and low-flap-threshold values are 0.0000. I don't know if that could be the problem.

Code: Select all

define host {
	host_name	forum-server
	alias	Forum Server
	address	xxx.xxx.xxx.xxx
	check_period	24x7
	check_command	check-host-alive
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	check_interval	5.000000
	retry_interval	1.000000
	max_check_attempts	10
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess_over_host	0
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	o,d,u
	freshness_threshold	0
	check_freshness	0
	notification_options	d,u,r
	notifications_enabled	1
	notification_interval	120.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	failure_prediction_enabled	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: check-host-alive pinging every second?

Post by scottwilkerson »

I have to ask, do other host/services depend on this host? I ask because your cached_host_check_horizon in your nagios.cfg is set to 15.

This means if the check is older that 15 seconds when a dependent host/service is being checked, Nagios will trigger a check of the host, because the current check is no longer considered valid.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
pixelpshr
Posts: 14
Joined: Sun Feb 23, 2014 7:51 am

Re: check-host-alive pinging every second?

Post by pixelpshr »

No, I have 5 hosts and no dependencies defined.

There was another parameter that I wondered about. The "command_check_interval" was set to -1, which means check as often as possible. Does that have anything to do with the "check_host_alive" command?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: check-host-alive pinging every second?

Post by slansing »

That is a curious one, you could try switching it back to a value of 60 and restart nagios, then check to see if they are still hitting your hosts that often. Though this does seem to be a all inclusive definition, for all commands, so if it was having an effect you'd think it would be having the same effect on services. Let us know if this causes any change in this odd behavior.
prandal
Posts: 8
Joined: Mon Nov 19, 2012 5:23 am

Re: check-host-alive pinging every second?

Post by prandal »

What's your interval_length set to in nagios.cfg?

It should be 60.

Format: interval_length=<seconds>
Example: interval_length=60

This is the number of seconds per "unit interval" used for timing in the scheduling queue, re-notifications, etc. "Units intervals" are used in the object configuration file to determine how often to run a service check, how often to re-notify a contact, etc.

Important: The default value for this is set to 60, which means that a "unit value" of 1 in the object configuration file will mean 60 seconds (1 minute). I have not really tested other values for this variable, so proceed at your own risk if you decide to do so!

Edit: Oh, I see you say it's 60. Make sure you don't have a second definition revising it downwards
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: check-host-alive pinging every second?

Post by slansing »

Thank you for the help and input prandal.
Locked