Skip to content

Commit

Permalink
Merge pull request #3 from ygsa/fllow_arstercz_influx
Browse files Browse the repository at this point in the history
Delete verification tag from x509_cert metrics for compatible vicMetrics.
  • Loading branch information
arstercz authored May 15, 2023
2 parents ee52e58 + 3f1b383 commit c6a10cb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions plugins/inputs/x509_cert/x509_cert.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,10 @@ func (c *X509Cert) Gather(acc telegraf.Accumulator) error {

_, err = cert.Verify(opts)
if err == nil {
tags["verification"] = "valid"
fields["verification_code"] = 0
} else {
tags["verification"] = "invalid"
fields["verification_code"] = 1
fields["verification_error"] = err.Error()
//fields["verification_error"] = err.Error()
}

acc.AddFields("x509_cert", fields, tags)
Expand Down

0 comments on commit c6a10cb

Please sign in to comment.