From d0e540ad6fef94432ee1ba252311928c5e3a52b0 Mon Sep 17 00:00:00 2001 From: Jiri Tyr Date: Sun, 22 Jul 2018 21:23:18 +0100 Subject: [PATCH] Align README with the code --- plugins/inputs/x509_cert/README.md | 16 ++++++++-------- plugins/inputs/x509_cert/x509_cert.go | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/plugins/inputs/x509_cert/README.md b/plugins/inputs/x509_cert/README.md index 44554b2a82d4a..0758ecaaa3027 100644 --- a/plugins/inputs/x509_cert/README.md +++ b/plugins/inputs/x509_cert/README.md @@ -9,16 +9,17 @@ file or network connection. ```toml # Reads metrics from a SSL certificate [[inputs.x509_cert]] - ## List of local SSL files - # files = ["/etc/ssl/certs/ssl-cert-snakeoil.pem"] - ## List of servers - # servers = ["tcp://example.org:443"] + ## List certificate sources + # sources = ["/etc/ssl/certs/ssl-cert-snakeoil.pem", "https://example.org"] + ## Timeout for SSL connection # timeout = 5 + ## 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 ``` @@ -28,8 +29,7 @@ file or network connection. - `x509_cert` - tags: - - `server` (only if `servers` parameter is defined) - - `file` (only if `files` parameter is defined) + - `source` - source of the certificate - fields: - `expiry` (int, seconds) - `age` (int, seconds) @@ -40,6 +40,6 @@ file or network connection. ### Example output ``` -x509_cert,server=google.com:443,host=myhost age=1753627i,expiry=5503972i,startdate=1516092060i,enddate=1523349660i 1517845687000000000 -x509_cert,host=myhost,file=/path/to/the.crt age=7522207i,expiry=308002732i,startdate=1510323480i,enddate=1825848420i 1517845687000000000 +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 ``` diff --git a/plugins/inputs/x509_cert/x509_cert.go b/plugins/inputs/x509_cert/x509_cert.go index 70ffff5f64d7a..2de328290d77f 100644 --- a/plugins/inputs/x509_cert/x509_cert.go +++ b/plugins/inputs/x509_cert/x509_cert.go @@ -18,7 +18,7 @@ import ( ) const sampleConfig = ` - ## List of servers and local SSL files + ## List certificate sources # sources = ["/etc/ssl/certs/ssl-cert-snakeoil.pem", "tcp://example.org:443"] ## Timeout for SSL connection