https://github.com/adamdecaf/rdap_exporter
Registration Data Access Protocol (RDAP) Prometheus Exporter
https://github.com/adamdecaf/rdap_exporter
prometheus rdap
Last synced: 8 months ago
JSON representation
Registration Data Access Protocol (RDAP) Prometheus Exporter
- Host: GitHub
- URL: https://github.com/adamdecaf/rdap_exporter
- Owner: adamdecaf
- License: mit
- Created: 2018-05-28T18:18:12.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2025-03-17T13:55:30.000Z (about 1 year ago)
- Last Synced: 2025-04-11T05:52:12.767Z (about 1 year ago)
- Topics: prometheus, rdap
- Language: Go
- Size: 649 KB
- Stars: 9
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rdap_exporter
[](https://github.com/adamdecaf/rdap_exporter/actions)
[](https://goreportcard.com/report/github.com/adamdecaf/rdap_exporter)
Registration Data Access Protocol (RDAP) prometheus exporter. Originally based on [shift/domain_exporter](https://github.com/shift/domain_exporter).
### Metrics
Currently only one metric (`domain_expiration`) is exported ontop of the default `prometheus/client_golang` metrics.
```
# HELP domain_expiration Days until the RDAP expiration event states this domain will expire
# TYPE domain_expiration gauge
domain_expiration{domain="example.cz"} 458
```
### Install / Usage
You can download and run the latest docker image [`adamdecaf/rdap_exporter`](https://hub.docker.com/r/adamdecaf/rdap_exporter/) from the Docker Hub.
Running the image looks like the following:
```
# Using testdata/good.domains from repository
$ docker run -it -p 9099:9099 -v $(pwd)/testdata:/conf adamdecaf/rdap_exporter:v0.2.0 -domain-file=/conf/good.domains
2018/05/28 21:15:31 starting rdap_exporter (v0.2.0)
2018/05/28 21:15:34 example.cz expires in 458.00 days
```
### Example Prometheus Alert
The following alert will be triggered when domains expire within 45 days
```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"
```
### Developing / Contributing
If you find a bug, have a question or want more metrics exposed feel free to open either an issue or a Pull Request. I'll try and review it quickly and have it merged.
You can build the sources with `make build`. Run tests with `make test`. Currently we use Go 1.13.