How to build Query in grafana?

Please i need urgent help !!

Hello Grafana Team,

I install grafana with prometheus running on individual post community.grafana.com and localhost:9090 and node_exporter and mysqld_exporter both are running successfully localhost:9100 and 9104. i’m using this site to install all the process Graphing MySQL performance with Prometheus and Grafana - Percona Database Performance Blog everything is running succesfully but i would like to know how to build query in grafana i have a database name otrs and i want to find id , name from user table so how to build query to show graph

You will have to learn the Prometheus query language (PromQL). The query editor in Grafana for Prometheus is just a textbox for writing PromQL. (Other Time Series dbs have a query editor with dropdowns and intellisense but the Prometheus community generally prefers to use PromQL).

The Grafana Demo site has a few dashboards where you can look at examples:

Prometheus Dashboards on Grafana.com: https://grafana.com/dashboards?dataSource=prometheus

1 Like

thank you for the support but i want to fetch data from mysql i am already mention in previous message please sample query how to fetch data i have a database name otrs and i want to find id , name from user table so how to build query to show graph

There is no way to read data directly from MySQL yet, you use prometheus to collect MySQL metrics and performance data which you graph in Grafana.

If you want to do SQL queries and show response in Grafana you need to wait for our MySQL datasource support

Please see …

I install grafana with prometheus running on individual post community.grafana.com and localhost:9090 and node_exporter and mysqld_exporter both are running successfully localhost:9100 and 9104. i’m using this site to install all the process https://www.percona.com/blog/2016/02/29/graphing-mysql-performance-with-prometheus-and-grafana/1 everything is running succesfully but i would like to know how to build query in grafana i have a database name otrs and i want to find id , name from user table so how to build query to show graph

Just checking but do you know that Grafana is for visualizing metrics from time series databases (like Prometheus)? Here is a definition for time series.

MySql is not a time series database. We will be adding support for time series queries (queries that are in time series form) from MySQL in future versions but that is not available in the current version.

1 Like

i already understand that point i would like to know how to fetch data in grafana through prometheus by mysql

Sorry, I don’t understand your question. What sort of data do you want to fetch through Prometheus. Can you give an example? Are you monitoring your MySQL server with Prometheus and are trying to show something from this list?

Hi torkel,

Recently we have configured Grafana in our account.
After installing we can see only few things. I did some research and imported few dashboards but unable to see which the data i need.

Mainly we are looking for below things.
1)Pods status
Incase of any Pod fails i want to see which Pod failed i.e Pod name from Grafana.
2)Services status in Pod
what is the status of the service like up or down.
for any reason if any service goes down

Need to view in Grafana.

Kindly help on this. I am new to Grafana
Appreciate your help on this.
If you have any dashboard available with above features kindly share the same.

Please just make grafana read from mysql DB and show graphs from employee table. Please also make this automatic - grafana should be able to inspect the employee table and figure out how best to show the data.

hi, i installed the grafana and prometheus but i didn’t understand how to use the metrics and uses the function by making the dashboard if anyone please guide me.

Firstly, please start a new thread for your question instead of tagging on to
one from four years ago.

Secondly, please give us some idea of what you are trying to achieve - what
sort of data do you have, what sort of display do you want to make from it,
and how far have you got through the documentation explaining how Grafana
works?

Have you looked at Getting started | Grafana Labs ?

Antony.

1 Like