I noticed today that on one of our Nagios servers the "Last Check" date is off by a lot and it's on a multiple of servers being monitored. I uploaded a screenshot of one of them and on the server having issues I ran /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg and it came back with nor errors or warnings. I checked the other server and it looks fine and both are on 5.2.9.
Nagios Core 4.1.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-19-2015
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Read object config files okay...
Running pre-flight check on configuration data...
Checking objects...
Checked 1891 services.
Checked 227 hosts.
Checked 5 host groups.
Checked 3 service groups.
Checked 20 contacts.
Checked 5 contact groups.
Checked 132 commands.
Checked 27 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 227 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 27 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
Last Check Date Correct
Last Check Date Correct
You do not have the required permissions to view the files attached to this post.
Re: Last Check Date Correct
Is the PHP and system time in sync? Go to Admin->System Profile->Show Profile, and show us the info under the "Date/Time" section.
Can you also show us the actual config for this object? Does the "Last Check" time change if you force an immediate check?
Can you also show us the actual config for this object? Does the "Last Check" time change if you force an immediate check?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Last Check Date Correct
Good Morning,
The PHP and system time are in sync and I've upload a screenshot of that. I have also uploaded the service configuration file for this host along with the host configuration file. I did try an immediate check and that "Last Check" time did not update, just the "Next Check" time.
--Berto
The PHP and system time are in sync and I've upload a screenshot of that. I have also uploaded the service configuration file for this host along with the host configuration file. I did try an immediate check and that "Last Check" time did not update, just the "Next Check" time.
--Berto
You do not have the required permissions to view the files attached to this post.
Re: Last Check Date Correct
I don't see a "check_command" directive for the "lncpu0201.gcsd.harris.com" host. There is no "use" directive either, so the "check_command" could not be inherited from a template... Without check command, nagios wouldn't know how to perform the check.
Also, can you post the "unixopenoncall_notification_times" timeperiod config?
Also, can you post the "unixopenoncall_notification_times" timeperiod config?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Last Check Date Correct
Here is the timeperiod config you asked for:
define timeperiod {
timeperiod_name unixopenoncall_notification_times
alias Notification Times for unixopenoncall
saturday 00:00-24:00
friday 00:00-24:00
thursday 00:00-24:00
wednesday 00:00-24:00
tuesday 00:00-24:00
monday 00:00-24:00
sunday 00:00-24:00
}
I did notice on the server having issues that there wasn't a "check_command" directive nor a "use" directive either. So I went to the Nagios server that is working and noticed it didn't have a "check_command" either yet it doesn't have the same issue. I upload the host and service config files from the working Nagios server. Below is the timeperiod config for the "unixopenoncall_notification_times" on the working Nagios server.
define timeperiod {
timeperiod_name unixopenoncall_notification_times
alias Notification Times for unixopenoncall
monday 00:00-24:00
tuesday 00:00-24:00
wednesday 00:00-24:00
thursday 00:00-24:00
friday 00:00-24:00
saturday 00:00-24:00
sunday 00:00-24:00
define timeperiod {
timeperiod_name unixopenoncall_notification_times
alias Notification Times for unixopenoncall
saturday 00:00-24:00
friday 00:00-24:00
thursday 00:00-24:00
wednesday 00:00-24:00
tuesday 00:00-24:00
monday 00:00-24:00
sunday 00:00-24:00
}
I did notice on the server having issues that there wasn't a "check_command" directive nor a "use" directive either. So I went to the Nagios server that is working and noticed it didn't have a "check_command" either yet it doesn't have the same issue. I upload the host and service config files from the working Nagios server. Below is the timeperiod config for the "unixopenoncall_notification_times" on the working Nagios server.
define timeperiod {
timeperiod_name unixopenoncall_notification_times
alias Notification Times for unixopenoncall
monday 00:00-24:00
tuesday 00:00-24:00
wednesday 00:00-24:00
thursday 00:00-24:00
friday 00:00-24:00
saturday 00:00-24:00
sunday 00:00-24:00
You do not have the required permissions to view the files attached to this post.
Re: Last Check Date Correct
The host doesn't have a "check_command" defined, but it uses the "xiwizard_linuxserver_host" host template...So I went to the Nagios server that is working and noticed it didn't have a "check_command" either yet it doesn't have the same issue.
If you haven't modified the "xiwizard_linuxserver_host" default template, it would look like this:define host {
host_name lncpu0201.gcsd.harris.com
use xiwizard_linuxserver_host
alias WKM EIT CPU PROD VGon509 CC:wpg
address 172.23.152.21
max_check_attempts 5
check_interval 10
retry_interval 1
check_period unixopenoncall_notification_times
contacts nagiosadmin,unixopenoncall
notification_interval 30
notification_period unixopenoncall_notification_times
notification_options d,u,r,
icon_image redhat.png
statusmap_image redhat.png
_xiwizard linux-server
register 1
}
Code: Select all
define host {
name xiwizard_linuxserver_host
check_command check_xi_host_ping!3000.0!80%!5000.0!100%!!!!
use my_custom_template
contact_groups admins
register 0
}Go to the CCM->Hosts->lncpu0201.gcsd.harris.com->Manage Templates, select "xiwizard_linuxserver_host", click on "Add Selected", Save, Apply Configuration.
Schedule a forced immediate check on this host. Let us know if the "Last Check" time updated.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Last Check Date Correct
Well that was it!! Now I need to understand how that could have happen since I don't ever remember making any changes on that server that could have done that. Thanks again, this thread can be closed.
--Berto
--Berto
Re: Last Check Date Correct
I am glad I could help, Berto! 
Be sure to check out our Knowledgebase for helpful articles and solutions!