Skip to main content

Nagios plugin to monitor humidity and temperature data from a Raspberry Pi Pico

Project description

check-dht

PyPI PyPI - Downloads PyPI - Python Version

Nagios plugin to monitor humidity and temperature data from a Raspberry Pi Pico

$ check_dht
DHT OK - temperature is 23°C | humidity=48%;60;65;0;100 onboard=23°C;30;40 temperature=23°C;30;40

Format

Notice: This plugin works in conjuction with the pico-dht project! It expects a device to be available which periodically prints JSON data to a serial port:

{
   "humidity":48,
   "temperature":23,
   "onboard":23,
   "error":0
}
  • humidity and temperature are measurements taken directly from a DHT22/DHT11 sensor
  • The RP2040s built-in temperature sensor is reported in the onboard field.
  • In case of an Issue (e.g. I/O), a POSIX errno is set in the error field.

Install

The recommended installation is via pip install check-dht.

Manually

Alternatively, the source module can be executed after installing needed dependencies:

  1. pySerial
  2. nagiosplugin

Usage

$ poetry run check_dht --help
usage: check_dht [-h] [-p PORT] [-b BAUD] [-w TEMP] [-c TEMP]
                 [--humidity-warning PERCENT] [--humidity-critical PERCENT]

Nagios plugin to monitor humidity and temperature data

options:
  -h, --help            show this help message and exit
  -p PORT, --port PORT  the serial file to read from
  -b BAUD, --baud BAUD  baudrate of the serial port
  -w TEMP, --warning TEMP
                        return warning if air temperature is beyond TEMP
  -c TEMP, --critical TEMP
                        return critical if air temperature is beyond TEMP
  --humidity-warning PERCENT
                        return warning if humidity is beyond PERCENT
  --humidity-critical PERCENT
                        return critical if humidity is beyond PERCENT

(c) Johannes Arnold 2023. This software is published under the terms of the
GNU GPLv3. For the companion project to this plugin, see
https://github.com/j0hax/pico-dht

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

check_dht-0.1.5.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

check_dht-0.1.5-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file check_dht-0.1.5.tar.gz.

File metadata

  • Download URL: check_dht-0.1.5.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.1 CPython/3.10.10 Linux/5.14.21-150400.24.46-default

File hashes

Hashes for check_dht-0.1.5.tar.gz
Algorithm Hash digest
SHA256 01187198ca3e01de7f13944eceb670d761bbffc0709754591573aa766826cec9
MD5 512bf454c4b71fd206bdd14be0a0fff7
BLAKE2b-256 fb03b517547cce90d309b044ab7fbfab3ec6873eb31f5df95c7e0cdd161b87d8

See more details on using hashes here.

File details

Details for the file check_dht-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: check_dht-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.1 CPython/3.10.10 Linux/5.14.21-150400.24.46-default

File hashes

Hashes for check_dht-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 15b483360f11e6acb0dea984876ce062273f3655c6250ebee9b0cd62ca60d8fe
MD5 8874542ec72a8dfcf580d6d53f23aaa4
BLAKE2b-256 7cd9ab424e649357a13a2b9631c2cd8e8ea73b89772583258bb51a13792da420

See more details on using hashes here.

Supported by

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