influxdata / telegraf

Agent for collecting, processing, aggregating, and writing metrics, logs, and other arbitrary data.
https://influxdata.com/telegraf
MIT License
14.42k stars 5.55k forks source link

RFC: whois telegraf input plugin #7893

Open zabullet opened 4 years ago

zabullet commented 4 years ago

Feature Request

I've been thinking about monitoring domain registrations on our fleet (specifically expiration). I was thinking of using the whois command with the exec plugin, but that creates a dependency on whois (which isn't installed as default on Ubuntu)

Proposal:

Build a specific whois plugin using https://github.com/domainr/whois to query a set of domains

Use case

Detecting expiration of domain names Mapping domains to registrars Tracking NS servers

ssoroka commented 4 years ago

Check out the x509_cert plugin. I think this covers at least some of your use cases.

There's also the reverse dns lookup plugin; but I don't think that's exactly what you're looking for.

zabullet commented 4 years ago

Thanks @ssoroka, but neither the _X509cert nor reverse dns plugin cover any of my use cases.

ssoroka commented 4 years ago

fair enough. In the mean time, you could probably build a prototype with inputs.execd (service) or inputs.exec (script) plugins.

zabullet commented 4 years ago

@ssoroka I appreciate the input, but I've already stated that as an option and why I don't want to use that method. Do you have anything to add about the actual proposal?

ssoroka commented 4 years ago

The proposal is good. It looks like https://github.com/domainr/whois is a bit immature (open issue about it not following whois redirects), but this is probably not a huge issue. I imagine something like this running once a day would be useful.

I'd be happy to accept a plugin like this.

UAnton commented 3 years ago

Any news or variants on how to monitoring domain expiration?

powersj commented 1 year ago

next steps: look into the above library to collect metrics, like # of seconds till expire, on domains. This is going to be similar logic, but for a different domain to the x509 plugin.