Bug 48422 - listener: No Nagios checks for mdb limit / effective size
listener: No Nagios checks for mdb limit / effective size
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Monitoring (Prometheus or Nagios)
UCS 4.3
All Linux
: P5 enhancement (vote)
: UCS 4.4-0-errata
Assigned To: Florian Best
Arvid Requate
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-01-03 15:19 CET by Mathieu Simon
Modified: 2022-06-27 17:48 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 2: Improvement: Would be a product improvement
Who will be affected by this bug?: 4: Will affect most installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.046
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 Mathieu Simon 2019-01-03 15:19:29 CET
Hi

Similar to #45685 ("No Nagios checks for mdb limit / effective size") the listener cache should also receive a comparable Nagios check. I've essentially taken the check for slapd and adapted it for the listener cache file in the form of a check called check_univention_listener_mdb_maxsize which I'd like to upstream.

Additionnaly I've seen that ldap/database/mdb/maxsize in contrast to ldap/database/type is never used in the slapd check script as only mdb_stat is used to read the used vs. maximum pages in the MDB database. I'd like to propose minimal patch on check_univention_slapd_mdb_maxsize as well.

Regards
Mathieu
Comment 1 Mathieu Simon 2019-01-03 15:38:33 CET
Q: I'm not entirely certain where exactly adding the nagios checks for the listener is actually recommended as I don't use univention nagios service but only this additional check from a standalone nagios setup. (Looking at 30univention-nagios-client.inst)

Regards
Mathieu
Comment 2 Mathieu Simon 2019-01-03 15:45:38 CET
Hi

Here is an example output of the check:

root@ucstest:~# /usr/lib/nagios/plugins/check_univention_listener_mdb_maxsize -c 80 -w 90
univention-directory-listener MDB OK: System operational (in fact 10%)

The pull request is found here: https://github.com/univention/univention-corporate-server/pull/9

Regards and looking forward to your feedback,
Mathieu
Comment 3 Florian Best univentionstaff 2019-04-04 16:09:44 CEST
I have to clarify some politics before I can merge this pull request:

The pull request introduces a "Copyright 2019 Adfinis SyGroup AG" line into the AGPL header of the newly introduces files.

I got some different options on this internally:
Stefan thinks that we have to keep the copyright. (Applying the patch one by one).

Ingo thinks that because of the signed CLA (https://cla-assistant.io/univention/univention-corporate-server?pullRequest=9) we can remove the line because by signing they give us the copyright rights.
"""The Contributor confirms that he holds the copyright and all user rights to the software expansion he has passed on to Univention."""

Arvid argues:
Via github pull requests/CLA people transfer the rights to us.
It is important for us that we aren't limited by third party.
So it is okay to note who are contributors if this doesn't influence the legal/judical.
If this is the case we shouldn't pit against open-source-community common attributions (like it's done in Samba, etc.).

Who is the lawyer-authority in our company? :-P
Comment 4 Florian Best univentionstaff 2019-04-05 16:52:30 CEST
I implemented a different solution by unifying both existing scripts.

There were some other things missing in the implementation:
* on i386 no mdb is used
* file permissions of the suidwrapper weren't set
* adding the new nagios check to the joinscript

It was easier (for Bug #48617) to migrate the script to python than doing all the string-result-message and system maxint size check things in bash.

univention-nagios (12.0.1-5)
f8abb2c8e5b6 | Bug #48422: Bug #48617: add mdb check for UDL and translog database

univention-nagios.yaml
f8abb2c8e5b6 | Bug #48422: Bug #48617: add mdb check for UDL and translog database
Comment 5 Mathieu Simon 2019-04-05 17:32:40 CEST
Hi Florian

Sorry for the unintended launch of law and politics discussion. Either way I'm happy with the final outcome which is that we get the required check added/extended and that you eventually found other minor issues that got fixed. I consider this a win-win!

While I'm definitely not a legal expert, I've read the CLA again I've looked up the respective section. The CLA in part 1 are a bit counterintuitive when comparing the english vs. german version. However part 3 both define granting "use[r] rights" [sic!] or "Nutzungsrechte" to Univention, no copyright assignment. Considering Copyright lines, yup that is likely to be decided / recommened by lawyer authorities. ;-)

Of course the question is now obsolete since you Florian used my PR as inspiration to fix even more things, so there is no contribution by myself as part of work for Adfinis SyGroup. :-)

Thanks again
Mathieu
Comment 6 Arvid Requate univentionstaff 2019-04-10 16:36:44 CEST
Ok, works.

I think we should also try to automatically activate the new plugin during update on UCS master systems. That should be possible via postinst?
Comment 7 Florian Best univentionstaff 2019-04-12 12:57:37 CEST
Thank you, Mathieu ;-)

The objects are now created in the postinst:
univention-nagios (12.0.1-6)
55ec68a52d28 | Bug #48422: create objects in postinst
Comment 8 Arvid Requate univentionstaff 2019-04-15 22:03:12 CEST
Ok, works.
Comment 9 Erik Damrose univentionstaff 2019-04-17 14:07:51 CEST
<http://errata.software-univention.de/ucs/4.4/51.html>