Skip to main content

Platform checks

Introduction

Allow to perform checks on a PaaS.

This is built for the Nasqueron servers infrastructure, and will be useful on modern platform installations like microservices, Docker and proxies/load balancers.

Each check is compatible Nagios / NRPE.

Configuration

Checks can be defined in /etc/monitoring/checks.yml.

The format of this file is:

checks:
  <check_type>:
    <key>: <value>

You can also use /usr/local/etc/monitoring/checks.yml as path, or .checks.yml in the current working directory.

Checks reference

check_http_200

Perform a HTTP request to a specific URL. The check success if HTTP code is 200.

Available check types

  • check_http_200: for sites you test at the back-end level
  • check_http_200_alive: for sites returning "ALIVE" as body content
  • check_http_200_proxy: flag site as verified at proxy level, not directly at the back-end
  • check_http_200_alive_proxy: combine proxy and alive flags

Configuration example

checks:
  check_http_200:
    acme: http://localhost:41080/health
    cachet: http://localhost:39080/api/v1/ping
    
  check_http_200_proxy:
    openfire: https://xmpp.nasqueron.org/login.jsp
    
  check_http_200_alive_proxy:
    phabricator: https://devcentral.nasqueron.org/status

Run the check

From there, you've two ways to run the check:

  • one check for all URLs: call check_http_200 without argument
  • one check, one URL: call check_http_200 <service name>, for example check_http_200 openfire

You can also create a check calling check_http_200 without argument, and it will test every site.

check_container_present

Run the check

With argument, check if the specified Docker container is running: check_container_present foo

Without argument, compare the list of containers present with the expected one.

The configuration is only required if you use it without argument.

Available check types

  • check_docker_containers: a list of expected containers

Configuration example

checks:
  check_docker_containers:
    - foo
    - bar

Requirements

A Docker engine with CLI restructured, ie Docker 1.13+, is needed:

  • To list the containers it uses docker container ls.
  • To get more info on a container down, it uses docker container inspect.

Not features

This check isn't intended to detect containers run with other engines like systemd-nspawn.

check_software_version

Run the check

With argument, check if the specified software is up-to-date.

Without argument, get a list of software from the configuration.

If the software can't be found, an UNKNOWN exit code is returned.

Available check types

  • check_software_version: a list of software to keep up-to-date

Configuration example

checks:
  check_software_version:
    - consul
    - nomad
    - terraform
    - vagrant
    - vault

Supported software

  • HashiCorp CLI products with a "version" subcommand, like Consul, Vault, Vagrant or TerraForm.

Return values of checks

The checks use the standard Nagios/NRPE exit codes:

Exit code Description
0 OK
1 Warning
2 Critical
3 Unknown, for example a check config issue

As such they're compatible with Nagios, Incinga, Sensu, Shinken, etc.

Metadata

Release files for platform-checks 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for platform-checks 0.2.0
File Size Uploaded Provenance
platform_checks-0.2.0.tar.gz 9.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for platform-checks 0.2.0
File Interpreter ABI Platform
platform_checks-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 21.9 kB

Release files / platform_checks-0.2.0.tar.gz

Download URL platform_checks-0.2.0.tar.gz
Size 9.1 kB
Tags Source
SHA-256 checksum
How to use checksums
9322df78f43786c3c37054f80d889013fdc4d07891f0f0a480ca66407c559453
BLAKE2b-256 checksum
How to use checksums
9b6c8fa7ce1077651ba2ed2b723dfabb88a456742a5d5bdb0c270f9002e541c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.10

Release files / platform_checks-0.2.0-py3-none-any.whl

Download URL platform_checks-0.2.0-py3-none-any.whl
Size 12.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e8b78423b68f23d1ede45eb05b02f126535f040b92831c163683176467f7a191
BLAKE2b-256 checksum
How to use checksums
7db7b23ff963121848100c18088561b1ffdf6991a1928dc88229395338bbec60
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.10

Security for platform-checks 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page