How To Install nagios-plugins-contrib on Ubuntu 20.04

In this tutorial we learn how to install nagios-plugins-contrib on Ubuntu 20.04. nagios-plugins-contrib is Plugins for nagios compatible monitoring systems

Introduction

In this tutorial we learn how to install nagios-plugins-contrib on Ubuntu 20.04.

What is nagios-plugins-contrib

nagios-plugins-contrib is:

This package provides various plugins for Nagios compatible monitoring systems like Nagios and Icinga. It contains the following plugins:

  • check_ajp (1): plugin to monitor the AJP ping response time Should work with all application servers (Tomcat, JBoss,….) which provide an AJPv13 connector.
  • check_backuppc (1.1.0): plugin for checking on the status of BackupPC backups
  • check_bgpstate (1.0): plugin to check all BGP session on Cisco routers
  • check_checksums (20130611): plugin to verify file checksums against (local, not 100% secure) lists. Supports md5 sha1 sha224 sha256 sha384 sha512 checksums.
  • check_clamav (1.2): plugin to check for clamav signature freshness This script is used to compare the version and signature level of the currently running clamd daemon with the latest available versions listed in the TXT record for current.cvd.clamav.net.
  • check_cups (0.2): plugin to check queues on a remote CUPS server This plugin is monitoring of queues on a remote CUPS server, which means that it doesn’t need to be installed on the print server and run via NRPE.
  • check_debsecan (1.0.0): plugin to check the Debian CVE lists against your installed packages
  • check_drbd (0.5.3): plugin to check DRBD device states This plugin is for checking DRBD device states. It parses the /proc/drbd device and analyses the output.
  • check_email_delivery (0.7.1b): plugin to monitor email delivery Some typical uses of this plugin include:
    • check SMTP server
    • check messages and quota on IMAP server
    • check email delivery loop
    • check auto-responder function
    • keep an eye on email lag
    • monitor automated mailboxes
    • check email-to-FTP or other special email gateways
  • check_etc_hosts (?): plugin to check /etc/hosts for DNS consistency Check /etc/hosts, and make sure the content matches the information in DNS. Lookup IP, and check if the names listed in /etc/hosts maches the one in DNS. It will ignore entries with ‘# NAGIOSIGNORE’ at the end.
  • check_etc_resolv: plugin to check /etc/resolv.conf Check /etc/resolv.conf, and make sure the name servers listed are working. It will ignore entries with ‘# NAGIOSIGNORE’ at the end.
  • check_graphite: Plugin to monitor graphite metrics
  • check_haproxy (rev135): plugin to check the HAProxy statistics url
  • check_haproxy_stats (1.0.1): check haproxy via admin socket Different from check_haproxy this plugin is able to check haproxy via the unix admin socket.
  • check_hp_bladechassis (1.0.1): plugin to check the hardware health of HP blade enclosures via SNMP. The plugin is only tested with the c7000 enclosure.
  • check_hpasm (4.8): plugin to check the hardware health of HP Proliant Servers It either uses snmp or - if installed - the hpasm package locally. The plugin checks the health of
    • Processors
    • Power supplies
    • Memory modules
    • Fans
    • CPU- and board-temperatures
    • Raids and alerts you if one of these components is faulty or operates outside its normal parameters.
  • check_httpd_status (rev204): plugin checking Apache or Lighthttpd server-status page (using mod_status)
  • check_ipmi_sensor (3.13): IPMI Sensor Monitoring Plugin Plugin to monitor the hardware status (fan speed, temperaturs, voltages, power usage, …) of a server using IPMI.
  • check_libs (0.2015012901): plugin to report the usage of no longer existing libraries by running processes
  • check_libs_ng (0.1.0): plugin to report processes using outdated libraries depents on kernel features present in kernels newer than 3.3
  • check_libvirt (v7.0.3): monitor virtualization solutions using libvirt
  • check_lm_sensors (4.1.1): plugin to monitor hardware sensors and disk temperatures
  • check_memcached (1.3): plugin to check memcached instances It will give a critical message if a partiular memcached host is inaccessible and generate a warning if the hit/miss ratio falls below a given threshold or the number of evictions exceeds a given limit. Hit/miss and evictions are measured over a 30 minute interval, using a memcached object to store the earlier statistics.
  • check_memory (1.0.1): plugin to check for free memory This plugin excludes the system cache and buffer, because on some system with very stable memory usage it is perfectly normal for system cache to fill in all available memory.
  • check_mongodb (b33e763): Plugin script to monitor your MongoDB server(s)
  • check_multipath (0.4.7): plugin to monitor the number of available and failed paths of multipath devices
  • check_mysql_health (2.2.2): plugin to check various parameters of a MySQL database
  • check_nfsmounts: checks whether there are stale NFS mounts on the host
  • check_printer: plugin to check printer supply levels using SNMP It outputs performance data for all supplies found, for example toner and drum.
  • check_raid (4.0.9): plugin to check sw/hw RAID status The plugin looks for any known types of RAID configurations, and checks them all. Supports:
    • Adaptec AAC RAID via aaccli or afacli or arcconf
    • AIX software RAID via lsvg
    • HP/Compaq Smart Array via cciss_vol_status (hpsa supported too)
    • HP Smart Array Controllers and MSA Controllers via hpacucli
    • HP Smart Array (MSA1500) via serial line
    • Linux 3ware SATA RAID via tw_cli
    • Linux Device Mapper RAID via dmraid
    • Linux DPT/I2O hardware RAID controllers via /proc/scsi/dpt_i2o
    • Linux GDTH hardware RAID controllers via /proc/scsi/gdth
    • Linux LSI MegaRaid hardware RAID via CmdTool2
    • Linux LSI MegaRaid hardware RAID via megarc
    • Linux LSI MegaRaid hardware RAID via /proc/megaraid
    • Linux MegaIDE hardware RAID controllers via /proc/megaide
    • Linux MPT hardware RAID via mpt-status
    • Linux software RAID (md) via /proc/mdstat
    • LSI Logic MegaRAID SAS series via MegaCli
    • LSI MegaRaid via lsraid
    • Serveraid IPS via ipssend
    • Solaris software RAID via metastat
    • Areca SATA RAID Support via cli64/cli32
    • Detecting SCSI devices or hosts with lsscsi
  • check_rbl (1.5.0): plugin to check if a server is blacklisted
  • check_redis (0.73): Redis Server check plugin This plugin checks Redis NoSQL database status variables, measures its response time and if specified allows one to set thresholds on one or more key data. You can set thresholds for data in stats variables and some of them are also conveniently available as long options with special threshold syntax. Plugin also calculates statistics such as Hitrate (calculated as rate of change of hits/misses) and memory use and can check replication delay.
  • check_smstools: plugin to check GSM Modems using smstools check_smstools is a plugin to monitor a GSM modem signal quality and registration status with smstools.
  • check_snmp_environment (0.7): plugin to check various hardware statuses Using snmp the plugin is able to retrieve Fan, power-supply, voltage, temperature, card and module status and various other information from Cisco, Nokia, Blue Coat, IronPort, Foundry Network, Linux (using lm-sensors), Extreme Networks, Juniper Networks, HP ProCurve, Netscreen, Citrix NetScaler and Transmode Systems hardware.
  • check_snmp_time (1.1): plugin to check the time on a server using SNMP This plugin queries the remote systems time through SNMP and compares it against the local time on the Nagios server. This identifies systems with no correct time set and sends alarms if the time is off to far. HOST-RESOURCES-MIB::hrSystemDate.0 used here returns 8 or 11 byte octets. SNMP translation needs to be switched off and to be converted the received SNMP data into readable strings.
  • check_ssl_cert (1.98.0): plugin to check the CA and validity of an X.509 certificate
  • check_uptime (0.521): check_uptime returns uptime of a system in text (readable) format as well as in minutes for performance graphing. The plugin can either run on a local unix system (using ‘uptime’ command) or check remote system by SNMP. Also it is able to report one CRITICAL or WARNING alert if system has been rebooted since last check.
  • check_v46 (2013-08-26T07:33:11Z): ipv4/ipv6 Nagios plugin wrapper Nagios plugin wrapper for running the actual plugin for both / either of IPv6 and/or IPv4. The worst result of the actual plugin runs will be the wrapper return value, that is, result will be OK only if all checks returned OK. Compatible with any plugin with standard command line options -6/-4.
  • check_webinject (1.80): plugin for testing web services It uses the WebInject Perl module for automated testing of web applications and web services. It can be used to check individual system components that have HTTP interfaces (JSP, ASP, CGI, PHP, AJAX, Servlets, HTML Forms, XML/SOAP Web Services, REST, etc).
  • check_whois (1.24): plugin to check for the expiration of a domain. The plugin may not yet work with all registrars, since their output formats differ or there is no expiration date in the whois output.
  • check_zone_auth (1.13): plugin to ensure that the authoritative nameservers for a given zone remain in sync.
  • check_zone_rrsig_expiration (1.14): plugin to check for expiration of signatures in dnssec-enabled zones.
  • dsa (2300473): plugins from the Debian System Administrators nagios plugins repository.
    • check_cert_expire: check for certificate expiration using openssl on the certificate file
    • check_cert_expire_dir: checks if any of the *.crt files in a directory on disk will expire soon
    • check_dnssec_delegation: check for correct DNSSEC delegation
    • check_entropy: check if there is enough entropy available.
    • check_packages: replacement for check_apt; needs a cronjob to update the apt database regularly
    • check_running_kernel: check if a system was rebooted after a kernel upgrade
    • check_soas: check SOA records
    • check_statusfile: deliver the content of a status file as check result
  • extras (1): various scripts and extras Not a plugin, but a collection of various useful event/obsession handlers and similar scripts.
  • percona-nagios-plugins (1.1.8): Percona Monitoring Plugins (nagios) Nagios MySQL Monitoring plugins writting/provided by Percona.

Some scripts and binaries need more packages installed to work, which is implemented as recommends.

There are three methods to install nagios-plugins-contrib on Ubuntu 20.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install nagios-plugins-contrib Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install nagios-plugins-contrib using apt-get by running the following command:

sudo apt-get -y install nagios-plugins-contrib

Install nagios-plugins-contrib Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install nagios-plugins-contrib using apt by running the following command:

sudo apt -y install nagios-plugins-contrib

Install nagios-plugins-contrib Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install nagios-plugins-contrib using aptitude by running the following command:

sudo aptitude -y install nagios-plugins-contrib

How To Uninstall nagios-plugins-contrib on Ubuntu 20.04

To uninstall only the nagios-plugins-contrib package we can use the following command:

sudo apt-get remove nagios-plugins-contrib

Uninstall nagios-plugins-contrib And Its Dependencies

To uninstall nagios-plugins-contrib and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove nagios-plugins-contrib

Remove nagios-plugins-contrib Configurations and Data

To remove nagios-plugins-contrib configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge nagios-plugins-contrib

Remove nagios-plugins-contrib configuration, data, and all of its dependencies

We can use the following command to remove nagios-plugins-contrib configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge nagios-plugins-contrib

References

Summary

In this tutorial we learn how to install nagios-plugins-contrib package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.