check_mdb/README.md

60 lines
1.9 KiB
Markdown
Raw Permalink Normal View History

2020-11-24 15:09:05 +01:00
Icinga/Nagios plugin to check MDB database
==========================================
This script could be used as Icinga/Nagios check plugin to check MDB database.
2021-03-15 12:24:06 +01:00
This script use *mdb_stat* utility to do this check.
**Note :** *mdb_stat* is not available on Debian Wheezy but it could be backport from Jessie.
2021-02-23 12:20:37 +01:00
Installation
------------
```
2022-06-29 18:50:57 +02:00
apt-get -y install lmdb-utils bc
2021-02-23 12:20:37 +01:00
git clone https://gogs.zionetrix.net/bn8/check_mdb.git /usr/local/src/check_mdb
mkdir -p /usr/local/lib/nagios/plugins
ln -s /usr/local/src/check_mdb/check_mdb /usr/local/lib/nagios/plugins/
2021-02-23 12:34:08 +01:00
echo "nagios ALL=NOPASSWD: /usr/local/lib/nagios/plugins/check_mdb" > /etc/sudoers.d/nagios-slapd-mdb
chmod 0400 /etc/sudoers.d/nagios-slapd-mdb
echo "command[check_mdb]=sudo /usr/local/lib/nagios/plugins/check_mdb" > /etc/nagios/nrpe.d/ldap-mdb.cfg
2021-02-23 12:20:37 +01:00
service nagios-nrpe-server reload
```
2020-11-24 15:09:05 +01:00
Usage
-----
```
Usage : check_mdb [-d] [-h] [-w warning] [-c critical] [options]
-u Sudo as specified user to run mdb_stat
-s Path to mdb_stat (Default : auto-detected)
-p Database path (Default : /var/lib/ldap)
-w Used pages percentage warning limit (Default: 70)
-c Used pages percentage critical limit (Default: 90)
-d Debug mode
-h Show this message
```
Copyright
---------
Copyright (c) 2020 Benjamin Renard
License
-------
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 3
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.