Skip to content
New issue

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

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

Already on GitHub? # to your account

Fetching health summary failed #133

Closed
NMamont opened this issue Aug 21, 2019 · 2 comments
Closed

Fetching health summary failed #133

NMamont opened this issue Aug 21, 2019 · 2 comments

Comments

@NMamont
Copy link

NMamont commented Aug 21, 2019

consul_exporter --version
consul_exporter, version 0.5.0 (branch: HEAD, revision: a5d31c1)
build user: root@050e917b0024
build date: 20190717-15:58:53
go version: go1.12.7

time="2019-08-21T08:13:36Z" level=error msg="Failed to query service health: Get https://consul.****.com/v1/health/service/openldap-389?stale=: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)" source="consul_exporter.go:310"

but when I trying get this data inside a container:

wget -qO- https://consul.****.com/v1/health/service/openldap-389?stale=:
wget: note: TLS certificate validation not implemented
[{"Node":{"ID":"f8a8ae47-8fcc-357b-afd0-a350e92537b4","Node":"node_name","Address":"some_address","Datacenter":"aws","TaggedAddresses":{"lan":"some_address","wan":"some_address"},"Meta":{"consul-network-segment":""},"CreateIndex":40785394,"ModifyIndex":40785409},"Service":{"ID":"node_name:openldap:389","Service":"openldap-389","Tags":[],"Address":"172.18.0.2","Meta":null,"Port":389,"Weights":{"Passing":1,"Warning":1},"EnableTagOverride":false,"ProxyDestination":"","Proxy":{},"Connect":{},"CreateIndex":40785410,"ModifyIndex":40785410},"Checks":[{"Node":"node_name","CheckID":"Check CPU","Name":"Check Load CPU","Status":"passing","Notes":"Critical 95%, Warning 85%","Output":"OK - load average: 0.08, 0.09, 0.11|load1=0.080;85.000;95.000;0; load5=0.090;85.000;95.000;0; load15=0.110;85.000;95.000;0; \n","ServiceID":"","ServiceName":"","ServiceTags":[],"Definition":{},"CreateIndex":40785428,"ModifyIndex":47652321},{"Node":"nexus-sandbx","CheckID":"Check Disk","Name":"Check Disk Utilization","Status":"passing","Notes":"Critical 5%, Warning 10% free","Output":"DISK OK - free space: / 188159 MB (94% inode=98%);| /=10295MB;178623;188546;0;198470\n","ServiceID":"","ServiceName":"","ServiceTags":[],"Definition":{},"CreateIndex":40785427,"ModifyIndex":47645151},{"Node":"node_name","CheckID":"Memory usage","Name":"Check Memory Usage","Status":"passing","Notes":"Critical 98%, Warning 85%","Output":"              total        used        free      shared  buff/cache   available\nMem:        3978600     1425664      139228        4552     2413708     2284976\nSwap:      16777212     1059072    15718140\n\nMemory usage is roughly 35%\n","ServiceID":"","ServiceName":"","ServiceTags":[],"Definition":{},"CreateIndex":40785429,"ModifyIndex":47652285},{"Node":"nexus-sandbx","CheckID":"serfHealth","Name":"Serf Health Status","Status":"passing","Notes":"","Output":"Agent alive and reachable","ServiceID":"","ServiceName":"","ServiceTags":[],"Definition":{},"CreateIndex":40785394,"ModifyIndex":40785394}]}]/

k8s deployment:

apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: monitoring
  name: consul-exporter
spec:
  replicas: 1
  selector:
    matchLabels:
      app: consul-exporter
  template:
    metadata:
      labels:
        app: consul-exporter
    spec:
      containers:
        - name: consul-exporter
          image: "prom/consul-exporter"
          env:
            - name: CONSUL_HTTP_TOKEN
              value: "some_consul_token"
          args:
            - --consul.server=https://consul.***.com
            - --consul.insecure
            - --log.level=debug
            - --consul.timeout=500ms
          imagePullPolicy: Always
          ports:
            - containerPort: 9107
              name: http-metrics
@simonpasquier
Copy link
Member

Have you tried increasing consul.timeout to something substantially larger than 500ms? Can you measure how much time it takes for wget?

@NMamont
Copy link
Author

NMamont commented Aug 22, 2019

Thanks, really exporter need more time for getting the response, wget display me 1.2s, and when I increased timeout - all working fine.

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

No branches or pull requests

2 participants