Bug 54750 - Add listener which configure Prometheus/Grafana with UDM monitoring objects
Add listener which configure Prometheus/Grafana with UDM monitoring objects
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Monitoring (Prometheus or Nagios)
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0-2
Assigned To: Siavash Sefid Rodi
Florian Best
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2022-05-12 17:12 CEST by Florian Best
Modified: 2022-07-04 14:08 CEST (History)
0 users

See Also:
What kind of report is it?: Development Internal
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-05-12 17:12:22 CEST
We should create listener modules which configure the Alerting in Prometheus |& Grafana.

- [ ] add listener modules for the various altering UDM modules which write corresponding Prometheus/Grafana configurations.
- [ ] write a configuration for a general dashboard which shows every alert
- [ ] add targets.json containing the to be monitored systems
Comment 2 Florian Best univentionstaff 2022-06-23 19:20:06 CEST
univention-monitoring-client (1.0.0-1)
0e9f9413f8a3 | Bug #54750: add listener which configures prometheus alertmanager

changelog-5.0-2.xml
ea32350e969f | Changelog Bug #54748 Bug #54749 Bug #54750
Comment 3 Florian Best univentionstaff 2022-06-24 08:54:16 CEST
In Jenkins we see:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/univention/listener/api_adapter.py", line 185, in _lazy_post_run
    return self._module_handler.post_run()
  File "/usr/lib/univention-directory-listener/system/monitoring-client.py", line 116, in post_run
    requests.get(url, auth=('%(hostname)ss$' % ucr, fd.read().strip()))
  File "/usr/lib/python3/dist-packages/requests/api.py", line 75, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 514, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='master090.autotest090.local', port=443): Max retries exceeded with url: /metrics-prometheus/-/reload (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])")))
Comment 4 Florian Best univentionstaff 2022-06-24 09:11:31 CEST
fixed in:

univention-monitoring-client (1.0.0-1)
6b56e049e5d4 | Bug #54750: access prometheus via http
Comment 5 Florian Best univentionstaff 2022-06-27 16:13:21 CEST
OK: listener add/modify/remove writing alert configuration for prometheus
targets.json is created by the prometheus-alertmanager app
a general dashboard is not created yet. we could add it later on. 
OK: changelog entry
Comment 6 Florian Best univentionstaff 2022-07-04 14:08:20 CEST
UCS 5.0-2 has been released.

https://docs.software-univention.de/release-notes-5.0-2-en.html

If this error occurs again, please clone this bug.