Monitoring plugin to check ESPHome devices status
Find a file
Benjamin Renard b7c13a4859
All checks were successful
Run tests / test-precommit (push) Successful in 1m16s
Switch from Woodpecker CI to Forgejo Actions
2024-03-13 19:26:59 +01:00
.forgejo/workflows Switch from Woodpecker CI to Forgejo Actions 2024-03-13 19:26:59 +01:00
debian Fix debian package dependency 2022-12-03 16:20:51 +01:00
.gitignore First version 2022-10-26 12:20:43 +02:00
.pre-commit-config.yaml Add -t/--timeout parameter and introduce some new pre-commit hooks 2024-03-13 18:44:28 +01:00
build.sh Add -t/--timeout parameter and introduce some new pre-commit hooks 2024-03-13 18:44:28 +01:00
check_esphome_devices Add -t/--timeout parameter and introduce some new pre-commit hooks 2024-03-13 18:44:28 +01:00
README.md Add -t/--timeout parameter and introduce some new pre-commit hooks 2024-03-13 18:44:28 +01:00

Monitoring plugin to check ESPHome devices status

This Icinga/Nagios check plugin permit to check ESPHome devices status using the ESPHome Dashboard API :

  • check if device is reachable
  • check if device upgrade is available

Installation

apt install git
git clone https://gitea.zionetrix.net/bn8/check_esphome_devices.git /usr/local/src/check_esphome_devices
mkdir -p /usr/local/lib/nagios/plugins
ln -s /usr/local/src/check_esphome_devices/check_esphome_devices /usr/local/lib/nagios/plugins/
echo "command[check_esphome_devices]=/usr/local/lib/nagios/plugins/check_esphome_devices" > /etc/nagios/nrpe.d/esphome.cfg
service nagios-nrpe-server reload

Usage

usage: check_esphome_devices [-h] [-d] [-H HOST] [-r RETRY_COUNT] [-D RETRY_DELAY]
                             [-t TIMEOUT] [-x EXCLUDE]

options:
  -h, --help            show this help message and exit
  -d, --debug
  -H HOST, --host HOST  ESPHome dashboard URL (default: http://127.0.0.1:6052)
  -r RETRY_COUNT, --retry RETRY_COUNT
                        Number of retry to retrieve device status (default: 4)
  -D RETRY_DELAY, --delay RETRY_DELAY
                        Delay in second between two retry to retrieve device status
                        (default: 1s)
  -t TIMEOUT, --timeout TIMEOUT
                        Timeout in second on API requests (default: 10s)
  -x EXCLUDE, --exclude EXCLUDE
                        Regex exclude pattern(s)

Copyright (c) 2022 Benjamin Renard brenard@zionetrix.net

License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.