philippnormann / chia-monitor

🍃 A comprehensive monitoring and alerting solution for the status of your Chia farmer and harvesters.
Apache License 2.0
158 stars 33 forks source link

Random Useless Values shown in Dashboard #38

Open InvaderDolan opened 3 years ago

InvaderDolan commented 3 years ago

Hi. I have installed chia monitor as written in README. I am using Ubuntu 20.04 LTS.

Then I installed Grafana 8 (also tried Grafana 7.5.10) and Prometheus. Changed prometheus.yml as instructed:

scrape_configs:
  - job_name: chia_monitor
    static_configs:
    - targets: ['localhost:8000']

Launched Grafana at localhost:3000, imported dashboard, set data source as Prometeus and entered URL: http://localhost:8000/metrics and also tried http://localhost:8000. Also, I tried both Access settings: Server and Browser.

At the end, I get the random useless values. Here are 3 screenshots within 30 sec.

Screenshot from 2021-07-26 23-02-35 Screenshot from 2021-07-26 23-02-45 Screenshot from 2021-07-26 23-02-55

carfloresf commented 3 years ago

I had the same problem, even though I selected the correct source, dashboard was showing random values. Mine solved setting my "Prometheus-1" (the instance monitoring chia-monitor) as the default datasource:

image

philippnormann commented 3 years ago

Hey @InvaderDolan, the data source in Grafana needs to point to the Prometheus instance and not to the /metrics page of the monitor. By default, the Prometheus server will use port 9090, so yours is probably running on localhost:9090.

Does changing the Prometheus data source URL in your Grafana to localhost:9090 fix your dashboard?

InvaderDolan commented 3 years ago

Hey @InvaderDolan, the data source in Grafana needs to point to the Prometheus instance and not to the /metrics page of the monitor. By default, the Prometheus server will use port 9090, so yours is probably running on localhost:9090.

Does changing the Prometheus data source URL in your Grafana to localhost:9090 fix your dashboard?

Thank you for you answer. But I reinstalled grafana, tried everything from zero and then did your steps. I still have configured prometheus.yaml as before and tried http://localhost:9090 but now I get an error "Bad Gateway" and there is nothing now at all on this address. But 8000 and 8000/metrics still show some values. What did I do wrong? Thank you for your attention.