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

Add SSL/TLS support to nginx input plugin #2883

Merged

Conversation

bobmshannon
Copy link
Contributor

@bobmshannon bobmshannon commented Jun 3, 2017

This PR adds support for an optional SSL/TLS config in the nginx input plugin.

Required for all PRs:

  • Signed CLA.
  • Associated README.md updated.
  • Has appropriate unit tests.

Import required packages
@bobmshannon bobmshannon force-pushed the enhancement/nginx_ssl_config branch from 8ec7396 to 30ee576 Compare June 3, 2017 19:34
@danielnelson
Copy link
Contributor

Thanks the the PR, we need to make sure we don't create a new transport per interval. I recently fixed this in a few other plugin in #2782.

@bobmshannon bobmshannon force-pushed the enhancement/nginx_ssl_config branch 2 times, most recently from d54552c to 9424e64 Compare June 7, 2017 01:24
@bobmshannon
Copy link
Contributor Author

Hey @danielnelson, thanks for the feedback. I've updated this PR so that the transport is re-used, using the apache input plugin as an example for doing so.

@bobmshannon bobmshannon force-pushed the enhancement/nginx_ssl_config branch from 9424e64 to 851493a Compare June 7, 2017 01:29
@bobmshannon bobmshannon force-pushed the enhancement/nginx_ssl_config branch from 851493a to 5eb122f Compare June 7, 2017 01:35
Copy link
Contributor

@danielnelson danielnelson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few minor formatting things to do.

## An array of Nginx stub_status URI to gather stats.
urls = ["http://localhost/status"]
# Read Nginx's basic status information (ngx_http_stub_status_module)
[[inputs.nginx]]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the toml table header here, it is added automatically when outputting the sample config.

# TLS/SSL configuration
ssl_ca = "var/security/ca.pem"
ssl_cert = "var/security/cert.cer"
ssl_key = "var/security/key.key"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the paths to /etc/telegraf/<file> to match other plugins.

insecure_skip_verify = false

# HTTP response timeout (default: 5s)
response_timeout = "10s"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set this to 5s since that's the default

@danielnelson danielnelson added this to the 1.4.0 milestone Jun 8, 2017
@danielnelson danielnelson merged commit 1c73cab into influxdata:master Jun 8, 2017
@danielnelson
Copy link
Contributor

Thank you! This will be in 1.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants