Coder Social home page Coder Social logo

ewypych / icinga-domain-expiration-plugin Goto Github PK

View Code? Open in Web Editor NEW
26.0 2.0 27.0 54 KB

Icinga2/Nagios plugin for checking domain expiration

License: MIT License

Shell 100.00%
nagios-plugin icinga2 icinga-plugin icinga2-plugin domain domains whois bash

icinga-domain-expiration-plugin's People

Contributors

bastiendurel avatar buildtherobots avatar caniculari avatar dalesjo avatar dolezsa avatar ewypych avatar freestream avatar honzahommer avatar krzys-h avatar nitram2342 avatar zevilz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

icinga-domain-expiration-plugin's Issues

.net lookups fail from certain locations

Ok, so here's an odd one - if we do a whois lookup against .net domains, we get different results in different geographical locations making the check fail at our remote production site.

Both sites are in DCs with no proxying in front of them.

Honestly not sure what to say.

[edit - deleted wrong broken file]
working.txt

Script doesn't work properly when whois doesn't return expire date

When whois server doesn't return expire date in an expected format (or any format), the script doesn't work as expected. There is no error handling for such a situation. That's the output for kiev.ua:

$ ./check_domain_expiration.sh -d kiev.ua -w 60 -c 30
date: invalid date '+%Y-%m-%d'
date: invalid date '+%s'
CRITICAL - domain has expired!```

Whois doesn't return any expiration date field for this domain.

invalid date

Hi Emil,
Need help with plugin output.
centos 6
GNU Awk 3.1.7
jwhois version 4.0

[plugins]$ whois google.com
[Querying whois.verisign-grs.com]
[whois.verisign-grs.com]
   Domain Name: GOOGLE.COM
   Registry Domain ID: 2138514_DOMAIN_COM-VRSN
   Registrar WHOIS Server: whois.markmonitor.com
   Registrar URL: http://www.markmonitor.com
   Updated Date: 2018-02-21T18:36:40Z
   Creation Date: 1997-09-15T04:00:00Z
   Registry Expiry Date: 2020-09-14T04:00:00Z
[plugins]$ ./check_domain_expiration.sh -d google.com -w 60 -c 30
date: invalid date `2020-09-14T04:00:00Z\r'
date: invalid date `+%s'
CRITICAL - domain has expired!

Add github url to readme/header

Please add the github URL to the README.md and header in the script.
This means when the script is found in the wild (or anywhere that isn't github) it's possible to check for the latest version and allows easy attribution.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.