check_ldap_ppolicy_lockout
Overview
This is Nagios plugin to check for LDAP accounts, which have been locked by the ppolicy overlay due to too many failed login attempts.
Installation
Best install the plugin in a virtual environment, e.g.:
python -m venv /usr/local/lib/check_ldap_ppolicy_lockout
. /usr/local/lib/check_ldap_ppolicy_lockout/bin/activate
pip install check_ldap_ppolicy_lockout
ln -s $(which check_ldap_ppolicy_lockout) /usr/lib/nagios/plugins/check_ldap_ppolicy_lockout
Configuration
Configuration is loaded from ~/.check_ldap_ppolicy_lockout.yaml
or as fallback from /etc/check_ldap_ppolicy_lockout.yaml. This
behaviour may be overruled via the -f command line option.
The following parameters are supported with the defaults shown
for the optional parameters:
alarms:
warning: 1
critical: 5
expire_seconds: 600
ldap:
uri: ldap://localhost # Required
binddn: cn=nagios,ou=services,dc=example,dc=com # Required
bindpw: xxx # Required
tls: true
tls_ca_file: /etc/ssl/certs/ldap_ca.crt # Required if ldap.tls is true
users_base_dn: ou=users,dc=example,dc=com # Required
Usage
usage: check_ldap_ppolicy_lockout [-h] [-f CONFIG_FILE] [-w WARNING] [-c CRITICAL] [-e EXPIRE_SECONDS]
Check for user accounts locked by LDAP ppolicy overlay
options:
-h, --help show this help message and exit
-f, --config-file CONFIG_FILE
Path to configuration file
-w, --warning WARNING
Number of locked users to trigger warning (Default 1).
-c, --critical CRITICAL
Number of locked users to trigger critical alert (Default 5)
-e, --expire-seconds EXPIRE_SECONDS
Seconds after which locks expire (Default 300 - should match your ppolicy lockout-time)```
## Remarks
For AD installations a plugin check_ldap_lockout seems to exist, see also:
* https://nagios.fm4dd.com/plugins/manual/check_ldap_lockout.shtm
A first check suggests that this plugin does not support TLS,
which does not allow an easy adaptation for modern setups.
Metadata
Release files for check_ldap_ppolicy_lockout 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| check_ldap_ppolicy_lockout-0.1.0.tar.gz | 16.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| check_ldap_ppolicy_lockout-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.1 kB
Release files / check_ldap_ppolicy_lockout-0.1.0.tar.gz
| Download URL | check_ldap_ppolicy_lockout-0.1.0.tar.gz |
|---|---|
| Size | 16.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
889ba7f985f168e5d0702eb682cb6d90d6f7233cc30a8b8235f39ed6ee164d7b
|
|
BLAKE2b-256 checksum How to use checksums |
d65f72cf242165fee5547d076c1bdf7809400cfe02effeac89257b47df39c552
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.2 CPython/3.13.5 Linux/6.12.57+deb13-amd64
|
Release files / check_ldap_ppolicy_lockout-0.1.0-py3-none-any.whl
| Download URL | check_ldap_ppolicy_lockout-0.1.0-py3-none-any.whl |
|---|---|
| Size | 18.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d63dd50741c8f9d1dda95e1b36255fcea38f81ff3db54a9aa2eb58617b439ad1
|
|
BLAKE2b-256 checksum How to use checksums |
70b5d4a162e5411e1be00dd760818fb6b70ea76a947126e22b34c73cab84aaf1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.2 CPython/3.13.5 Linux/6.12.57+deb13-amd64
|