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

blackbox exporter failing to recognised the service is not responding #79

Closed
sudhirpandey opened this issue Nov 21, 2016 · 7 comments
Closed
Labels

Comments

@sudhirpandey
Copy link

sudhirpandey commented Nov 21, 2016

I was quite amazed to see that the service is termed still up and ok while in the stdout logs of the blackbox exporter is showing errors like this

time="2016-11-21T10:46:40Z" level=warning msg="Error for HTTP request to http://svc.proj.svc:19080: Get http://svc.proj.svc:19080: dial tcp4 172.30.162.209:19080: getsockopt: no route to host" source="http.go:159"

I have intentionally , scaled a service to zero pods in openshift origin. and i was expecting a instance down alert from prometheus.. How ever form target view the blackbox exporter never seems to recognize that service is down and is not responding

while i try to directly query the backend service using the blackbox exportetservice ip

curl http://172.30.235.19/probe?target=svc.proj.svc:19080
probe_ip_protocol 4
probe_http_status_code 0
probe_http_content_length 0
probe_http_redirects 0
probe_http_ssl 0
probe_duration_seconds 3.031048
probe_success 0

i am using module http_2xx so since the status code is 0 , should not it have raised (lavel) service as down in targets view in prometheus Web UI.

Also additionally this query works

curl http://172.30.235.19/probe?target=svc.project.svc:19080&module=http_2xx

probe_http_status_code 0
probe_http_content_length 0
probe_http_redirects 0
probe_http_ssl 0
probe_duration_seconds 3.040584
probe_success 0

while

 curl http://172.30.235.19/probe?module=http_2xx&target=svc.project.svc:19080

produces
Target parameter is missing

and bails out .

Am i missing something on the alert part. if a service dont have any endpoints i am hoping that probing to it fails or i am missing something?

I am using blackbox exporter container version0.3,0
as it start it shows

"Starting blackbox_exporter (version=0.3.0, branch=master, revision=43cfa9854e595993b64925c8a5b5f39086b03dae)"
@brian-brazil
Copy link
Contributor

Those are showing probe_success as 0 as is expected when the target is down.

Target parameter is missing

That's due to bash interpreting the & as the end of the command. Quote the URL.

@sudhirpandey
Copy link
Author

sudhirpandey commented Nov 21, 2016

But the target is down and is not replying(reachable) as we can see from pod logs
and probe_http_status_code 0 is as well not 200 ,
so probe sucess is 0

Then should not i get a error as its down in prometheus web UI. The State is still UP while the service is down and not replying.

screen shot 2016-11-21 at 12 07 00 pm

@brian-brazil
Copy link
Contributor

I think you should read https://www.robustperception.io/whats-up-doc/, in particular the last paragraph.

@sudhirpandey
Copy link
Author

sudhirpandey commented Nov 21, 2016

Thanks for more info, but for particular service that is down ..right now .. i am still getting
up=1
Just a bit confused that it should at least have been up=0 and if it was not sufficient , we could have employ the other sources to make sure of it.

@brian-brazil
Copy link
Contributor

That's correct. The blackbox exporter is being successfully scraped. You need to look at probe_success to see if the probe worked.

@sudhirpandey
Copy link
Author

Thanks 👍 .
I used the scrapped metric and it work as expected now. Was a bit confusing though, thanks for the help :).

@ghost ghost mentioned this issue Sep 26, 2017
@vishalsparmar
Copy link

That's correct. The blackbox exporter is being successfully scraped. You need to look at probe_success to see if the probe worked.

@brian-brazil We have prometheus installed and also blackboxexporter via helm. Post defining servicemonitor for Blackboxexporter i am able to see my blackboxexporter service pods in Prometheus Target but its not probing the targets added. screen shot for prometheus discovery
can you advise whats missed here please. Thanks
Screenshot 2019-09-16 at 12 44 21

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

No branches or pull requests

3 participants