sensu-plugins / sensu-plugins-network-checks

This plugin provides native network instrumentation for monitoring and metrics collection, including: hardware, TCP response, RBLs, whois, port status, and more.
http://sensu-plugins.io
MIT License
30 stars 76 forks source link

whois checks for .org domains fail with "Parsing error" #78

Open peterhoeg opened 6 years ago

peterhoeg commented 6 years ago

In the following example.org refers to an actual .org domain.

This check command:

check-whois-domain-expiration-multi.rb --domains example.org --warn 22 --critical 15

Fails with:

WhoisDomainExpirationCheck UNKNOWN: example.org (Parsing error)

This fails for all .org domains.

Doing a manual check using the ruby gem as follows works:

Gemfile.lock:

GEM
  remote: https://rubygems.org/
  specs:
    whois (4.0.6)
PLATFORMS
  ruby
DEPENDENCIES
  whois
BUNDLED WITH
   1.16.2

test.rb:

#!/usr/bin/env ruby

require 'bundler/setup'
require 'whois'

puts Whois::Client.new.lookup("example.org")
peterhoeg commented 6 years ago

@majormoses, any idea what might be going on here?

peterhoeg commented 6 years ago

Anybody has any suggestions? It's rather problematic to have lost visibility across all .org domains.

peterhoeg commented 6 years ago

The whois-parser gem is causing this. Working on a fix.

peterhoeg commented 6 years ago

Upstream bug: https://github.com/weppos/whois-parser/issues/97

eheydrick commented 6 years ago

.io domains are also impacted. See https://github.com/weppos/whois-parser/issues/92.

majormoses commented 6 years ago

I wish I could say this is a new problem and when I have seen this it has been due to upstream issues with whois (before they split the parser off to be as separate gem) and whois-parser. I don't have the time right now to work on a fix but if you do and it gets accepted I am more than happy to pull in the new deps, make any required changes on our end, and cut a release.

peterhoeg commented 6 years ago

There is a PR upstream which does solve it for .org domains. I'll shout when it gets merged.

majormoses commented 6 years ago

Thanks for the update, I will keep an eye out.

majormoses commented 6 years ago

Just so you know I have been checking at least every few days for a release with the fix in it. I will be very busy next week due to some family events going on so I will probably not be checking as often.

majormoses commented 6 years ago

I will check back in a couple weeks, if they release in the meantime feel free to reach out.

eheydrick commented 5 years ago

whois-parser 1.2.0 was just released with fixes for .org, .io and other domains. We should pull that in. https://github.com/weppos/whois-parser/blob/master/CHANGELOG.md#release-120

peterhoeg commented 5 years ago

@majormoses, any chance of a new release with the new whois-parser?