MCPcopy Index your code
hub / github.com/caarlos0/domain_exporter

github.com/caarlos0/domain_exporter @v1.25.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.25.0 ↗ · + Follow
86 symbols 240 edges 22 files 19 documented · 22% updated 2d agov1.25.0 · 2026-02-19★ 3464 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

domain_exporter

Exports the expiration time of your domains as prometheus metrics.

Environment variables

  • DOMAIN_EXPORTER_URL_PREFIX — use when HTTP endpoint served with a prefix, e.g.: For this endpoint http://example.org/exporters/domains set to /exporters/domains. Not really required since useful only to prevent breaking human-oriented links. Defaults to empty string.

Configuration

On the Prometheus settings, add the domain_exporter probe:

- 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:
      - carlosbecker.com
      - carinebecker.com
      - watchub.pw

It works more or less like Prometheus's blackbox_exporter.

Alerting rules examples can be found on the _examples folder.

You can configure domain_exporter to always export metrics for specific domains. Create configuration file (host field is optional):

domains:
- google.com
- name: reddit.com        
  host: whois.godaddy.com # <-- custom whois server for reddit.com

And pass file path as argument to domain_exporter:

domain_exporter --config=domains.yaml

Notice that if you do that, results are cached, and you should change your job metrics_path to /metrics instead.

Install

homebrew:

brew install caarlos0/tap/domain_exporter

docker:

docker run --rm -p 9222:9222 caarlos0/domain_exporter

apt:

echo 'deb [trusted=yes] https://repo.caarlos0.dev/apt/ /' | sudo tee /etc/apt/sources.list.d/caarlos0.list
sudo apt update
sudo apt install domain_exporter

yum:

echo '[caarlos0]
name=caarlos0
baseurl=https://repo.caarlos0.dev/yum/
enabled=1
gpgcheck=0' | sudo tee /etc/yum.repos.d/caarlos0.repo
sudo yum install domain_exporter

deb/rpm/apk:

Download the .apk, .deb or .rpm from the releases page and install with the appropriate commands.

manually:

Download the pre-compiled binaries from the releases page or clone the repository build from source.

Stargazers over time

Stargazers over time

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Function 32
Method 31
Struct 18
TypeAlias 4
Interface 1

Languages

Go100%

Modules by API surface

internal/whois/adapter_ph.go7 symbols
internal/whois/adapter_vn.go6 symbols
internal/safeconfig/safeconfig.go6 symbols
internal/refresher/refresher_test.go5 symbols
internal/refresher/refresher.go5 symbols
internal/collector/domain.go5 symbols
internal/client/multi_test.go5 symbols
internal/client/cache_test.go5 symbols
internal/whois/whois.go4 symbols
internal/whois/adapter_lu.go4 symbols
internal/whois/adapter_kz.go4 symbols
internal/whois/adapter_jp.go4 symbols

For agents

$ claude mcp add domain_exporter \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page