Bug 54968 - fix some failures in monitoring alert scripts
fix some failures in monitoring alert scripts
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Monitoring (Prometheus or Nagios)
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0-2-errata
Assigned To: Florian Best
Siavash Sefid Rodi
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2022-07-11 11:31 CEST by Florian Best
Modified: 2022-07-14 09:58 CEST (History)
0 users

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2022-07-11 11:31:22 CEST
1. some scripts are executed on server roles which don't measure the script result, but nevetheless the execution causes tracebacks which cause error mails by cron:

    Traceback (most recent call last):
      File "/usr/share/univention-monitoring-client/scripts//check_univention_ldap", line 54, in <module>
        LDAP.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_ldap", line 40, in write_metrics
        slapd_port = ucr['slapd/port'].split(',')[0]
    AttributeError: 'NoneType' object has no attribute 'split'
    run-parts: /usr/share/univention-monitoring-client/scripts//check_univention_ldap exited with return code 1
    mdb_env_open failed, error 2 No such file or directory

same for check_univention_mdb_maxsize and check_univention_ssl_certificate

2. relicts from nagios in check_univention_nfsstatus:
    Traceback (most recent call last):
      File "/usr/share/univention-monitoring-client/scripts//check_univention_nfsstatus", line 93, in <module>
        FSMountCheck.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_nfsstatus", line 86, in write_metrics
        msg = '%s OK, %s %s - %s' % (mounted, umounted, self.errorstate, msg)
    AttributeError: 'FSMountCheck' object has no attribute 'errorstate'
    run-parts: /usr/share/univention-monitoring-client/scripts//check_univention_nfsstatus exited with return code 1

3. UNIVENTION_ADCONNECTOR_METRIC_MISSING is missing to check one metric
Comment 1 Florian Best univentionstaff 2022-07-11 12:26:46 CEST
All points addressed in:

univention-monitoring-client.yaml
c92dbb5666d6 | Bug #54968: changelog

univention-monitoring-client (1.0.0-4)
cbd882d5088f | Bug #54968: restrict check execution to valid system roles
ab8ea52ca45c | Bug #54968: fix leftover nagios reference in check_univention_nfsstatus
fd7c10ae5425 | Bug #54968: add missing metric to UNIVENTION_ADCONNECTOR_METRIC_MISSING query
c92dbb5666d6 | Bug #54968: changelog
Comment 2 Siavash Sefid Rodi univentionstaff 2022-07-13 16:06:25 CEST
OK: cbd882d5088f | Bug #54968: restrict check execution to valid system roles
OK: ab8ea52ca45c | Bug #54968: fix leftover nagios reference in check_univention_nfsstatus
OK: fd7c10ae5425 | Bug #54968: add missing metric to UNIVENTION_ADCONNECTOR_METRIC_MISSING query
OK: c92dbb5666d6 | Bug #54968: changelog