Right after the update to 5.0-4 errata750, I'm receiving an email every 5 minutes from Cron (univention-monitoring-client)

Hi,

since today, right after the update to 5.0-4 errata 750, I am receiving an email every 5 minutes from Cron now (univention-monitoring-client) with the following content:

Subject: Cron root@SERVERNAME run-parts /usr/share/univention-monitoring-client/scripts/

Traceback (most recent call last):
  File "/usr/share/univention-monitoring-client/scripts//check_univention_ad_connector", line 89, in <module>
    ADConnector.main()
  File "/usr/lib/python3/dist-packages/univention/monitoring/__init__.py", line 73, in main
    self.write_metrics()
  File "/usr/share/univention-monitoring-client/scripts//check_univention_ad_connector", line 51, in write_metrics
    self.write_connector_metrics(len(connectors), connector)
  File "/usr/share/univention-monitoring-client/scripts//check_univention_ad_connector", line 57, in write_connector_metrics
    self.write_metric('univention_ad_connector_ad_reachable', 1 if rc == 0 else 0)
  File "/usr/lib/python3/dist-packages/univention/monitoring/__init__.py", line 81, in write_metric
    g = Gauge(metric_name, doc or self.__doc__ or '', labelnames=list(labels), registry=self._registry)
  File "/usr/lib/python3/dist-packages/prometheus_client/metrics.py", line 320, in __init__
    labelvalues=labelvalues,
  File "/usr/lib/python3/dist-packages/prometheus_client/metrics.py", line 103, in __init__
    registry.register(self)
  File "/usr/lib/python3/dist-packages/prometheus_client/registry.py", line 29, in register
    duplicates))
ValueError: Duplicated timeseries in CollectorRegistry: {'univention_ad_connector_ad_reachable'}
run-parts: /usr/share/univention-monitoring-client/scripts//check_univention_ad_connector exited with return code 1 Checking NTP time failed: NTP CRITICAL: Offset unknown|

Maybe related to this update: Security and bugfix errata for Univention Corporate Server

In the meantime, in order to stop the email flooding I have disabled the according cron-job:
ucr set monitoring/client/cron=’#*/5 * * * *’

Any hint for how to further troubleshoot/analyze or fix this, would be much appreciated.

Thx and best regards
Thomas

For me the issue was fixed via errata 750:

https://errata.software-univention.de/#/?erratum=5.0x750

thx for having a look SirTux.

So this part of the email reminds me to a another open issue:
Checking NTP time failed: NTP CRITICAL: Offset unknown

Seems UCS staff considers this as not relevant … :frowning:
Here’s the link to the other still open issue with “NTP time failed”:

I have the feeling this might be connected.
Still no idea how to further analyze or fix this issue :frowning:

I had the same problem on a Backup Directory node and found that in the Computer-Settings, it had all kinds of warning scripts enabled. I disabled the ones containing reference to AD and the error emails stopped.

But would be great if we could get a list of default warning scripts for the different server roles.

It is quite possible that the scripts I have disabled should be there and that one of the scripts has a bug…

thx for your solution proposal, I wasn’t aware about this option yet.

My temp solution currently is to remove the according script (check_univention_ad_connector) from here:
/usr/share/univention-monitoring-client/scripts

I can confirm that the latest errata update fixed the issue for me.
https://errata.software-univention.de/#/?erratum=5.0x752

So everything is back to normal :wink:

Mastodon