https://github.com/shift/domain_exporter
Prometheus WHOIS domain details exporter.
https://github.com/shift/domain_exporter
domains monitoring prometheus-exporter
Last synced: about 2 months ago
JSON representation
Prometheus WHOIS domain details exporter.
- Host: GitHub
- URL: https://github.com/shift/domain_exporter
- Owner: shift
- License: apache-2.0
- Created: 2017-02-14T19:45:21.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2025-01-08T13:39:22.000Z (5 months ago)
- Last Synced: 2025-03-28T16:11:41.844Z (about 2 months ago)
- Topics: domains, monitoring, prometheus-exporter
- Language: Go
- Size: 3.93 MB
- Stars: 94
- Watchers: 3
- Forks: 30
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# domain_exporter
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fshift%2Fdomain_exporter?ref=badge_shield)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](https://quay.io/repository/shift/domain_exporter). You can pull this with `docker pull ghcr.io/shift/domain_exporter`.
### Running on Kubernetes
[Here](contrib/k8s-domain-exporter.yaml) is an example Kubernetes deployment configuration for how to deploy the domain_exporter.
### 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{} < 45
for: 24h
labels:
severity: warning
annotations:
description: "{{ $labels.domain }} expires in {{ $value }} days"
- alert: DomainUnfindable
expr: domain_expiration_unfindable > 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
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fshift%2Fdomain_exporter?ref=badge_large)