Context deadline exceeded

551 views
Skip to first unread message

barnyb...@gmail.com

unread,
Apr 20, 2021, 11:45:30 AM4/20/21
to Prometheus Users
Hello gentlemen. Help me figure out the case.
Previously, I used docker snmp-exporter on server 1(10.10.1.5) and docker prometheus on server 2(10.10.1.6). In the replication line in prometheus config of the server 2 , there was the exporter's ip address from server 1(10.10.1.5). Here's how it worked.
Now I decided that everything should be on the same server, so I took already a working image of the snmp-exporter from the server 1 and installed it on the local on server 2 where Prometheus is located, but after changing the "replacement" IP address to local servers 10.10.1.6, I get  a context deadline exceeded error. If i will change the replacement ip back to remote 10.10.1.5 everything is ok, why?

  - job_name: 'snmp'
    static_configs:
      - targets:
        - 10.10.1.1
    metrics_path: /snmp
    params:
      module: [if_mib]
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: 10.10.1.5/6:9116

Stuart Clark

unread,
Apr 20, 2021, 12:17:08 PM4/20/21
to barnyb...@gmail.com, Prometheus Users
If you try calling the two exporters directly (with the ?target=IP
parameter) do they both work? Does one take longer than the other? Could
you have a firewall in the way from one of the two servers?

--
Stuart Clark

barnyb...@gmail.com

unread,
Apr 20, 2021, 12:30:05 PM4/20/21
to Prometheus Users
Firewalls are disabled, along the path / metrics are present. I think that exporter should work, because i'm using the same image for both.

Stuart Clark

unread,
Apr 20, 2021, 2:17:15 PM4/20/21
to barnyb...@gmail.com, Prometheus Users
So both URLs work if you make the requests from the server?
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

barnyb...@gmail.com

unread,
Apr 20, 2021, 6:03:00 PM4/20/21
to Prometheus Users
Yes, both URLs on port 9116 are working fine.

Stuart Clark

unread,
Apr 21, 2021, 3:41:40 AM4/21/21
to barnyb...@gmail.com, Prometheus Users
On 20/04/2021 23:02, barnyb...@gmail.com wrote:
> Yes, both URLs on port 9116 are working fine.

If both are working I'd suggest looking at both the scrape interval and
timeout. If you time the requests you are doing manually (e.g. via curl)
how long are they taking compared with the timeout/scrape values?

--
Stuart Clark

Reply all
Reply to author
Forward
0 new messages