This prometheus exporter will export rpki status for specific prefix and AS combination. Status can be set as:
- invalid
- valid
- not-found
This exporter uses https://rpki-validator.ripe.net/ to check the status of rpki.
go install github.com/tomvil/rpki_exporter@latest
Configuration example:
refresh_interval: 3600 # not required, 600 is the default value. It's here just to show that it can be changed if needed. targets: - as: 15169 prefixes: # All prefixes must be a valid network address with a prefix at the end! - 2001:4860:4864::/48 - 2404:6800:4001::/48 - 8.8.4.0/24 - 8.8.8.0/24- This example can be found in
config.example.yamlfile. - You can have multiple AS numbers defined and of course multiple prefixes per AS.
- Generate configuration file.
./rpki_exporter --config.file your-configuration-file.yaml- If
--config.fileflag is not set, by default exporter will try to openconfig.yamlfile.
- If
| Name | Description | Default |
|---|---|---|
| web.listen-address | Address on which to expose metrics and web interface. | :9959 |
| web.metrics-path | Path under which to expose metrics. | /metrics |
| config.file | Path to config file | config.yaml |
# HELP rpki_queries_failed_total Number of failed queries # TYPE rpki_queries_failed_total counter rpki_queries_failed_total 0 # HELP rpki_queries_successful_total Number of successful queries # TYPE rpki_queries_successful_total counter rpki_queries_successful_total 4 # HELP rpki_status RPKI Status of the prefix (0 - invalid, 1 - valid, 2 - not found) # TYPE rpki_status gauge rpki_status{asn="AS15169",max_length="24",prefix="8.8.4.0/24"} 1 rpki_status{asn="AS15169",max_length="24",prefix="8.8.8.0/24"} 1 rpki_status{asn="AS15169",max_length="48",prefix="2001:4860:4864::/48"} 1 rpki_status{asn="AS15169",max_length="48",prefix="2404:6800:4001::/48"} 1