Support more TLDs with go.d whoisquery

If I configure go.d/whoisquery collector as follows;

jobs:
  - name: boris-johnson_org_uk
    source: boris-johnson.org.uk

Then the collector returns an error message;

[ DEBUG ] build[manager] build.go:302 building whoisquery[boris-johnson_org_uk] job, config: map[__provider__:file reader __source__:/etc/netdata/go.d/whoisquery.conf autodetection_retry:0 module:whoisquery name:boris-johnson_org_uk priority:70000 source:boris-johnson.org.uk update_every:60]
[ ERROR ] whoisquery[boris-johnson_org_uk] whoisquery.go:67 error on initializing whois provider: incorrect domain: boris-johnson.org.uk, expected pattern: ^[a-zA-Z0-9\-]+\.[a-zA-Z0-9]+$
[ ERROR ] whoisquery[boris-johnson_org_uk] job.go:152 init failed

It would be great if the collector supported more than ^[a-zA-Z0-9\-]+\.[a-zA-Z0-9]+$

Hi, @tak. You are right, we need to update our domain validation regular expression. Or perhaps even remove the validation step :thinking:

I created a PR with the fix.

1 Like

Works great, thanks!