Skip to content

Commit

Permalink
Align README with the code
Browse files Browse the repository at this point in the history
  • Loading branch information
jtyr committed Jul 22, 2018
1 parent e53e1e7 commit d0e540a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions plugins/inputs/x509_cert/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand All @@ -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)
Expand All @@ -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
```
2 changes: 1 addition & 1 deletion plugins/inputs/x509_cert/x509_cert.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d0e540a

Please sign in to comment.