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.

194 lines
3.5 KiB

# Run these tests from test_exe_matrix (reference Web site is
# <https://framagit.org/feth/test_exe_matrix>). You can install it
# with 'pip3 install test_exe_matrix'.
---
config:
timeout: 20
tests:
- exe: './check_expire'
args:
- '-h'
retcode: 0
partstdout: '-H domain-name'
- exe: './check_expire'
args:
- '--zzz'
retcode: 3
partstdout: 'option --zzz not recognized'
- exe: './check_expire'
args:
- '-c'
- 'foobar'
- '-H'
- 'bortzmeyer.org'
retcode: 1
partstderr: 'ValueError'
# 2021-07-05: no RDAP server for this TLD
- exe: './check_expire'
args:
- '-H'
- 'bie.re'
retcode: 3
partstdout: 'No RDAP server'
# 2021-07-05: no expiration in RDAP for this TLD (but there is one
# in whois)
- exe: './check_expire'
args:
- '-H'
- 'hopkaup.is'
retcode: 2
partstdout: 'No expiration found'
# Far away and slow, timeout is expected
- exe: './check_expire'
args:
- '-t'
- '1'
- '-H'
- 'nic.ar'
retcode: 3
partstdout: 'Timeout'
- exe: './check_expire'
args:
- '-H'
- 'bortzmeyer.org'
retcode: 0
stderr: ''
partstdout: 'OK'
- exe: './check_expire'
args:
- '-v'
- '-H'
- 'bortzmeyer.org'
retcode: 0
stderr: ''
partstdout: 'RDAP server is'
- exe: './check_expire'
args:
- '-u'
- '-H'
- 'bortzmeyer.org'
retcode: 0
stderr: ''
# TODO how to test we get an integer?
- exe: './check_expire'
args:
- '-c'
- '1000'
- '-H'
- 'sources.org'
retcode: 2
stderr: ''
partstdout: 'HURRY UP'
- exe: './check_expire'
args:
- '-w'
- '1000'
- '-H'
- 'sources.org'
retcode: 1
stderr: ''
partstdout: 'renew now'
# Now, test various RDAP servers
# Verisign
- exe: './check_expire'
args:
- '-H'
- 'nagios.com'
retcode: 0
stderr: ''
# CentralNIC
- exe: './check_expire'
args:
- '-H'
- 'botsin.space'
retcode: 0
stderr: ''
# Fred
- exe: './check_expire'
args:
- '-H'
- 'turris.cz'
retcode: 0
stderr: ''
# Afnic
- exe: './check_expire'
args:
- '-H'
- 'brest.bzh'
retcode: 0
stderr: ''
# Donuts
- exe: './check_expire'
args:
- '-H'
- 'mastodon.social'
retcode: 0
stderr: ''
# Iran, expiration date in the past
- exe: './check_expire'
args:
- '-H'
- 'nic.pars'
retcode: 2
partstdout: "already expired"
stderr: ''
# Brazil
- exe: './check_expire'
args:
- '-H'
- 'nic.globo'
retcode: 0
stderr: ''
# Fury (Canada)
- exe: './check_expire'
args:
- '-H'
- 'blackbox.kiwi'
retcode: 0
stderr: ''
# JPRS
- exe: './check_expire'
args:
- '-H'
- 'nic.jprs'
retcode: 0
stderr: ''
# Nominet
- exe: './check_expire'
args:
- '-H'
- 'nic.abogado'
retcode: 0
stderr: ''
# .at
- exe: './check_expire'
args:
- '-H'
- 'nic.wien'
retcode: 0
stderr: ''