Page 1 of 1
Check Period
Posted: Fri Nov 26, 2021 7:17 am
by Aldo Lanfranconi
Hello, I have a server monitored With Nagios, I have configured a Service Check, but this service is not running 24x7, so I have also defined a check time period [from monday to friday, should start checking at 10.00AM and end checking at 01:00AM]
So, then, on the service check I have configured to use my custom Check Period
But, it is still showing as CRITICAL, now is Friday 9:13 AM
What am I doing Wrong?
Re: Check Period
Posted: Mon Nov 29, 2021 11:26 am
by pbroste
Hello
@Aldo Lanfranconi
Thanks for reaching out, want to verify that the system date/time/timezone are sync'ed across all.
Code: Select all
date
ls -l /etc/localtime
php -r 'echo date("D M j G:i:s T Y")."\n";'
grep "date.timezone =" /etc/php.ini
grep date.timezone /etc/php.ini
mysql -h 127.0.0.1 -uroot -pnagiosxi -e 'SELECT NOW(); SELECT @@GLOBAL.time_zone, @@SESSION.time_zone;'
Update, and restart the services by bouncing nagios, mysqld, and apache.
Thanks,
Perry
Re: Check Period
Posted: Sat Dec 04, 2021 9:01 pm
by Aldo Lanfranconi
Hello, I did it, and it is still showing as critical when should not.
Re: Check Period
Posted: Mon Dec 06, 2021 1:09 pm
by pbroste
Hello
@Aldo Lanfranconi
Thanks for following up, sounds like there is a "ghost" config hanging around and want to have you run through the index/delete.
[*]Reindex the Core Configuration Manager (CCM) configs[/*]
- rm -rf /usr/local/nagios/etc/import/*
- 1: Terminal command list all running /bin/nagios -> ps -aux | grep -E '/bin/nagios'
- 2: Terminal command -> killall -9 nagios (or pkill nagios)
- 3: Terminal command check to see if /bin/nagios processes are stopped
- 4: Nagios XI web console
==> Core Configuration Manager (CCM)
==> Config File Management
==> [Delete Files]
==> [Write Files]
==> [Verify Files]
- 6: Core Configuration Manager (CCM)
==> Under Quick Tools
==> "Apply Configuration"
- 7: Restart nagios.service by terminal command: systemctl restart nagios
[list]
[/list]
Verify that the host and services look good in pre-flight with no errors in core by:
Code: Select all
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Please PM your updated system profile if the issue persists.
To send us your system profile.
- Login to the Nagios XI GUI using a web browser.
- Click the "Admin" > "System Profile" Menu
- Click the "Download Profile" button
- Save the profile.zip file and send via Private Message
Thanks,
Perry
Re: Check Period
Posted: Thu Dec 16, 2021 5:21 am
by Aldo Lanfranconi
OK, I have sent you a PM.
Thanks
Re: Check Period
Posted: Thu Dec 16, 2021 3:55 pm
by pbroste
Hello
@Aldo Lanfranconi
Thanks for sending over the Profile, took a look through it and do not see a timeperiod listed that matches the name of the screenshot that you provided. May not have stuck.
timeperiod_name 24x7
timeperiod_name 24x7_sans_holidays
timeperiod_name LaV 10a23.59
timeperiod_name LaV 7a20
timeperiod_name nagiosadmin_notification_times
timeperiod_name none
timeperiod_name us-holidays
timeperiod_name workhours
timeperiod_name xi_timeperiod_24x7
timeperiod_name xi_timeperiod_none
Please verify with you instance by going to the web console for the 'LaV 10a01' timeperiod and select each of the config's and 'Apply Configuration. Verify by checking the configs.
Please let us know how things look,
Perry
Re: Check Period
Posted: Mon Dec 20, 2021 12:04 pm
by Aldo Lanfranconi
I did rename 'LaV 10a01' to 'LaV 10a23.59' before to send info to you.
Re: Check Period
Posted: Mon Dec 20, 2021 2:47 pm
by pbroste
Hello
@Aldo Lanfranconi
Thanks for following up, we see from the System Profile config does not match what you entered/saved on the screenshot.
}
define timeperiod {
timeperiod_name LaV 10a23.59
alias Lunes a Viernes 10 a 23.59
monday 00:00-23:59
tuesday 00:00-23:59
wednesday 00:00-23:59
thursday 00:00-23:59
friday 00:00-23:59
}
Want to have you bring up the configuration for the timeperiod_name 'LaV 10a23.59' update each field by clicking through. Save and Apply configuration. Verify the config's with re-index and then update the System Profile.
- 1: Nagios XI web console
==> Core Configuration Manager (CCM)
==> Config File Management
==> [Delete Files]
==> [Write Files]
==> [Verify Files]
- 2: Core Configuration Manager (CCM)
==> Under Quick Tools
==> "Apply Configuration"
- 3: Restart nagios.service by terminal command: systemctl restart nagios
[list]
[/list]
Verify that the updates to timeperiod config stuck:
Code: Select all
cat /usr/local/nagios/etc/timeperiods.cfg | grep -Ei '23.59' -A 12 -B 1
Please PM your updated system profile if the issue persists.
To send us your system profile.
- Login to the Nagios XI GUI using a web browser.
- Click the "Admin" > "System Profile" Menu
- Click the "Download Profile" button
- Save the profile.zip file and send via Private Message
Thanks,
Perry