百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
D

domain_exporter

> 云原生
开源

Prometheus WHOIS 域名详细信息导出器。

100 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

Prometheus WHOIS 域名详细信息导出器。

domain_exporter

Very simple service which performs WHOIS lookups for a list of domains provided in the "config" file and exposes them on a "/metrics" endpoint for consumption via Prometheus.

yaml
domains:
  - google.com
  - google.co.uk

Flags:

bash
usage: domain_exporter []

Flags:
  -h, --help                  Show context-sensitive help (also try --help-long and --help-man).
      --config="domains.yml"  Domain exporter configuration file.
      --bind=":9203"          The address to listen on for HTTP requests.
      --log.level=info        Only log messages with the given severity or above. One of: [debug, info, warn, error]
      --log.format=logfmt     Output format of log messages. One of: [logfmt, json]
      --version               Show application version.

Docker image

We publish a docker image on the Quay registry. You can pull this with docker pull ghcr.io/shift/domain_exporter.

Running on Kubernetes

Here is an example Kubernetes deployment configuration for how to deploy the domain_exporter.

Probe Endpoint

In addition to the /metrics endpoint which exposes metrics for the configured domains, the exporter also provides a /probe endpoint which allows on-demand querying of specific domains.

Example usage:

http://localhost:9203/probe?target=google.com

Prometheus Configuration

You can configure Prometheus to use the domain_exporter with the following configuration:

yaml
- job_name: 'domain-exporter'
  metrics_path: /probe
  static_configs:
    - targets:
      - google.com  # Target to probe with whois.
      - facebook.com  # Target to probe with whois.
  relabel_configs:
    - source_labels: [__address__]
      target_label: __param_target
    - source_labels: [__param_target]
      target_label: instance
    - target_label: __address__
      replacement: localhost:9203  # The domain exporter's real hostname:port.

Example Prometheus Alert

The following alert will be triggered when domains expire within 45 days, or if they don't have a whois record available (perhaps having been long expired).

yaml
groups:
 - name: ./domain.rules
   rules:
    - alert: DomainExpiring
      expr: domain_expiration{}  0
      for: 24h
      labels:
        severity: critical
      annotations:
        description: "Unable to find or parse expiry for {{ $labels.domain }}"
    - alert: DomainMetricsAbsent
      expr: absent(domain_expiration) > 0
      for: 1h
      labels:
        severity: warning
      annotations:
        description: "Metrics for domain-exporter are absent"

FAQ

Why did I get a negative amount of days until expiry?

The WHOIS resposne probably doesn't parse correctly. Please create an issue with the response and we'll add the format.

License

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Godomainsmonitoringprometheus-exporter

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类云原生
定价开源

> 相关工具

K
Kubernetes
容器编排事实标准
H
Helm
Kubernetes 包管理器
S
seaweedfs
SeaweedFS is a distributed storage system for object storage (S3), file systems, and Iceberg tables,