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

Unable to scrape Google.com with Probe_Success = 1 #2256

Closed
lalithasoundarya opened this Issue Dec 6, 2016 · 5 comments

Comments

Projects
None yet
4 participants
@lalithasoundarya
Copy link

lalithasoundarya commented Dec 6, 2016

What did you do?
I installed prometheus on my pc and tried to scrape Google.com but the probe status is 0 .

What did you expect to see?
I expect to see the Probe_Success = 1 for scraping Google.com
What did you see instead? Under which circumstances?
Iam seeing probe success = 0 message for google.com

Environment
windows

  • System information:

    insert output of uname -srm here
    Microsoft Windows [Version 6.1.7601]

  • Prometheus version:

    insert output of prometheus -1.3.1 windows amd64

  • Alertmanager version:

    insert output of alertmanager -version here (if relevant to the issue)

  • Prometheus configuration file:

global:
    external_labels:
       monitor: 'hostname'

rule_files:
    - 'C:\Users\prasanta1.sahoo\go\bin\alert.rules'

scrape_configs:
  - job_name: 'bb'
    scrape_interval: 30s
    scrape_timeout: 10s
    metrics_path: /probe
    params:
      module: [http_2xx]  # Look for a HTTP 200 response.
    URL: google.com
    
    
    relabel_configs:
      - source_labels: [__address__]
        regex: (.*)(:80)?
        target_label: __param_target
        replacement: ${1}
      - source_labels: [__param_target]
        regex: (.*)
        target_label: instance
        replacement: ${1}
      - source_labels: []
        regex: .*
        target_label: __address__
        replacement: 10.50.89.143:9115  # Blackbox exporter.
  Please let us know for any changes in the above config file.
  • Alertmanager configuration file:
insert configuration here (if relevant to the issue)
  • Logs:
insert Prometheus and Alertmanager logs relevant to the issue here

my global config.docx

@lalithasoundarya lalithasoundarya changed the title i installed prometheus and graphana on my machine and Iam facing an issue.Every ip which I have attached to the prometheus tool status is showing defaultly up.How to know the actual status and how to link prometheus and graphana please resolve my query i installed prometheus and graphana on my machine and Iam facing an issue.Every ip which I have attached to the prometheus tool is showing probe_success message and status is defaultly up.How to know the actual status and how to link prometheus and graphana please resolve my query Dec 6, 2016

@lalithasoundarya lalithasoundarya changed the title i installed prometheus and graphana on my machine and Iam facing an issue.Every ip which I have attached to the prometheus tool is showing probe_success message and status is defaultly up.How to know the actual status and how to link prometheus and graphana please resolve my query I installed prometheus and graphana on my machine and Iam facing an issue.Every ip which I have attached to the prometheus tool is showing probe_success message and status is defaultly up.How to know the actual status and how to link prometheus and graphana please resolve my query Dec 6, 2016

@lalithasoundarya lalithasoundarya changed the title I installed prometheus and graphana on my machine and Iam facing an issue.Every ip which I have attached to the prometheus tool is showing probe_success message and status is defaultly up.How to know the actual status and how to link prometheus and graphana please resolve my query Unable to scrape Google.com with Probe_Success = 1 Dec 6, 2016

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Dec 6, 2016

That configuration is invalid and will be rejected by Prometheus. You want a static_configs, not a URL.

@lalithasoundarya

This comment has been minimized.

Copy link
Author

lalithasoundarya commented Dec 6, 2016

Thanks for the suggestion.As per you suggestion we modified our config file as following.
global:
external_labels:
monitor: 'hostname'

rule_files:
- 'C:\Users\prasanta1.sahoo\go\bin\alert.rules'

scrape_configs:

  • job_name: 'bb'
    scrape_interval: 30s
    scrape_timeout: 10s
    metrics_path: /probe
    params:
    module: [http_2xx] # Look for a HTTP 200 response.
    static_configs:

    • targets: [ 'google.com']

    relabel_configs:

    • source_labels: [address]
      regex: (.*)(:80)?
      target_label: __param_target
      replacement: ${1}
    • source_labels: [__param_target]
      regex: (.*)
      target_label: instance
      replacement: ${1}
    • source_labels: []
      regex: .*
      target_label: address
      replacement: 10.50.90.1:9115 # Blackbox exporter.

blackbox exporter config file
modules:
http_2xx:
prober: http
timeout: 5s
http:
http_post_2xx:
prober: http
timeout: 5s
http:
method: POST
tcp_connect:
prober: tcp
timeout: 5s
pop3s_banner:
prober: tcp
tcp:
query_response:
- expect: "^+OK"

ssh_banner:
prober: tcp
timeout: 5s
tcp:
query_response:
- expect: "^SSH-2.0-"
irc_banner:
prober: tcp
timeout: 5s
tcp:
query_response:
- send: "NICK prober"
- send: "USER prober prober prober :prober"
- expect: "PING :([^ ]+)"
send: "PONG ${1}"
- expect: "^:[^ ]+ 001"
icmp:
prober: icmp
timeout: 5s

PrometheusResultForGoogle.docx
We are using The above posted config file .We are using black box exporter as well and please have a glance of both the config files. Our issue currently is we are getting the status as up but probe_success=0 always.Please find the attached screen shot. And please provide suggestions for preparing appropriate config file to monitor google with probe_success=1.

@grobie

This comment has been minimized.

Copy link
Member

grobie commented Mar 5, 2017

Check the logs of the blackbox_exporter. You might need to change the IP protocol to use IPv4. For further questions, please use the prometheus-users mailing list.

@grobie grobie closed this Mar 5, 2017

@wdp-007

This comment has been minimized.

Copy link

wdp-007 commented May 21, 2017

I came accross the same question, how did it resolved?

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 23, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 23, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.