Skip to main content

Module with utilities and monitoring probes

Project description

Perun proxy utils

Scripts and monitoring probes related to Perun ProxyIdP.

Installation

Install via pip:

pip install perun.proxy.utils

There are several extras which are required only for some scripts:

Scripts

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 instructions, run:

run_probes

separate_ssp_script.py

  • Script for remove all logs from test accounts from SimpleSAMLlogs

  • Params:

    • 1 - The file name

backup_database.sh

  • Do mysqldump into /opt/mariadb_backup and remove all dump file older than 7 days

separate_oidc_logs.py

  • Script for remove all logs from test accounts from OIDC logs

metadata_expiration.py

  • This script checks whether there are some metadata close to expiration date

  • Params:

    • 1 - url to a page which prints a time when expires the metadata closest to expiration

print_docker_versions.py

  • This script collects system info, docker engine info and the versions of running containers and then prints it to the stdout in the JSON format

  • A python docker library is needed to run the script

  • Options:

    • -e,--exclude NAMES - space delimited string of container names to exclude from the listing

run_version_script.py

  • This scripts runs the print_docker_version.py script on the given machines. The collected versions are then printed as a MD table to the stdout

  • Options:

    • -e,--exclude NAMES - space delimited string of container names to exclude from the listing
  • Params:

    • 1... - machines to run the script on in the form of user@adress, the user needs root privileges to execute the script

Nagios probes

All nagios scripts are located under nagios directory.

check_mongodb

Nagios monitoring probe for mongodb.

Tested options:

  • connect
  • connections
  • replication_lag
  • replset_state

(some possible options may not work since there are constructs which are not supported by the latest mongodb versions)

For usage instructions, run:

check_mongodb --help

check_saml.py

SAML authentication check compatible with SimpleSAMLphp and mitreID.

Basic OIDC check can be triggered by adding --basic-oidc-check switch. This checks for state and code parameters in the result url after a log in attempt.

For more usage instructions, run:

check_saml --help

Example:

python3 check_saml.py
    --username "my_username"
    --password "my_password"
    --username-field "j_username"
    --password-field "j_password"
    --postlogout-string "Successful logout"

check_user_logins.py

Check users which login in repeatedly more often than a specified threshold (logins per seconds).

For usage instructions, run:

check_user_logins --help

Example:

python3 check_user_logins.py
    -p /var/log/proxyaai/simplesamlphp/simplesamlphp/simplesamlphp.log
    -l 5
    -s 60
    -r "^(?P<datetime>.{20}).*audit-login.* (?P<userid>[0-9]+)@muni\.cz$"
    -d "%b %d %Y %H:%M:%S"

check_ldap

Check whether an LDAP server is available.

For usage instructions, run:

check_ldap --help

check_ldap_syncrepl

Check whether an LDAP replica is up to date with the provider.

Usage

check_ldap_syncrepl --help

check_privacyidea

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.

For usage instructions, run:

check_privacyidea --help

check_pgsql

Check connection to PostgreSQL using a configurable query.

For usage instructions, run:

check_pgsql --help

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

perun.proxy.utils-2.2.1.tar.gz (34.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

perun.proxy.utils-2.2.1-py3-none-any.whl (40.9 kB view details)

Uploaded Python 3

File details

Details for the file perun.proxy.utils-2.2.1.tar.gz.

File metadata

  • Download URL: perun.proxy.utils-2.2.1.tar.gz
  • Upload date:
  • Size: 34.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for perun.proxy.utils-2.2.1.tar.gz
Algorithm Hash digest
SHA256 a2099a6d14114f3cf3fa221689e8971c7a14c40a7f1b31eda557869fe9718fa1
MD5 9007cc9280ff02827b3faac226676f7b
BLAKE2b-256 0c3b3f79c919a3b55f25d44ceb6f56db5506225870f69412431abc4e000b1cfa

See more details on using hashes here.

File details

Details for the file perun.proxy.utils-2.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for perun.proxy.utils-2.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2c0655f83bfe12996222acf7dc756374bc4e0c7beadf009cb9a74d7272d0e512
MD5 e8f2e95471650dc4dccde5e4cb57ad0e
BLAKE2b-256 e11e28e6e0a262e4f13afba6ba077b0f4193a6fe25c17b0486bb52d6e0805a9b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page