check_apt_package

check_apt_package

Monitoring plugin to check if some packages are upgradeable (even if they are marked for keep).

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

Requirements

  • Python 3
  • python_apt (python3-apt Debian package)

Installation

apt install git python3-apt
git clone https://gitlab.easter-eggs.com/brenard/check_apt_package.git /usr/local/src/check_apt_package
mkdir -p /usr/local/lib/nagios/plugins
ln -s /usr/local/src/check_apt_package/check_apt_package /usr/local/lib/nagios/plugins/

Usage

usage: check_apt_package [-h] [-d] [-v] [-w] [-l LOGFILE] [-C] [-k]
                         packages [packages ...]

Monitoring plugin to check if some packages are upgradeable (even if they are
marked for keep).

positional arguments:
  packages              Packages to check

options:
  -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)
  -k, --check-mark-for-keep
                        Check that specified packages are marked for keep

Copyright

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