Bug 54748 - Migrate Nagios checks into prometheus metrics
Migrate Nagios checks into prometheus metrics
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: Florian Best
Siavash Sefid Rodi
:
: 45778 (view as bug list)
Depends on:
Blocks: 56286 55068
  Show dependency treegraph
 
Reported: 2022-05-12 17:12 CEST by Florian Best
Modified: 2023-07-07 13:17 CEST (History)
1 user (show)

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:15 CEST
The currently existing Nagios plugins/checks/services should be migrated into scripts which write Prometheus metrics into .prom files collected by the prometheus node exporter textfile collector.

- [ ] rename "nagios" git section into "monitoring"
- [ ] add a new source package e.g. `univention-monitoring-client` containing multiple binary packages for the specific checks
- [ ] let e.g. S4-Connector depend on the package with the S4-Connector check(s)
- [ ] add run-parts script which executes all the scripts e.g. /usr/sbin/univention-metrics-monitoring and /usr/share/univention-monitoring-client writing to /var/lib/prometheus/node-exporter/*.prom
- [ ] execute script via an configurable interval via cron e.g. /etc/cron.d/univention-metrics-monitoring
- [ ] add a univentionService e.g. `UCS Monitoring` to the host system in the joinscript
- [ ] migrate Nagios checks into scripts writing metrics into .prom files

For custom scripts e.g. for UCS@school, Professional Service, etc. they can either also use the run-parts mechanism or just configure an own script called by a cronjob.
The API is writing .prom files to /var/lib/prometheus/node-exporter/.
Comment 2 Florian Best univentionstaff 2022-06-23 19:19:23 CEST
univention-squid (13.0.4-1)
3ef64899fd57 | Bug #54748: add dependencies to monitoring packages

univention-samba4 (9.0.8-1)
3ef64899fd57 | Bug #54748: add dependencies to monitoring packages

univention-s4-connector (14.0.9-1)
70d8b54141df | Bug #54748: make sure Python 2.7 UDM modules are written again by the listener

univention-s4-connector (14.0.10-1)
3ef64899fd57 | Bug #54748: add dependencies to monitoring packages

univention-printserver (13.0.4-1)
3ef64899fd57 | Bug #54748: add dependencies to monitoring packages

univention-nagios-smart (9.0.1-1)                          
3ef64899fd57 | Bug #54748: add dependencies to monitoring packages

univention-nagios-servicechecks (9.0.1-1)  
3ef64899fd57 | Bug #54748: add dependencies to monitoring packages

univention-nagios-samba (5.0.1-1)                                               
3ef64899fd57 | Bug #54748: add dependencies to monitoring packages        

univention-nagios-s4-connector (5.0.1-1)    
3ef64899fd57 | Bug #54748: add dependencies to monitoring packages

univention-nagios-raid (9.0.1-1)                      
3ef64899fd57 | Bug #54748: add dependencies to monitoring packages

univention-nagios-ad-connector (9.0.1-1)                   
3ef64899fd57 | Bug #54748: add dependencies to monitoring packages

univention-nagios (13.0.3-1)           
3ef64899fd57 | Bug #54748: add dependencies to monitoring packages

univention-monitoring-client (1.0.0-1)
691897d64427 | Bug #54748: remove PING check  
a248e78153cf | Bug #54748: add alert UDM objects for all current checks
2490ee8df055 | Bug #54748: remove custom SMART alert script
2fb7e9cfad0b | Bug #54748: migrate check_smart.pl to Python and write prometheus metrics
460e4dbbc00b | Bug #54748: migrate check_univention_ping to prometheus
23348ade3811 | Bug #54748: migrate check_univention_ntp to prometheus
e5f1fd2f800d | Bug #54748: migrate check_univention_dns to prometheus
6f103e7b4931 | Bug #54748: migrate check_univention_kpasswdd to prometheus
00dd4feabdfa | Bug #54748: migrate check_univention_nfsstatus to prometheus
fcbb75f81fac | Bug #54748: migrate check_univention_joinstatus to prometheus
57771cbe3d87 | Bug #54748: migrate check_univention_winbind to prometheus
dc3799995d9c | Bug #54748: migrate check_univention_smtp to prometheus
cacd9c75c9e6 | Bug #54748: migrate check_univention_printerqueue to prometheus
3addd3dd1fbe | Bug #54748: migrate check_univention_package_status to prometheus
c78590189453 | Bug #54748: migrate check_univention_nscd to prometheus
ec698451dbe8 | Bug #54748: migrate check_univention_ldap to prometheus
df237492427c | Bug #54748: migrate check_univention_ad_connector to prometheus
358767c2fb5d | Bug #54748: migrate check_univention_s4_connector to prometheus
b44e69104805 | Bug #54748: migrate check_univention_samba_drs_failures to prometheus
ffd9fa252ad1 | Bug #54748: migrate check_univention_squid to prometheus
b696da614ada | Bug #54748: migrate check_univention_opsi to prometheus
a635320a554d | Bug #54748: migrate check_univention_cups to prometheus
666531aae285 | Bug #54748: migrate check_univention_smbd to prometheus
8768e91c9905 | Bug #54748: migrate check_univention_replication to prometheus
a7050782e774 | Bug #54748: migrate check_univention_slapd_mdb_maxsize to prometheus
c0f3722fbbe9 | Bug #54748: migrate check_univention_ssl_certificate to prometheus
135074059bbf | Bug #54748: migrate check_univention_i2o_raid to prometheus
c1203b7f0b58 | Bug #54748: migrate check_univention_nmbd to prometheus
3b2508b87f43 | Bug #54748: execute run-parts via cron for the scripts
e8a9f6070174 | Bug #54748: Add univention.monitoring helper utilities
4cea2bb278e0 | Bug #54748: add/remove "UCS Monitoring" service
21d856e6189d | Bug #54748: copy nagios plugins                    
0d883a587eb9 | Bug #54748: Add univention-monitoring-client package skeleton

univention-ad-connector (14.0.10-1)
3ef64899fd57 | Bug #54748: add dependencies to monitoring packages

changelog-5.0-2.xml
ea32350e969f | Changelog Bug #54748 Bug #54749 Bug #54750
                                   
7b9f20b2fdf8 | Bug #54748: move nagios to monitoring
Comment 3 Siavash Sefid Rodi univentionstaff 2022-06-27 17:27:01 CEST
[x] rename "nagios" git section into "monitoring"
[x] add a new source package e.g. `univention-monitoring-client` containing multiple binary packages for the specific checks
[x] let e.g. S4-Connector depend on the package with the S4-Connector check(s)
[x] add run-parts script which executes all the scripts e.g. /usr/sbin/univention-metrics-monitoring and /usr/share/univention-monitoring-client writing to /var/lib/prometheus/node-exporter/*.prom
[x] execute script via an configurable interval via cron e.g. /etc/cron.d/univention-metrics-monitoring
[x] add a univentionService e.g. `UCS Monitoring` to the host system in the joinscript
[x] migrate Nagios checks into scripts writing metrics into .prom files
Comment 4 Florian Best univentionstaff 2022-07-04 14:08:19 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.
Comment 5 Florian Best univentionstaff 2022-08-18 09:42:23 CEST
*** Bug 45778 has been marked as a duplicate of this bug. ***