Thruk
Thruk copied to clipboard
Missing validity-check when entering date for "Downtime"
It is possible to enter dates for Downtime that are "beyond" 2038-01-19, which translates to a negative timestamp. These dates can not be handled very well by Nagios.
It would be cool to prohibit such dates.
Thruk Version: 2.46-2 (from ConsolLabs) Nagios: 4.4.6
-- Dan
What kind of linux is that? And is it 32 or 64bit?
This is on Nagios running on a RedHat Server.
$ uname -a
Linux nagios 3.10.0-1160.49.1.el7.x86_64 #1 SMP Tue Nov 9 16:09:48 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.9 (Maipo)
Just tested this. I can confirm the issue. But i'd say this should be fixed in the nagios core instead. As a workaroud you could set the downtime_max_duration
to a couple of years:
http://thruk.org/documentation/configuration.html#_downtime_max_duration
Thanks for the Feedback.
Good idea!
Regards, Dan
Btw, i just checked the naemon source which should be still quite similar to nagios in those areas and it uses the time_t type which is 64bit after linux 5.6 from 2020. So the issue should be fine once you update on rhel/rocky 8 or 9. Also i noticed an issue in the livestatus module, but this should be fixed separately.