Platform checks NRPE / Nagios
Project description
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 examplecheck_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
.
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file platform-checks-0.1.3.tar.gz
.
File metadata
- Download URL: platform-checks-0.1.3.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 729af60db8bab29f3cae7cb8be65eb00be4d8eb3d5e7e1e4f80b7c17a2a0e4c8 |
|
MD5 | 13c02281839ec4a02473b51399b3a245 |
|
BLAKE2b-256 | 4ce95b9ca98a55d8d233781b9719622dd5cdea18ac9d48f2c5e39b31162d48f8 |
File details
Details for the file platform_checks-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: platform_checks-0.1.3-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d06b65c622b05bdacac9837ba23928b58a1ea02535d76ff597f1144f7336a07 |
|
MD5 | 5275a302a8c83821ce7ecc7eb9061cc7 |
|
BLAKE2b-256 | 2c1284b2dc938e524863e7051c0df4c4e76e76f2e6760311001850fc9e07aba7 |