telegraf/plugins/inputs/x509_cert/README.md

51 lines
1.2 KiB
Markdown
Raw Normal View History

2018-07-30 19:12:45 +00:00
# X509 Cert Input Plugin
This plugin provides information about X509 certificate accessible via local
file or network connection.
### Configuration
```toml
# Reads metrics from a SSL certificate
[[inputs.x509_cert]]
## List certificate sources
2018-10-17 18:46:44 +00:00
sources = ["/etc/ssl/certs/ssl-cert-snakeoil.pem", "https://example.org:443"]
2018-07-30 19:12:45 +00:00
## Timeout for SSL connection
2018-07-30 19:14:55 +00:00
# timeout = "5s"
2018-07-30 19:12:45 +00:00
## Optional TLS Config
# tls_ca = "/etc/telegraf/ca.pem"
# tls_cert = "/etc/telegraf/cert.pem"
# tls_key = "/etc/telegraf/key.pem"
## Use TLS but skip chain & host verification
# insecure_skip_verify = false
```
### Metrics
2018-10-19 06:34:59 +00:00
- x509_cert
2018-07-30 19:12:45 +00:00
- tags:
2018-10-19 06:34:59 +00:00
- source - source of the certificate
- organization
- organizational_unit
- country
- province
- locality
2018-07-30 19:12:45 +00:00
- fields:
2018-10-19 06:34:59 +00:00
- expiry (int, seconds)
- age (int, seconds)
- startdate (int, seconds)
- enddate (int, seconds)
2018-07-30 19:12:45 +00:00
### Example output
```
x509_cert,host=myhost,source=https://example.org age=1753627i,expiry=5503972i,startdate=1516092060i,enddate=1523349660i 1517845687000000000
x509_cert,host=myhost,source=/etc/ssl/certs/ssl-cert-snakeoil.pem age=7522207i,expiry=308002732i,startdate=1510323480i,enddate=1825848420i 1517845687000000000
```