mhthies / smarthomeconnect

Python 3 AsyncIO-based home automation and interfacing framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add monitoring script for evaluating the /monitoring endpoint in Nagios (or compatible monitoring systems)

mhthies opened this issue · comments

The monitoring script should be a single-file Python 3 script, only requiring on the Python standard library, if possible. It shall comply with the Nagios Plugin API (text output and exit code): https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/3/en/pluginapi.html
It shall provide command line parameters to configure the URL of the SHC server to be monitored and aspects of the server to be monitoried. Supported aspects should be:

  • the overall SHC server, representing the overall status as calculated by the SHC server, based on the interface criticality
  • only the SHC server itself (i.e. is the server reachable and returns valid JSON data) – similar to monitoring it with the check_http script
  • only a single SHC interface (out of the provided JSON data)
    • should return the interface's metrics as Nagios perfdata