check_debian_package_update

check_debian_package_update

Monitoring plugin to check Debian package update using source.debian.org API.

This script could be used as Icinga/Nagios check plugin.

Requirements

  • Python (>2.7)
  • requests (python module, python-requests Debian package)

Usage

usage: check_debian_package_update [-h] [-d] [-v] [-w] [-l LOGFILE] [-C]
                                   [-p PACKAGE] [-s SUITE]
                                   [-D REF_FILE_DIR_PATH]
                                   [-F REF_FILE_NAME_FORMAT] [-i]

Monitoring plugin to check Debian package update using source.debian.org API.

optional arguments:
  -h, --help            show this help message and exit
  -d, --debug           Show debug messages
  -v, --verbose         Show verbose messages
  -w, --warning         Show warning messages
  -l LOGFILE, --logfile LOGFILE
                        Log file path
  -C, --console         Also log on console (even if log file is provided)
  -p PACKAGE, --package PACKAGE
                        Source package name
  -s SUITE, --suite SUITE
                        Debian suite/version (eg: Buster)
  -D REF_FILE_DIR_PATH, --ref-file-dir-path REF_FILE_DIR_PATH
                        Path of the directory use to store package version
                        reference (default: /var/lib/nagios/)
  -F REF_FILE_NAME_FORMAT, --ref-file-name-format REF_FILE_NAME_FORMAT
                        Format of the name of the file use to store package
                        version reference (default:
                        check_debian_package_update.{package}.{suite}.state)
  -i, --init            Store current version of the package in the reference
                        file

Copyright

Copyright (c) 2020 Easter-eggs

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.