New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UI displays Check Timeperiod after check_period removed from Service object #8695
Comments
Hi, Icinga Web 2 only fetches the data from the database (IDO). If Icinga 2 doesn't update this, the UI will show wrong results. |
The Service objects in memory have been updated, the "icinga2 object list --type service" command proves that. But I suppose it is possible what is in memory in Icinga2 is out of sync with what is in the database. I'll dig around some more before closing this, and possibly opening an Icinga2 bug report. |
No need to do that, the issue was already moved there :) |
@julianbrost Thank you for the move! |
I'm in mysql; any hints which table/columns to look at? |
You have to thank @nilmerg for that.
|
Indeed it is still in the database. select display_name, check_timeperiod_object_id from icinga_services where display_name = "NSLCD (LDAP)"; shows for all | NSLCD (LDAP) | 2580 | select * from icinga_timeperiods where timeperiod_object_id = 2580; | 4 | 1 | 1 | 2580 | Weekdays, 9am to 5pm | 09f7e127167a32aae2192362fa3aa3ead94796fa5685f1831cf1d8d9a770203b | |
@nilmerg Thank you for moving the issue here. |
Describe the bug
Removed check_period = "workhours" from Service, causing it to revert to default 24x7.
Dumped Service objects and verified Service no longer has a check_period entry.
Reload page in UI
UI still shows custom check period: "Check Timeperiod | Weekdays, 9am to 5pm"
To Reproduce
Expected behavior
The "Check Timeperiod | Weekdays, 9am to 5pm" should go away.
see check_period.png
Screenshots
See check_icinga.png
Your Environment
Include as many relevant details about the environment you experienced the problem in
icinga2 - The Icinga 2 network monitoring daemon (version: r2.12.1-1)
Copyright (c) 2012-2021 Icinga GmbH (https://icinga.com/)
License GPLv2+: GNU GPL version 2 or later http://gnu.org/licenses/gpl2.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
System information:
Platform: Ubuntu
Platform version: 18.04.5 LTS (Bionic Beaver)
Kernel: Linux
Kernel version: 4.15.0-124-generic
Architecture: x86_64
Build information:
Compiler: GNU 8.4.0
Build host: runner-wytxxqbb-project-298-concurrent-0
OpenSSL version: OpenSSL 1.1.1 11 Sep 2018
PHP 7.2.24-0ubuntu0.18.04.7 (cli) (built: Oct 7 2020 15:24:25) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.24-0ubuntu0.18.04.7, Copyright (c) 1999-2018, by Zend Technologies
Additional context
###before modification (has a custom check_period of business hours)
icinga2 object list --type service >> service.$(date "+%m%d%H%M%Y").txt
grep check_period service.022416142021.txt | grep work | head
###after modification (no custom check_period in Service)
grep check_period service.032210562021.txt | grep work | head
(no output)
The text was updated successfully, but these errors were encountered: