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

scrape insecure not working #41

Closed
strowi opened this issue Oct 27, 2017 · 5 comments
Closed

scrape insecure not working #41

strowi opened this issue Oct 27, 2017 · 5 comments

Comments

@strowi
Copy link

strowi commented Oct 27, 2017

Hi,

nice work! But i got a little error, it seems the ssl-certificate of the scrape-target is checked anyway..?

/usr/local/bin/prometheus_nginx_exporter -insecure -nginx.scrape_uri https://localhost/nginx_status_vts
2017/10/27 11:35:22 Starting nginx_vts_exporter (version=0.6, branch=HEAD, revision=e48bd6899d8864b11b9f71f852b049ec3ad2ae26)
2017/10/27 11:35:22 Build context (go=go1.8.3, user=root@3b0fc1d0acb6, date=20170808-07:09:08)
2017/10/27 11:35:22 Starting Server at : :9913
2017/10/27 11:35:22 Metrics endpoint: /metrics
2017/10/27 11:35:22 Metrics namespace: nginx
2017/10/27 11:35:22 Scraping information from : https://localhost/nginx_status_vts
2017/10/27 11:35:23 fetchHTTP failed Get https://localhost/nginx_status_vts: x509: certificate is valid for *.xyz.de, not localhost
@remeika
Copy link

remeika commented Nov 9, 2017

Accessing localhost over HTTPS doesn't make a ton of sense. I would access it over HTTP by running prometheus_nginx_exporter -insecure -nginx.scrape_uri http://localhost/nginx_status_vts.

Accessing a localhost endpoint never leaves the host, so you don't need to worry about unencrypted network traffic. If you're concerned about exposing an unencrypted endpoint on the nginx host, just make sure that the VTS module stats is only listening on localhost.

@strowi
Copy link
Author

strowi commented Nov 11, 2017

Of course you are correct, scraping localhost via ssl doesn't make much sense. I just assumed the error would be the same as scraping some self-signed ssl endpoint.

@sysulq
Copy link
Owner

sysulq commented Nov 13, 2017

Maybe we could consider using -k like curl to do insecure https request?

@strowi
Copy link
Author

strowi commented Nov 15, 2017

yes, i thought thats what the -insecure was for... isn't it?

sysulq added a commit that referenced this issue Feb 25, 2018
@sysulq
Copy link
Owner

sysulq commented Feb 25, 2018

support -insecure now, please check the latest release.

@sysulq sysulq closed this as completed Feb 25, 2018
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

No branches or pull requests

3 participants