Univention Bugzilla – Bug 51869
Regression: false positive warning in nagios check of ad-connector
Last modified: 2021-06-02 17:09:28 CEST
With the changes in Bug #49168 and Bug #50676 the nagios check for univention-ad-connector will report false positive warning if more the one ad connector is running, which having a different --configbase root@backup131:~# ps auxf | grep univention.connector.ad.main | grep -v grep root 30748 0.0 5.8 611756 60024 ? S 22:31 0:00 /usr/bin/python2.7 -W ignore -m univention.connector.ad.main --configbase connector-gym-4 root 30800 0.0 5.8 611148 59552 ? S 22:31 0:00 /usr/bin/python2.7 -W ignore -m univention.connector.ad.main --configbase connector-gym-3 root@backup131:~# /usr/lib/nagios/plugins/check_univention_ad_connector ADCONNECTOR CRITICAL: AD connector is not running! I propose to change the check for the processes in L92 from /usr/lib/nagios/plugins/check_procs -w :1 -c 1: --ereg-argument-array "^([^ ]+)?python.*univention.connector.ad.main(.py)?\$" >/dev/null 2>&1 to /usr/lib/nagios/plugins/check_procs -w 1: -c 1: --ereg-argument-array "^([^ ]+)?python.*univention.connector.ad.main(.py)?.*\$" >/dev/null 2>&1 → warn on min 1 (instead of max 1) → allow multiple ad connector instances (after .py)
Note that this is only happening in the customer environment because it has a forked version of the univention-ad-connector?! At least --configbase is not given by default and I don't see that it is anywhere configurable. + Think about: Fixing Bug #49981 and get rid of the customer fork, if possible.
(In reply to Florian Best from comment #1) > Note that this is only happening in the customer environment because it has > a forked version of the univention-ad-connector?! > At least --configbase is not given by default and I don't see that it is > anywhere configurable. Yes, this happens in a customer environment, but not by a fork. For the customer there are some extras added (by sperate py files). No, the option --configbase is always set if an additional ad connector is configured. See L149 in ./services/univention-ad-connector/scripts/prepare-new-instance > + Think about: Fixing Bug #49981 and get rid of the customer fork, if > possible. sounds great :-)
successful build Package: univention-nagios-ad-connector Version: 8.0.1-3A~4.4.0.202105181752 Branch: ucs_4.4-0-errata4.4-8 Scope: errata4.4-8 1f9a75f13e Bug #51869: yaml 58ab67099f Bug #51869: False positive in nagios check if adcon is started with flags Waiting for test results
Tests were successful, created merge request https://git.knut.univention.de/univention/ucs/-/merge_requests/96
Package: univention-nagios-ad-connector Version: 8.0.1-5A~4.4.0.202105261216 Branch: ucs_4.4-0 Scope: errata4.4-8 3d45b5f1c5 Bug #51869: yaml update aed11294d0 Bug #51869: Check how many ad connectors are configured and if they are in autostart The tool now checks how many different connectors were configured (additionalbasenames) and if they are in autostart to determine the correct number of ad connectors that are supposed to be running.
as discussed, remove the autostart (all init script use the same variable connector/ad/autostart)
Ok a4157b89a7 Bug #51869: yaml up 84e4d50b65 Bug #51869: version bump 50d9360dec Bug #51869: Dont evaluate autostart Package: univention-nagios-ad-connector Version: 8.0.1-6A~4.4.0.202105261601 Branch: ucs_4.4-0 Scope: errata4.4-8
as discussed should be critical if no (of two) connector is running (currently ADCONNECTOR WARNING: Not all 2 AD connectors are running!)
And again. Sry a807f799cc Bug #51869: yaml up f3e3b3d38c Bug #51869: Raise critical if no adconnector is running
looks good, test with 2 connector instances OK both are running - ADCONNECTOR OK: System operational. OK only one - ADCONNECTOR WARNING: Less than the 2 configured AD connectors are running! OK more are running - ADCONNECTOR WARNING: More than the 1 configured AD connectors are running! OK no connector is running - ADCONNECTOR CRITICAL: No AD connector is running! OK - yaml
<https://errata.software-univention.de/#/?erratum=4.4x987>