kallex / PromDapter

Prometheus CzAdapter
MIT License
106 stars 9 forks source link

Prometheus cant read from PromDapter (prolly wrong setup here) #8

Closed alturismo closed 3 years ago

alturismo commented 3 years ago

Hi, as it seems i cant get any data imported here with queries, question is may if i added Datasource wrong

i have to choose the browser option, server option will always throw HTTP Error Not Found

image

i can curl from the grafana mashine the .../metrics url and get the respond fine, i can also open it in a browser and the respond is fine.

now, when this succeeded in browser mode, and i want to add a query using Prometheus as source, no metrics showing up starting with hwi as sample, actually no metrics at all.

may some tip what i missed, thanks ahead.

kallex commented 3 years ago

You need to install/setup Prometheus database somewhere in your environment, just like you have installed Grafana. https://prometheus.io/

Prometheus is the database that actually stores the metrics for Grafana to query for. Prometheus is also the one that is fetching (scraping in Prometheus terms) the data from the machine http://:10445/metrics -endpoint.

So you need to do basically the following:

  1. Install Prometheus server
  2. Configure Prometheus to "scrape" from each of the monitored machines
  3. Add data source in Grafana to point to your Prometheus server (this is the one, that you've been doing)

The 2. and 3. can be done in any order; Grafana will see all the metrics immediately when they become available, so even if you configure Grafana to see Prometheus before its scraping, you start to see hwi_ metrics right after the scraping starts.

alturismo commented 3 years ago

ok, then i missunderstood it, i thought your PromDapter already served the Data for the Prom Grafana Client ;)

thanks for the point

kallex commented 3 years ago

Oh yes, PromDapter is the adapter between HWiNFO (and other machine monitoring sources) and Prometheus.

kallex commented 3 years ago

I closed this for now as solved, please if you face any setup issues, don't hesitate to create new issue with specific info about the issue.