Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x509_cert: Error when site SSL is not valid #6066

Closed
Jokuh opened this issue Jul 4, 2019 · 4 comments
Closed

x509_cert: Error when site SSL is not valid #6066

Jokuh opened this issue Jul 4, 2019 · 4 comments
Assignees
Labels
bug unexpected problem or unintended behavior

Comments

@Jokuh
Copy link

Jokuh commented Jul 4, 2019

Relevant telegraf.conf:
[[inputs.x509_cert]]
sources = ["https://www.testsite.com:443""]

Additional info:
The SSL of the site is currently expired, and I am trying to set up monitoring for that URL.

Expected behavior:
Telegraf exposes SSL metrics for www.google.com, and indicated that it is expired (i.e. expiry as a negative value). That way alerts can be set up for certificates that are already expired, and no monitored sites are lost out of sight when the dashboard time frame moves.

Actual behavior:
Because www.testsite.com is expired, the pluging throws an error "[inputs.x509_cert]: Error in plugin: cannot get SSL cert 'https://testsite.com:443': x509: certificate has expired or is not yet valid"

@danielnelson danielnelson added the bug unexpected problem or unintended behavior label Jul 9, 2019
@danielnelson
Copy link
Contributor

I think you must set insecure_skip_verify = true in order to check a potentially invalid certificate, can you give this a shot?

@Jokuh
Copy link
Author

Jokuh commented Jul 16, 2019

I think that was enabled, but unfortunately we have renewed the certificate so I cannot test anymore. I'll keep an eye on it.

@danielnelson
Copy link
Contributor

Will keep open until we can test this behavior. It seems like if we need insecure_skip_verify for invalid certs the documentation needs updated.

@glinton
Copy link
Contributor

glinton commented Jul 23, 2019

Closed by #6143

Note, insecure_skip_verify is deprecated. Config won't complain, it just doesn't get used anymore.

@glinton glinton closed this as completed Jul 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants