Univention Bugzilla – Bug 55017
check_univention_ntp: ValueError: could not convert string to float:
Last modified: 2022-08-03 17:08:43 CEST
The following traceback was reported here: https://help.univention.com/t/monitoring-cron-script-failure/20124/11 Traceback (most recent call last): File “/usr/share/univention-monitoring-client/scripts//check_univention_ntp”, line 46, in NTP.main() File “/usr/lib/python3/dist-packages/univention/monitoring/init.py”, line 74, in main self.write_metrics() File “/usr/share/univention-monitoring-client/scripts//check_univention_ntp”, line 40, in write_metrics ntp_offset = float(output.split(’|’, 1)[-1].split(’;’)[0].split(’=’)[-1].rstrip(‘s’)) ValueError: could not convert string to float: run-parts: /usr/share/univention-monitoring-client/scripts//check_univention_ntp exited with return code 1
One reproducer is for example `systemctl stop ntp.service`. The error has been fixed and a error message is logged instead. The absent() query expression will detect that state. univention-monitoring-client.yaml 0b547b3e50c6 | Bug #55017: fix check_univention_ntp in error conditions univention-monitoring-client (1.0.0-6) 0b547b3e50c6 | Bug #55017: fix check_univention_ntp in error conditions
Attached a customer ticket.
OK: no exception in case of ntp not running, log debug instead
<https://errata.software-univention.de/#/?erratum=5.0x376>