Page 1 of 3
Device check-time reset on process restart
Posted: Mon Nov 11, 2013 1:33 am
by NagAlf
Hi!
I've in Nagios list one (server) device (first in host detail list as by name) which control-times is always reset when I restart Nagios processes. Something I missed?
More thanks, Alar.
Re: Device check-time reset on process restart
Posted: Mon Nov 11, 2013 11:40 am
by abrist
NagAlf wrote:control-times
Could you clarify?
Re: Device check-time reset on process restart
Posted: Tue Nov 12, 2013 2:13 am
by NagAlf
Hi and thanks!
Ok, I'm trying to.
When I click on Host Detail (in Monitoring section on left side) then all hosts appear nicely and 4-th column is as Duration. I see there some servers 83 days up (since I start using Nagios), some ws's just a few hours after morning start etc. And this does not change (for most of hosts) when I restart Nagios service. That's ok. But there is one server (which is up 24x7) which Duration starts from 0 every time I restart Nagios service. It's listed as first (alphabetically). Don't know why this happen in Nagios with this host.
More thanks, Alar.
Re: Device check-time reset on process restart
Posted: Tue Nov 12, 2013 11:35 am
by sreinhardt
So basically all of your hosts but one, properly show uptime, or last state change times. However one of them seems to reset to 0 every time you restart the nagios daemon.
Have you done any optimizations such as creating an objects.precache file?
What type of a host check is the problematic host using to verify uptime?
Are any other hosts\services doing this same check?
If so are they also having the same effect?
Re: Device check-time reset on process restart
Posted: Tue Nov 12, 2013 11:41 am
by NagAlf
Hi and thanks!
Yes, all but one. Nope, no optimization, at least I'm aware of. In description it should and does check only device up/down, no services to check. Yes, I've also other devices described in such a way (most of those), no problems.
More thanks, Alar.
Re: Device check-time reset on process restart
Posted: Tue Nov 12, 2013 1:35 pm
by lmiltchev
Can you post the check and the command definitions of a check that does work, and one that doesn't?
Re: Device check-time reset on process restart
Posted: Thu Nov 14, 2013 5:37 am
by NagAlf
Hi and thanks!
Nothing much, really. First one does work wo clearing time, another not. Changed positions, same. (I've changed names and IP's etc. below.)
define host{
use linux-server ; Name of host template to use
host_name IPtrykk
alias iTrykk
address <ip>
}
define hostextinfo{
host_name IPtrykk
action_url http://<>
icon_image x.png
}
define host{
use linux-server ; Name of host template to use
host_name FAILER
alias Failer
address <ip>
}
define hostextinfo{
host_name FAILER
action_url http://<>
icon_image x.png
}
More thanks, Alar.
Re: Device check-time reset on process restart
Posted: Thu Nov 14, 2013 4:16 pm
by sreinhardt
Hmm, so nothing different between them there, just for completeness, could you post the linux-server template. Also what version of core are you running?
Re: Device check-time reset on process restart
Posted: Fri Nov 15, 2013 9:44 am
by NagAlf
Hi and thanks!
define host{
name linux-server ; The name of this host template
use generic-host ; This template inherits other values from the generic-host template
check_period 24x7 ; By default, Linux hosts are checked round the clock
check_interval 5 ; Actively check the host every 5 minutes
retry_interval 1 ; Schedule host check retries at 1 minute intervals
max_check_attempts 10 ; Check each Linux host 10 times (max)
check_command check-host-alive ; Default command to check Linux hosts
notification_period workhours ; Linux admins hate to be woken up, so we only notify during the day
; Note that the notification_period variable is being overridden from
; the value that is inherited from the generic-host template!
notification_interval 120 ; Resend notifications every 2 hours
notification_options d,u,r ; Only send notifications for specific host states
contact_groups admins ; Notifications get sent to the admins by default
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}
Ja-jaa, I'm using Nagios version 3.0.6, bundled with SLES 11. Jah, I know. =)
More thanks, Alar.
Re: Device check-time reset on process restart
Posted: Fri Nov 15, 2013 10:11 am
by NagAlf
Hi again!
Well, tried to rename this host (in cfg-file), changed IP-address, changed template to use, even moved it to another group file (into windows.cfg) etc., but still ... .Odd!
Alar.