Univention Bugzilla – Bug 54927
mails from cron every 5 minutes if Prometheus isn't installed
Last modified: 2022-07-06 17:03:01 CEST
Since installing univention-monitoring-client via automatic errata upgrades I receive one mail from cron every five minutes as I don't have Prometheus installed (and don't want it installed either) for each of my UCS nodes: From: root@brattain.bs.linet-services.de (Cron Daemon) Subject: Cron <root@brattain> run-parts /usr/share/univention-monitoring-client/scripts/ To: root@brattain.bs.linet-services.de Date: Sun, 3 Jul 2022 17:45:03 +0200 (CEST) (15 hours, 34 minutes ago) Flags: seen Maildir: /ls/admin Traceback (most recent call last): File "/usr/share/univention-monitoring-client/scripts//check_univention_dns", line 46, in <module> DNS.main() File "/usr/lib/python3/dist-packages/univention/monitoring/__init__.py", line 73, in main with open(os.path.join(NODE_EXPORTER_DIR, '%s.prom' % (plugin,)), 'w') as self._fd: FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/prometheus/node-exporter/check_univention_dns.prom' run-parts: /usr/share/univention-monitoring-client/scripts//check_univention_dns exited with return code 1 Traceback (most recent call last): File "/usr/share/univention-monitoring-client/scripts//check_univention_i2o_raid", line 96, in <module> I2O_RAIDCheck.main() File "/usr/lib/python3/dist-packages/univention/monitoring/__init__.py", line 73, in main with open(os.path.join(NODE_EXPORTER_DIR, '%s.prom' % (plugin,)), 'w') as self._fd: FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/prometheus/node-exporter/check_univention_i2o_raid.prom' run-parts: /usr/share/univention-monitoring-client/scripts//check_univention_i2o_raid exited with return code 1 Traceback (most recent call last): File "/usr/share/univention-monitoring-client/scripts//check_univention_joinstatus", line 170, in <module> JoinStatusCheck.main() File "/usr/lib/python3/dist-packages/univention/monitoring/__init__.py", line 73, in main with open(os.path.join(NODE_EXPORTER_DIR, '%s.prom' % (plugin,)), 'w') as self._fd: FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/prometheus/node-exporter/check_univention_joinstatus.prom' … I can deactivate those cron jobs via the UCR variable, true, but the scripts MUST check if they can actually do something & avoid creating all that spam. After the automatic upgrades yesterday morning I've received more than 2000 of those mails.
This should be fixed by doing `mkdir /var/lib/prometheus/node-exporter/` ?!
The package univention-monitoring-client now ships the missing directory. univention-monitoring-client.yaml 2939c7c000c8 | Bug #54927: prevent errors if prometheus node exporter is not installed univention-monitoring-client (1.0.0-3) 2939c7c000c8 | Bug #54927: prevent errors if prometheus node exporter is not installed
Ok, Error does not occur anymore with 2939c7c000c8
<https://errata.software-univention.de/#/?erratum=5.0x345>