Skip to content

Commit

Permalink
Implementing comments from @danielnelson
Browse files Browse the repository at this point in the history
  • Loading branch information
jtyr committed Jun 8, 2018
1 parent bd12da1 commit 7001319
Show file tree
Hide file tree
Showing 6 changed files with 267 additions and 287 deletions.
2 changes: 1 addition & 1 deletion plugins/inputs/all/all.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ import (
_ "github.com/influxdata/telegraf/plugins/inputs/socket_listener"
_ "github.com/influxdata/telegraf/plugins/inputs/solr"
_ "github.com/influxdata/telegraf/plugins/inputs/sqlserver"
_ "github.com/influxdata/telegraf/plugins/inputs/ssl_cert"
_ "github.com/influxdata/telegraf/plugins/inputs/x509_cert"
_ "github.com/influxdata/telegraf/plugins/inputs/statsd"
_ "github.com/influxdata/telegraf/plugins/inputs/syslog"
_ "github.com/influxdata/telegraf/plugins/inputs/sysstat"
Expand Down
39 changes: 0 additions & 39 deletions plugins/inputs/ssl_cert/README.md

This file was deleted.

217 changes: 0 additions & 217 deletions plugins/inputs/ssl_cert/ssl_cert_test.go

This file was deleted.

45 changes: 45 additions & 0 deletions plugins/inputs/x509_cert/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# 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 of local SSL files
# files = ["/etc/ssl/certs/ssl-cert-snakeoil.pem"]
## List of servers
# servers = ["tcp://example.org:443"]
## 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
```


### Metrics

- `x509_cert`
- tags:
- `server` (only if `servers` parameter is defined)
- `file` (only if `files` parameter is defined)
- fields:
- `expiry` (int, seconds)
- `age` (int, seconds)
- `startdate` (int, seconds)
- `enddate` (int, seconds)


### 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
```
Loading

0 comments on commit 7001319

Please sign in to comment.