caarlos0 / domain_exporter

Exports the expiration time of your domains as prometheus metrics.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

.ai domains Unable to resolve

cdq502 opened this issue · comments

commented

Unable to resolve domain names with the .ai suffix. I also used the “--config=domains.yaml” parameter, but it does not work. Can users directly specify the host to resolve in the whois command using the -h option?

I have set the following in prometheus.yml:

  - job_name: domain
    metrics_path: /probe
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - target_label: __address__
        replacement: localhost:9222 # domain_exporter address
    static_configs:
      - targets:
        - google.com

domains.yaml:

domains:
- baidu.com
- name: wondershare.ai
  host: whois.godaddy.com

The startup command is set as follows:

nohup domain_exporter --config=domains.yaml &

Am I using it incorrectly?

$ whois wondershare.ai
This TLD has no whois server.

maybe that's the cause?

commented
$ whois wondershare.ai
This TLD has no whois server.

maybe that's the cause?

This cannot resolve the domain expiration time.

whois chatgpt.ai

This can resolve and find the domain expiration time.

whois -h whois.godaddy.com chatgpt.ai
commented

Most .ai domain names cannot be resolved directly using the whois command. I used your custom specified HOST method, but it did not work, so I am reporting it to you. Please check if there is a problem with my usage. Thank you.

copied the wrong command earlier:

$ whois -h whois.godaddy.com wondershare.ai
No match for "wondershare.ai" in the registrar database.

that said, in your prometheus.yml, you either remove the targets google.com thing and get only /metrics, or add it there with the host as well, so the url should be http://localhost:9222/probe?target=chatgpt.ai&host=whois.godaddy.com.

The difference is that, if you query from /metrics, results are cached, if you use /probe, they aren't.

commented

copied the wrong command earlier:

$ whois -h whois.godaddy.com wondershare.ai
No match for "wondershare.ai" in the registrar database.

that said, in your prometheus.yml, you either remove the targets google.com thing and get only /metrics, or add it there with the host as well, so the url should be http://localhost:9222/probe?target=chatgpt.ai&host=whois.godaddy.com.

The difference is that, if you query from /metrics, results are cached, if you use /probe, they aren't.

I see that it cannot be executed and still returns a domain expiration time of -1. Because I need to use it with the Grafana panel, I have also tried :

  - job_name: domain
    metrics_path: /probe
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - target_label: __address__
        replacement: localhost:9222 # domain_exporter address

domains.yaml

domains:
- google.com
- name: chatgpt.ai
  host: whois.godaddy.com

startup

nohup ./domain_exporter --config=domains.yaml &

Unfortunately, I still cannot successfully obtain the domain expiration time. wondershare.ai is an example. Most .ai domain names need to specify whois.godaddy.com to correctly find the expiration time. It’s just that I can’t achieve this in the domains.yml you provided. Can you provide a complete setup method?

  - job_name: domain
    metrics_path: /metrics # <- change here
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - target_label: __address__
        replacement: localhost:9222 # domain_exporter address
commented
  - job_name: domain
    metrics_path: /metrics # <- change here
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - target_label: __address__
        replacement: localhost:9222 # domain_exporter address

Hello, the content I posted before has always been
metrics_path: /probe

Please know!

According to ZoneDB, the .ai whois server is whois.nic.ai

$ whois -h whois.nic.ai wondershare.ai

Domain Name: wondershare.ai
Registry Domain ID: 1752901_nic_ai
Registry WHOIS Server: whois.nic.ai
Creation Date: 2023-02-21T09:09:25.304Z
Registrar: Key-Systems GmbH
Registrar Abuse Contact Email: abuse@key-systems.net
Registrar Abuse Contact Phone: +49.68949396850
Registry RegistrantID: 9zoye-HFbWL
RegistrantName: Redacted | EU Registrar
RegistrantOrganization: Wondershare Technology Co.,Ltd.
RegistrantStreet: 10F BlockD 5th Building Shenzhen Software Industrial
RegistrantStreet: Base Haitian 2nd Rd Nanshan District
RegistrantCity: Shenzhen
RegistrantState/Province: Guangdong
RegistrantPostal Code: 518057
RegistrantCountry: CN
RegistrantPhone: Redacted | EU Registrar
RegistrantFax: Redacted | EU Registrar
RegistrantEmail: Redacted | EU Registrar
Name Server: ns1.instradns.com
Name Server: ns2.instradns.com
Name Server: ns3.instradns.com
DNSSEC: unsigned
>>> Last update of WHOIS database: 2023-05-10T15:57:26.128Z <<<
  - job_name: domain
    metrics_path: /metrics # <- change here
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - target_label: __address__
        replacement: localhost:9222 # domain_exporter address

Hello, the content I posted before has always been
metrics_path: /probe

Please know!

before you had the domains in the targets, and now you don't.

closing as not an issue.