Scripts and monitoring probes related to Perun ProxyIdP.
## Installation
Install via pip:
```sh
pip install perun.proxy.utils
```
There are several extras which are required only for some scripts:
-`[ldap]` for check_ldap and check_ldap_syncrepl
- this also requires installing [build prerequisites of the python-ldap library](https://www.python-ldap.org/en/latest/installing.html#build-prerequisites)
-`[postgresql]` for check_pgsql
## Scripts
## Scripts
### run_probes.py
### run_probes
- script designed to execute multiple monitoring probes
- script designed to execute multiple monitoring probes
- output is compatible with CheckMK
- output is compatible with CheckMK
- it is required to put configuration file to `/etc/run_probes_cfg.yaml`
- it is required to put configuration file to `/etc/run_probes_cfg.yaml`
- for usage run: `./run_probes.py` or `python3 -m perun.proxy.utils.run_probes`
For usage instructions, run:
```sh
run_probes
```
### separate_ssp_script.py
### separate_ssp_script.py
...
@@ -52,30 +73,46 @@
...
@@ -52,30 +73,46 @@
All nagios scripts are located under `nagios` directory.
All nagios scripts are located under `nagios` directory.
### check_mongodb.py
### check_mongodb
Nagios monitoring probe for mongodb.
Tested options:
- nagios monitoring probe for mongodb
- connect
- connections
- replication_lag
- replset_state
- connect, connections, replication_lag, replset_state monitoring options are tested (some possible options may not work since there are constructs which are not supported by latest mongodb versions)
(some possible options may not work since there are constructs which are not supported by the latest mongodb versions)
- for usage run:
For usage instructions, run:
`python3 check_mongodb.py --help`
```sh
check_mongodb --help
```
### check_saml.py
### check_saml.py
- SAML authentication check
SAML authentication check compatible with SimpleSAMLphp and mitreID.
For usage instructions, run:
- for usage run:
```sh
`python3 check_saml.py --help`
check_saml --help
```
### check_user_logins.py
### check_user_logins.py
- check users which login in repeatedly more often than a specified threshold (logins per seconds)
Check users which login in repeatedly more often than a specified threshold (logins per seconds).
For usage instructions, run:
- for usage run:
```sh
`python3 check_user_logins.py --help`
check_user_logins --help
```
- example:
Example:
```sh
```sh
python3 check_user_logins.py
python3 check_user_logins.py
...
@@ -86,63 +123,43 @@ python3 check_user_logins.py
...
@@ -86,63 +123,43 @@ python3 check_user_logins.py
-d"%b %d %Y %H:%M:%S"
-d"%b %d %Y %H:%M:%S"
```
```
### check_ldap.py
### check_ldap
- check whether LDAP is available
Check whether an LDAP server is available.
- to use this check, you must install the ldap extra:
```sh
For usage instructions, run:
pip install perun.proxy.utils[ldap]
```
and the [build prerequisites of the python-ldap library](https://www.python-ldap.org/en/latest/installing.html#build-prerequisites)
```sh
check_ldap --help
- for usage run:
```
```sh
python3 check_ldap.py --help
```
### check_ldap_syncrepl
### check_ldap_syncrepl
- check whether an LDAP replica is up to date with the provider
Check whether an LDAP replica is up to date with the provider.
- to use this check, you must install the ldap extra:
```sh
#### Usage
pip install perun.proxy.utils[ldap]
```
and the [build prerequisites of the python-ldap library](https://www.python-ldap.org/en/latest/installing.html#build-prerequisites)
```sh
check_ldap_syncrepl --help
- for usage run:
```
```sh
check_ldap_syncrepl --help
```
### check_privacyidea.py
- check whether privacyidea is available
### check_privacyidea
- use caching arguments for avoiding failure when one TOTP code is used two times
- for usage run:
Check whether privacyidea is available by performing TOTP authentication via the API.
Use caching arguments for avoiding failure when one TOTP code is used two times.
```sh
For usage instructions, run:
python3 check_privacyidea.py --help
```
### check_pgsql.py
```sh
check_privacyidea --help
```
- check connection to PostgreSQL
### check_pgsql
- possible check with configurable query
- to use this check you must include the postgresql extra, which will install [psycopg2-binary](https://pypi.org/project/psycopg2-binary/):
```sh
Check connection to PostgreSQL using a configurable query.