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

Error trying to add ping_exporter as Grafana datasource #66

Open
90er opened this issue Feb 5, 2022 · 3 comments
Open

Error trying to add ping_exporter as Grafana datasource #66

90er opened this issue Feb 5, 2022 · 3 comments

Comments

@90er
Copy link

90er commented Feb 5, 2022

Hi,

thanks for your work.

I just installed version 1.0.0 as Debian (version 10.11) package for the first time.

When i manually enter the exposed interface (http://192.168.2.50:9427) in my web-browser it's working and i can see the metrics (http://192.168.2.50:9427/metrics) as configured in /etc/ping_exporter/config.yml.

When i try to add it as a Grafana datasource i get the following error:
Error reading Prometheus: bad_response: readObjectStart: expect { or n, but found <, error found in #1 byte of ...|<!doctype h|..., bigger context ...|<!doctype html> <html> <head> <meta charset="UTF-8|...

In the Grafana URL field i pasted http://192.168.2.50:9427.

It's working without issues with the node_exporter, which is running on the same host as ping_exporter.
I use Grafana in version 8.3.3.

Here is the output of curl from the Grafana host to the host running ping_exporter.

curl -I http://192.168.2.50:9427/metrics
HTTP/1.1 200 OK
Content-Type: text/plain; version=0.0.4; charset=utf-8
Date: Sat, 05 Feb 2022 10:16:49 GMT
Content-Length: 1453
curl http://192.168.2.50:9427/metrics
# HELP ping_loss_ratio Packet loss from 0.0 to 1.0
# TYPE ping_loss_ratio gauge
ping_loss_ratio{ip="127.0.0.1",ip_version="4",target="127.0.0.1"} 0
ping_loss_ratio{ip="8.8.8.8",ip_version="4",target="8.8.8.8"} 0
# HELP ping_rtt_best_seconds Best round trip time in seconds
# TYPE ping_rtt_best_seconds gauge
ping_rtt_best_seconds{ip="127.0.0.1",ip_version="4",target="127.0.0.1"} 0.00020129199326038362
ping_rtt_best_seconds{ip="8.8.8.8",ip_version="4",target="8.8.8.8"} 0.009192828178405762
# HELP ping_rtt_mean_seconds Mean round trip time in seconds
# TYPE ping_rtt_mean_seconds gauge
ping_rtt_mean_seconds{ip="127.0.0.1",ip_version="4",target="127.0.0.1"} 0.00037390387058258055
ping_rtt_mean_seconds{ip="8.8.8.8",ip_version="4",target="8.8.8.8"} 0.009936306953430176
# HELP ping_rtt_std_deviation_seconds Standard deviation in seconds
# TYPE ping_rtt_std_deviation_seconds gauge
ping_rtt_std_deviation_seconds{ip="127.0.0.1",ip_version="4",target="127.0.0.1"} 8.027490228414536e-05
ping_rtt_std_deviation_seconds{ip="8.8.8.8",ip_version="4",target="8.8.8.8"} 0.0005426779389381409
# HELP ping_rtt_worst_seconds Worst round trip time in seconds
# TYPE ping_rtt_worst_seconds gauge
ping_rtt_worst_seconds{ip="127.0.0.1",ip_version="4",target="127.0.0.1"} 0.0004887250065803528
ping_rtt_worst_seconds{ip="8.8.8.8",ip_version="4",target="8.8.8.8"} 0.011926032066345215
# HELP ping_up ping_exporter version
# TYPE ping_up gauge
ping_up{version="1.0.0"} 1

Thanks for your support.

Wolfgang

@90er
Copy link
Author

90er commented Feb 5, 2022

(same with Grafana version 8.3.4)

@pavel-trubitsyn
Copy link

Could you create dashboard for Grafana, please.
Thanks

@the-rene
Copy link

the-rene commented May 5, 2022

@90er ping_exporter needs to be fetched by a prometheus instance, which then can be queried by grafana. You can add it you ping_exporter instance to the prometheus.yml like this:

scrape_configs:
    - job_name: 'ping'
      static_configs:
        - targets: ['192.168.2.50:9427']

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