Icinga/Nagios plugin to check Woodpecker CI instance upgrade status
Find a file
Benjamin Renard 981107d662
Some checks failed
ci/woodpecker/manual/woodpecker Pipeline failed
Initial release
2024-01-22 01:23:53 +01:00
debian Initial release 2024-01-22 01:23:53 +01:00
.gitignore Initial release 2024-01-22 01:23:53 +01:00
.pre-commit-config.yaml Initial release 2024-01-22 01:23:53 +01:00
.woodpecker.yml Initial release 2024-01-22 01:23:53 +01:00
build.sh Initial release 2024-01-22 01:23:53 +01:00
check_woodpecker_upgrade Initial release 2024-01-22 01:23:53 +01:00
README.md Initial release 2024-01-22 01:23:53 +01:00

Monitoring plugin to check Woodpecker CI instance upgrade status

This Icinga/Nagios check plugin permit to check Woodpecker CI instance upgrade status by comparing the local woodpecker-server binary version against the latest stable release.

Installation

apt install git python3-requests
git clone https://gitea.zionetrix.net/bn8/check_woodpecker_upgrade.git /usr/local/src/check_woodpecker_upgrade
mkdir -p /usr/local/lib/nagios/plugins
ln -s /usr/local/src/check_woodpecker_upgrade/check_woodpecker_upgrade /usr/local/lib/nagios/plugins/
echo "nagios ALL=NOPASSWD: /usr/local/lib/nagios/plugins/check_woodpecker_upgrade" > /etc/sudoers.d/nagios-woodpecker
chmod 0400 /etc/sudoers.d/nagios-woodpecker
echo "command[check_woodpecker_upgrade]=sudo /usr/local/lib/nagios/plugins/check_woodpecker_upgrade" > /etc/nagios/nrpe.d/woodpecker.cfg
service nagios-nrpe-server reload

Usage

usage: check_woodpecker_upgrade [-h] [-d] [-p PATH] [-U URL] [--pre-release] [--draft] [-t TIMEOUT]

options:
  -h, --help            show this help message and exit
  -d, --debug
  -p PATH, --path PATH  Woodpecker CI bin path
  -U URL, --url URL     Woodpecker CI releases URL
  --pre-release         Allow pre-release (default: only stable release are considered)
  --draft               Allow draft release (default: only stable release are considered)
  -t TIMEOUT, --timeout TIMEOUT
                        Specify timeout for HTTP requests (default: 20)

Copyright (c) 2024 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.