Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(inputs.whois): Add plugin #16509

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
67e03e4
feat(inputs.whois): add input plugin for whois data
paulojmdias Feb 12, 2025
a04eea9
fix: fix readme linting
paulojmdias Feb 12, 2025
aaeb51f
revert changes on this file, not finished with it yet
paulojmdias Feb 13, 2025
daa605b
fix: improvements
paulojmdias Feb 13, 2025
4caa207
fix: improvements
paulojmdias Feb 13, 2025
c0fef67
Merge branch 'input_whois' of github.com:paulojmdias/telegraf into in…
paulojmdias Feb 13, 2025
a4ddc91
fix: improvements
paulojmdias Feb 13, 2025
9bc3078
fix: fix testing
paulojmdias Feb 13, 2025
4bdd1aa
fix: add registrant
paulojmdias Feb 13, 2025
b28227c
fix: improvements on variables actions
paulojmdias Feb 13, 2025
4aa3331
fix: unify status_code
paulojmdias Feb 13, 2025
7ebddd1
fix: fix panic on Timestamps when nil
paulojmdias Feb 13, 2025
27a8079
fix: improve docs
paulojmdias Feb 13, 2025
b3ff6a5
fix: simplify variable assignments
paulojmdias Feb 13, 2025
ce03686
fix: add timeout test
paulojmdias Feb 13, 2025
c3c0720
fix: remove force init call
paulojmdias Feb 13, 2025
00f64c0
feat: add support for additional status code in case of failed parsing
paulojmdias Feb 14, 2025
dc06f2c
fix: remove metric when ErrDomainLimitExceed or ErrDomainDataInvalid
paulojmdias Feb 14, 2025
e7265bc
fix: simplify functions and tests
paulojmdias Feb 14, 2025
566a1ed
Update plugins/inputs/whois/README.md
paulojmdias Feb 17, 2025
8d87414
fix: fix linting and readme
paulojmdias Feb 17, 2025
e05a548
fix: update registrar and registrant assignment
paulojmdias Feb 17, 2025
f7f2417
chore: update rawWhois and parsedWhois assignment names to raw and data
paulojmdias Feb 17, 2025
3ecdae9
chore: move Debug logs to Trace level
paulojmdias Feb 17, 2025
a07d1c6
chore: remove log message
paulojmdias Feb 17, 2025
94a4b68
fix: return error when timeout is invalid
paulojmdias Feb 17, 2025
d3a6bd9
fix: fix docs
paulojmdias Feb 17, 2025
573713f
fix: fix timeout tests
paulojmdias Feb 17, 2025
1e4af8b
fix: remove func override from the tests
paulojmdias Feb 17, 2025
e83026d
chore: update docs
paulojmdias Feb 17, 2025
a4be1b6
fix: update tests and defaults assignments
paulojmdias Feb 17, 2025
4b78e3e
fix: remove ptr from tests as uneeded
paulojmdias Feb 17, 2025
4067f6f
Merge branch 'influxdata:master' into input_whois
paulojmdias Feb 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/LICENSE_OF_DEPENDENCIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,9 @@ following works:
- github.com/kylelemons/godebug [Apache License 2.0](https://github.com/kylelemons/godebug/blob/master/LICENSE)
- github.com/leodido/go-syslog [MIT License](https://github.com/influxdata/go-syslog/blob/develop/LICENSE)
- github.com/leodido/ragel-machinery [MIT License](https://github.com/leodido/ragel-machinery/blob/develop/LICENSE)
- github.com/likexian/gokit [Apache License 2.0](https://github.com/likexian/gokit/blob/master/LICENSE)
- github.com/likexian/whois [Apache License 2.0](https://github.com/likexian/whois/blob/master/LICENSE)
- github.com/likexian/whois-parser [Apache License 2.0](https://github.com/likexian/whois-parser/blob/master/LICENSE)
- github.com/linkedin/goavro [Apache License 2.0](https://github.com/linkedin/goavro/blob/master/LICENSE)
- github.com/logzio/azure-monitor-metrics-receiver [MIT License](https://github.com/logzio/azure-monitor-metrics-receiver/blob/master/LICENSE)
- github.com/magiconair/properties [BSD 2-Clause "Simplified" License](https://github.com/magiconair/properties/blob/main/LICENSE.md)
Expand Down
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ require (
github.com/klauspost/pgzip v1.2.6
github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b
github.com/leodido/go-syslog/v4 v4.1.0
github.com/likexian/whois v1.15.5
github.com/likexian/whois-parser v1.24.20
github.com/linkedin/goavro/v2 v2.13.0
github.com/logzio/azure-monitor-metrics-receiver v1.1.0
github.com/lxc/incus/v6 v6.9.0
Expand Down Expand Up @@ -404,6 +406,7 @@ require (
github.com/kr/fs v0.1.0 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/leodido/ragel-machinery v0.0.0-20190525184631-5f46317e436b // indirect
github.com/likexian/gokit v0.25.15 // indirect
github.com/lufia/plan9stats v0.0.0-20240226150601-1dcf7310316a // indirect
github.com/magiconair/properties v1.8.9 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
Expand Down
6 changes: 6 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1802,6 +1802,12 @@ github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/lib/pq v1.7.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/lib/pq v1.10.2 h1:AqzbZs4ZoCBp+GtejcpCpcxM3zlSMx29dXbUSeVtJb8=
github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/likexian/gokit v0.25.15 h1:QjospM1eXhdMMHwZRpMKKAHY/Wig9wgcREmLtf9NslY=
github.com/likexian/gokit v0.25.15/go.mod h1:S2QisdsxLEHWeD/XI0QMVeggp+jbxYqUxMvSBil7MRg=
github.com/likexian/whois v1.15.5 h1:gpPxyCTJtLtJDmakHCo//0ZjK/ocI01GCAd/WBJ2oH8=
github.com/likexian/whois v1.15.5/go.mod h1:4b6o1QTCfjwrB5I3KeNQnn79QtuPUTsewsE+ys94I78=
github.com/likexian/whois-parser v1.24.20 h1:oxEkRi0GxgqWQRLDMJpXU1EhgWmLmkqEFZ2ChXTeQLE=
github.com/likexian/whois-parser v1.24.20/go.mod h1:rAtaofg2luol09H+ogDzGIfcG8ig1NtM5R16uQADDz4=
github.com/linkedin/goavro/v2 v2.13.0 h1:L8eI8GcuciwUkt41Ej62joSZS4kKaYIUdze+6for9NU=
github.com/linkedin/goavro/v2 v2.13.0/go.mod h1:KXx+erlq+RPlGSPmLF7xGo6SAbh8sCQ53x064+ioxhk=
github.com/logzio/azure-monitor-metrics-receiver v1.1.0 h1:L2LU/jWTOFibZeSKUeEDBdPY6iFL1gkSE3A/9mnk/Ms=
Expand Down
5 changes: 5 additions & 0 deletions plugins/inputs/all/whois.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
//go:build !custom || inputs || inputs.whois

package all

import _ "github.com/influxdata/telegraf/plugins/inputs/whois" // register plugin
60 changes: 60 additions & 0 deletions plugins/inputs/whois/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# WHOIS Input Plugin

The `whois` input plugin queries **WHOIS** information for configured
domains and provides metrics such as expiration timestamps, registrar
details, and domain status.

## Global configuration options <!-- @/docs/includes/plugin_config.md -->

In addition to the plugin-specific configuration settings, plugins support
additional global and plugin configuration settings. These settings are used to
modify metrics, tags, and field or create aliases and configure ordering, etc.
See the [CONFIGURATION.md][CONFIGURATION.md] for more details.

[CONFIGURATION.md]: ../../../docs/CONFIGURATION.md#plugins

## Configuration

```toml @sample.conf
# Reads WHOIS data and expose as metrics
[[inputs.whois]]
## List of domains to query
domains = ["example.com", "influxdata.com"]

## Use Custom WHOIS server
## example: server = "whois.iana.org"
# server = ""

## Timeout for WHOIS queries
# timeout = "5s"
```

## Metrics

- whois
- tags:
- domain
- fields:
- creation_timestamp (int, seconds)
- dnssec_enabled (bool)
- expiration_timestamp (int, seconds)
- expiry (int, seconds) - Remaining time until the domain expires, in seconds.
This value can be **negative** if the domain is already expired.
`SELECT (expiry / 60 / 60 / 24) as "expiry_in_days"`
- registrar (string)
- registrant (string)
- status_code (int)
- 0 - Unknown
- 1 - Pending Delete
- 2 - Expired
- 3 - Locked
- 4 - Registered
- 5 - Active
- updated_timestamp (int, seconds)

## Example Output

```text
domain=example.com creation_timestamp=808372800i,dnssec_enabled=true,expiration_timestamp=1755057600i,expiry=15596396i,name_servers="a.iana-servers.net,b.iana-servers.net",registrant="",registrar="RESERVED-Internet Assigned Numbers Authority",status_code=3i,updated_timestamp=1723618894i 1739461204000000000
domain=influxdata.com creation_timestamp=1403603283i,dnssec_enabled=false,expiration_timestamp=1750758483i,expiry=11297277i,name_servers="ns-1200.awsdns-22.org,ns-127.awsdns-15.com,ns-2037.awsdns-62.co.uk,ns-820.awsdns-38.net",registrant="Redacted for Privacy",registrar="NameCheap, Inc.",status_code=3i,updated_timestamp=1716620263i 1739461206000000000
```
11 changes: 11 additions & 0 deletions plugins/inputs/whois/sample.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Reads whois data and expose as metrics
[[inputs.whois]]
## List of domains to query
domains = ["example.com", "influxdata.com"]

## Use Custom WHOIS server
## example: server = "whois.iana.org"
# server = ""

## Timeout for WHOIS queries
# timeout = "5s"
193 changes: 193 additions & 0 deletions plugins/inputs/whois/whois.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
package whois

import (
_ "embed"
"errors"
"fmt"
"strings"
"time"

"github.com/influxdata/telegraf"
"github.com/influxdata/telegraf/config"
"github.com/influxdata/telegraf/plugins/inputs"
"github.com/likexian/whois"
"github.com/likexian/whois-parser"
)

//go:embed sample.conf
var sampleConfig string

type Whois struct {
Domains []string `toml:"domains"`
Server string `toml:"server"`
Timeout config.Duration `toml:"timeout"`
Log telegraf.Logger `toml:"-"`

client *whois.Client
whoisLookup func(client *whois.Client, domain, server string) (string, error)
parseWhoisData func(raw string) (whoisparser.WhoisInfo, error)
}

func (*Whois) SampleConfig() string {
return sampleConfig
}

func (w *Whois) Gather(acc telegraf.Accumulator) error {
if w.client == nil {
if err := w.Init(); err != nil {
return err
}
}

for _, domain := range w.Domains {
w.Log.Debugf("Fetching WHOIS data for %q using WHOIS server %q with timeout: %v", domain, w.Server, w.Timeout)

// Fetch WHOIS raw data
rawWhois, err := w.whoisLookup(w.client, domain, w.Server)
if err != nil {
acc.AddError(fmt.Errorf("whois query failed for %q: %w", domain, err))
continue
}

// Parse WHOIS data using whois-parser
parsedWhois, err := w.parseWhoisData(rawWhois)
if err != nil {
acc.AddError(fmt.Errorf("whois parsing failed for %q: %w", domain, err))
continue
}

w.Log.Debugf("Parsed WHOIS data for %s: %+v", domain, parsedWhois)

// Prevent nil pointer panic
if parsedWhois.Domain == nil {
w.Log.Warnf("No domain info found for %s", domain)

// Always register a metric, even on failure
acc.AddFields("whois", map[string]interface{}{
"status_code": 0,
}, map[string]string{
"domain": domain,
})
continue
}

// Extract expiration date
var expirationTimestamp int64
var expiry int
expiration := parsedWhois.Domain.ExpirationDateInTime
if expiration != nil {
expirationTimestamp = expiration.Unix()

// Calculate expiry in seconds
expiry = int(time.Until(*expiration).Seconds())
}

// Extract creation date
var creationTimestamp int64
created := parsedWhois.Domain.CreatedDateInTime
if created != nil {
creationTimestamp = created.Unix()
}

// Extract updated date
var updatedTimestamp int64
updated := parsedWhois.Domain.UpdatedDateInTime
if updated != nil {
updatedTimestamp = updated.Unix()
}

// Extract DNSSEC status
dnssec := parsedWhois.Domain.DNSSec

// Extract NameServers status
nameServers := parsedWhois.Domain.NameServers

// Extract registrar name (handle nil)
registrar := ""
if parsedWhois.Registrar != nil {
registrar = parsedWhois.Registrar.Name
}

// Extract registrant name (handle nil)
registrant := ""
if parsedWhois.Registrant != nil {
registrant = parsedWhois.Registrant.Name
}

// Extract status (handle nil)
domainStatus := 0
if parsedWhois.Domain.Status != nil {
domainStatus = simplifyStatus(parsedWhois.Domain.Status)
}

// Add metrics
fields := map[string]interface{}{
"creation_timestamp": creationTimestamp,
"dnssec_enabled": dnssec,
"expiration_timestamp": expirationTimestamp,
"expiry": expiry,
"updated_timestamp": updatedTimestamp,
"registrar": registrar,
"registrant": registrant,
"status_code": domainStatus,
"name_servers": strings.Join(nameServers, ","),
}
tags := map[string]string{
"domain": domain,
}

acc.AddFields("whois", fields, tags)
}

return nil
}

// simplifyStatus maps raw WHOIS statuses to a simpler classification
func simplifyStatus(statusList []string) int {
for _, status := range statusList {
switch s := strings.ToLower(status); {
case strings.Contains(s, "pendingdelete"):
return 1 // PENDING DELETE
case strings.Contains(s, "redemptionperiod"):
return 2 // EXPIRED
case strings.Contains(s, "clienttransferprohibited"), strings.Contains(s, "clientdeleteprohibited"):
return 3 // LOCKED
case s == "registered":
return 4 // REGISTERED
case s == "active":
return 5 // ACTIVE
}
}
return 0 // UNKNOWN
}

func (w *Whois) Init() error {
if len(w.Domains) == 0 {
return errors.New("no domains configured")
}

w.client = whois.NewClient()
w.client.SetTimeout(time.Duration(w.Timeout))

if w.whoisLookup == nil {
w.whoisLookup = func(client *whois.Client, domain, server string) (string, error) {
return client.Whois(domain, server)
}
}
if w.parseWhoisData == nil {
w.parseWhoisData = func(raw string) (whoisparser.WhoisInfo, error) {
return whoisparser.Parse(raw)
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would really appreciate if we can get rid of this indirection that is solely there for testing. Can we rather mock a WHOIS server response in the tests? In any case this could be

Suggested change
if w.whoisLookup == nil {
w.whoisLookup = func(client *whois.Client, domain, server string) (string, error) {
return client.Whois(domain, server)
}
}
if w.parseWhoisData == nil {
w.parseWhoisData = func(raw string) (whoisparser.WhoisInfo, error) {
return whoisparser.Parse(raw)
}
}
if w.whoisLookup == nil {
w.whoisLookup = func(client *whois.Client, domain, server string) (string, error) {
return client.Whois(domain, server)
}
}
if w.parseWhoisData == nil {
w.parseWhoisData = whoisparser.Parse
}

Copy link
Contributor Author

@paulojmdias paulojmdias Feb 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the code function overwrite in the tests also. Please double-check for now.

However, you want to have some tests like this for this plugin? With some custom files on this side?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly. We do have some tests (e.g. here) with some "test cases" being a self-contained directly each and some testing mock to send the test-case data to the plugin...


return nil
}

// Plugin registration
func init() {
inputs.Add("whois", func() telegraf.Input {
return &Whois{
Timeout: config.Duration(5 * time.Second),
}
Comment on lines +190 to +192
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing the default value for Server

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the heads-up. This makes me find the server sent to the Client is not working with the same behavior as being empty. I have different outputs if I send whois.iana.org as a server or if I send nothing to the client.

Output setting server as empty:

whois,domain=influxdata-test.com status_code=6i 1739542332000000000

Output setting server as the supposed default whois.iana.org:

> whois,domain=influxdata-test.com creation_timestamp=473385600i,dnssec_enabled=false,expiration_timestamp=0i,expiry=0i,name_servers="a.gtld-servers.net,b.gtld-servers.net,c.gtld-servers.net,d.gtld-servers.net,e.gtld-servers.net,f.gtld-servers.net,g.gtld-servers.net,h.gtld-servers.net,i.gtld-servers.net,j.gtld-servers.net,k.gtld-servers.net,l.gtld-servers.net,m.gtld-servers.net",registrant="",registrar="",status_code=5i,updated_timestamp=1701907200i 1739809813000000000

Technically, what is happening is (like whois CLI), when we send a server, the whois won't follow redirection if it is not explicitly defined, which leads to only parsing the data from the TLD, which is this case is .com

     -Q      Do a quick lookup; whois will not attempt to follow referrals to other whois servers.  This is the default if a server is explicitly specified using one of the other options or in an environment variable.  See also the -R option.

Result with the default behavior:

❯ whois -h whois.iana.org influxdata-test.com
% IANA WHOIS server
% for more information on IANA, visit http://www.iana.org
% This query returned 1 object

refer:        whois.verisign-grs.com

domain:       COM

organisation: VeriSign Global Registry Services
address:      12061 Bluemont Way
address:      Reston VA 20190
address:      United States of America (the)

contact:      administrative
name:         Registry Customer Service
organisation: VeriSign Global Registry Services
address:      12061 Bluemont Way
address:      Reston VA 20190
address:      United States of America (the)
phone:        +1 703 925-6999
fax-no:       +1 703 948 3978
e-mail:       [email protected]

contact:      technical
name:         Registry Customer Service
organisation: VeriSign Global Registry Services
address:      12061 Bluemont Way
address:      Reston VA 20190
address:      United States of America (the)
phone:        +1 703 925-6999
fax-no:       +1 703 948 3978
e-mail:       [email protected]

nserver:      A.GTLD-SERVERS.NET 192.5.6.30 2001:503:a83e:0:0:0:2:30
nserver:      B.GTLD-SERVERS.NET 192.33.14.30 2001:503:231d:0:0:0:2:30
nserver:      C.GTLD-SERVERS.NET 192.26.92.30 2001:503:83eb:0:0:0:0:30
nserver:      D.GTLD-SERVERS.NET 192.31.80.30 2001:500:856e:0:0:0:0:30
nserver:      E.GTLD-SERVERS.NET 192.12.94.30 2001:502:1ca1:0:0:0:0:30
nserver:      F.GTLD-SERVERS.NET 192.35.51.30 2001:503:d414:0:0:0:0:30
nserver:      G.GTLD-SERVERS.NET 192.42.93.30 2001:503:eea3:0:0:0:0:30
nserver:      H.GTLD-SERVERS.NET 192.54.112.30 2001:502:8cc:0:0:0:0:30
nserver:      I.GTLD-SERVERS.NET 192.43.172.30 2001:503:39c1:0:0:0:0:30
nserver:      J.GTLD-SERVERS.NET 192.48.79.30 2001:502:7094:0:0:0:0:30
nserver:      K.GTLD-SERVERS.NET 192.52.178.30 2001:503:d2d:0:0:0:0:30
nserver:      L.GTLD-SERVERS.NET 192.41.162.30 2001:500:d937:0:0:0:0:30
nserver:      M.GTLD-SERVERS.NET 192.55.83.30 2001:501:b1f9:0:0:0:0:30
ds-rdata:     19718 13 2 8acbb0cd28f41250a80a491389424d341522d946b0da0c0291f2d3d771d7805a

whois:        whois.verisign-grs.com

status:       ACTIVE
remarks:      Registration information: http://www.verisigninc.com

created:      1985-01-01
changed:      2023-12-07
source:       IANA

Results explicitly saying to follow redirects when the server is set:

❯ whois -h whois.iana.org -R influxdata-test.com
% IANA WHOIS server
% for more information on IANA, visit http://www.iana.org
% This query returned 1 object

refer:        whois.verisign-grs.com

domain:       COM

organisation: VeriSign Global Registry Services
address:      12061 Bluemont Way
address:      Reston VA 20190
address:      United States of America (the)

contact:      administrative
name:         Registry Customer Service
organisation: VeriSign Global Registry Services
address:      12061 Bluemont Way
address:      Reston VA 20190
address:      United States of America (the)
phone:        +1 703 925-6999
fax-no:       +1 703 948 3978
e-mail:       [email protected]

contact:      technical
name:         Registry Customer Service
organisation: VeriSign Global Registry Services
address:      12061 Bluemont Way
address:      Reston VA 20190
address:      United States of America (the)
phone:        +1 703 925-6999
fax-no:       +1 703 948 3978
e-mail:       [email protected]

nserver:      A.GTLD-SERVERS.NET 192.5.6.30 2001:503:a83e:0:0:0:2:30
nserver:      B.GTLD-SERVERS.NET 192.33.14.30 2001:503:231d:0:0:0:2:30
nserver:      C.GTLD-SERVERS.NET 192.26.92.30 2001:503:83eb:0:0:0:0:30
nserver:      D.GTLD-SERVERS.NET 192.31.80.30 2001:500:856e:0:0:0:0:30
nserver:      E.GTLD-SERVERS.NET 192.12.94.30 2001:502:1ca1:0:0:0:0:30
nserver:      F.GTLD-SERVERS.NET 192.35.51.30 2001:503:d414:0:0:0:0:30
nserver:      G.GTLD-SERVERS.NET 192.42.93.30 2001:503:eea3:0:0:0:0:30
nserver:      H.GTLD-SERVERS.NET 192.54.112.30 2001:502:8cc:0:0:0:0:30
nserver:      I.GTLD-SERVERS.NET 192.43.172.30 2001:503:39c1:0:0:0:0:30
nserver:      J.GTLD-SERVERS.NET 192.48.79.30 2001:502:7094:0:0:0:0:30
nserver:      K.GTLD-SERVERS.NET 192.52.178.30 2001:503:d2d:0:0:0:0:30
nserver:      L.GTLD-SERVERS.NET 192.41.162.30 2001:500:d937:0:0:0:0:30
nserver:      M.GTLD-SERVERS.NET 192.55.83.30 2001:501:b1f9:0:0:0:0:30
ds-rdata:     19718 13 2 8acbb0cd28f41250a80a491389424d341522d946b0da0c0291f2d3d771d7805a

whois:        whois.verisign-grs.com

status:       ACTIVE
remarks:      Registration information: http://www.verisigninc.com

created:      1985-01-01
changed:      2023-12-07
source:       IANA

# whois.verisign-grs.com

No match for domain "INFLUXDATA-TEST.COM".
>>> Last update of whois database: 2025-02-17T18:34:30Z <<<

So, I do not understand why the library is not respecting the disableReferral, which by default is false, but either way, it seems the return comes from here.

Due to these concerns, does it make sense to support custom whois servers, or should we open an issue and let that happen for the next interaction?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main issue is on this line. When a server is provided, in the end, they return an answer from all the steps. When is not provided, the library will get the server at this point, query directly the server here and if there is not any additional whois referral server, will return here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it is best to report that issue upstream, since they are providing a way to set a custom server, it should be supported.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

})
}
Loading
Loading