From dff056ec5c89d93175979195ab6975b9fe8ca9ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20B=C5=99ou=C5=A1ek?= <brousek@ics.muni.cz> Date: Fri, 8 Sep 2023 22:12:06 +0200 Subject: [PATCH] docs: use commands instead of python invocation in README --- README.md | 133 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 75 insertions(+), 58 deletions(-) diff --git a/README.md b/README.md index e7aaf37..51a3aa5 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,34 @@ # Perun proxy utils +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 -### run_probes.py +### run_probes - script designed to execute multiple monitoring probes - output is compatible with CheckMK - 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 @@ -52,30 +73,46 @@ 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: - `python3 check_mongodb.py --help` +For usage instructions, run: + +```sh +check_mongodb --help +``` ### check_saml.py -- SAML authentication check +SAML authentication check compatible with SimpleSAMLphp and mitreID. + +For usage instructions, run: -- for usage run: - `python3 check_saml.py --help` +```sh +check_saml --help +``` ### 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: - `python3 check_user_logins.py --help` +```sh +check_user_logins --help +``` -- example: +Example: ```sh python3 check_user_logins.py @@ -86,63 +123,43 @@ python3 check_user_logins.py -d "%b %d %Y %H:%M:%S" ``` -### check_ldap.py +### check_ldap -- check whether LDAP is available -- to use this check, you must install the ldap extra: +Check whether an LDAP server is available. - ```sh - pip install perun.proxy.utils[ldap] - ``` +For usage instructions, run: - and the [build prerequisites of the python-ldap library](https://www.python-ldap.org/en/latest/installing.html#build-prerequisites) - -- for usage run: - - ```sh - python3 check_ldap.py --help - ``` +```sh +check_ldap --help +``` ### check_ldap_syncrepl -- check whether an LDAP replica is up to date with the provider -- to use this check, you must install the ldap extra: +Check whether an LDAP replica is up to date with the provider. - ```sh - pip install perun.proxy.utils[ldap] - ``` +#### Usage - and the [build prerequisites of the python-ldap library](https://www.python-ldap.org/en/latest/installing.html#build-prerequisites) - -- for usage run: - - ```sh - check_ldap_syncrepl --help - ``` - -### check_privacyidea.py +```sh +check_ldap_syncrepl --help +``` -- check whether privacyidea is available -- use caching arguments for avoiding failure when one TOTP code is used two times +### check_privacyidea -- 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 - python3 check_privacyidea.py --help - ``` +For usage instructions, run: -### check_pgsql.py +```sh +check_privacyidea --help +``` -- check connection to PostgreSQL -- 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/): +### check_pgsql - ```sh - pip install perun.proxy.utils[postgresql] - ``` +Check connection to PostgreSQL using a configurable query. -- for usage run: +For usage instructions, run: - ```sh - python3 check_pgpsql.py --help - ``` +```sh +check_pgsql --help +``` -- GitLab