Bug 31374 - Monitor Samba 4 using Nagios
Monitor Samba 4 using Nagios
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: Monitoring (Prometheus or Nagios)
UCS 4.2
Other Linux
: P4 enhancement (vote)
: ---
Assigned To: UCS maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-16 11:39 CEST by Kevin Dominik Korte
Modified: 2022-06-27 17:48 CEST (History)
6 users (show)

See Also:
What kind of report is it?: Feature Request
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): Large environments, Troubleshooting
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Dominik Korte univentionstaff 2013-05-16 11:39:48 CEST
It would be good if Samba 4 would be monitored using Nagios. Both whether the Samba 4 server is running as well as if the drs replication is working without any problems.
Comment 1 Thomas Manninger 2013-09-03 09:30:48 CEST
I wrote a very simple check:

#!/bin/bash
# check the replication of samba4
# by thomas manninger, siedl networks gmbh

errors=$(samba-tool drs showrepl 2> /dev/null | grep "consecutive failure(s)" | sed -e "s/\t//g" | grep -v "^0" | wc -l)

if [ $errors -gt 0 ]; then
        echo "CRITICAL: $errors replication links fails!";
        exit
fi

echo "OK"



It works as long as the text output dont change with a samba4 update :)
Comment 2 Thomas Manninger 2013-09-03 09:44:34 CEST
Thats the correct version:

#!/bin/bash
# check the replication of samba4
# by thomas manninger, siedl networks gmbh

errors=$(samba-tool drs showrepl 2> /dev/null | grep "consecutive failure(s)" | sed -e "s/\t//g" | grep -v "^0" | wc -l)

if [ $errors -gt 0 ]; then
        echo "CRITICAL: $errors replication links fails!";
        exit 2
fi

echo "OK"
exit 0
Comment 3 Arvid Requate univentionstaff 2015-11-05 22:20:00 CET
Some check for running daemons could include:

* Comparing $(samba-tool processes)  vs   $(pgrep -f /usr/sbin/samba)
* Checks for essential ports (88, 135, 389, 445, 464, 636, 3268, 3269)
Comment 4 Daniel Tröder univentionstaff 2017-05-02 11:21:28 CEST
* s4 connector rejects
Comment 5 Ingo Steuwer univentionstaff 2020-07-03 20:55:05 CEST
This issue has been filed against UCS 4.2.

UCS 4.2 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.