Construct queries in grafana where Prometheus is datasource and telegraf as agent

Hi,

I am following this link http://blog.nobugware.com/post/2016/Telegraf_Prometheus_metrics_swiss_army_knife/ to configure telegraf, prometheus and grafana in my setup. I need help regarding configuring CPU, Memory and Network…

CPU
cpu_usage_idle{host=“myhost”, cpu=“cpu-total”}
cpu_usage_user{host=“myhost”, cpu=“cpu-total”}
cpu_usage_system{host=“myhost”, cpu=“cpu-total”}

Memory
mem_available_percent{host=“myhost”}

I have configured prometheus as datasource in Grafana and it is working properly with Datasource setup working displayed in green color. I need guidance to construct queries in Prometheus to gather CPU, Memory and Network metrics of a remote host in Grafana Dashboard?

Thanks in Advance.

Regards,

Kaushal

Hi,

  1. Create a new dashboard
  2. Add a graph panel
  3. Under metric tab, select your prometheus datasource and insert for example cpu_usage_idle{host="<your hostname>", cpu="cpu-total"} in the metric field

From that you should be able to adding more series and/or panels.

You may be able to get some inspiration from the following dashboards which also are using Prometheus and Telegraf: https://grafana.com/dashboards?dataSource=prometheus&collector=Telegraf

Marcus