A Nagios (and compatible) plugin to check the impending expiration of a domain name. It relies on RDAP exclusively (no whois) and works with every top-level domain with RDAP (which includes all the ICANN ones).
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Faustin Lammler 01e65574e5
Add unixtime option
1 year ago
LICENSE Initial commit 1 year ago
README.md Icinga template 1 year ago
check_expire Add unixtime option 1 year ago
ianardap.py First version 1 year ago
tests.yaml First version 1 year ago

README.md

check_expire

A Nagios (and compatible) plugin to check the impending expiration of a domain name. It relies on RDAP exclusively (no whois) and works with every top-level domain with RDAP (which includes all the ICANN ones).

Usage

check_expire follows the usual Nagios rules. The options are:

  • -H: domain name to monitor
  • -c: critical threshold in days
  • -w: warning threshold in days
  • -v: verbose details in output

Installation

You need Python 3 and Requests. You can install Requests, for instance, with pip pip3 install requests.

Then, copy the script check_expire and the file ianardap.pyto the directory of local plugins.

Icinga configuration

If you use Icinga, here is a possible definition of the command:

object CheckCommand "expiration" {
  command = [ PluginContribDir + "/check_expire" ]

  arguments = {
      "-H" = "$address$",
      "-c" = "$expiration_critical$",
      "-w" = "$expiration_warning$",
      "-v" = { set_if = "$expiration_verbose$" }
  }

}

apply Service "expiration" {
  import "generic-service"

  check_command = "expiration" 
  
  assign where host.address && host.vars.monitor_expiration
}

And a possible use:

object Host "bortzmeyer-org" {
  ...
  
  address = "bortzmeyer.org"

  vars.monitor_expiration = true
  vars.expiration_verbose = true
  
}

License

GPL. See LICENSE.

Authors

Stéphane Bortzmeyer stephane+chapril@bortzmeyer.org.

Reference site

https://forge.chapril.org/bortzmeyer/check_expire Use the Gitea issue tracker to report bugs or wishes.