MySQL help for simple table


I’m using Grafana ver. 5.2.2 with a working MySQL datasource/plugin to the MySQL database/table.

id ip name description down up total_sec
1 test1 tester1 1536186439 1536188103 1664
2 test1 tester1 1536202501 1536203709 1208
3 test2 tester2 1536202201 1536203709 1508
4 test2 tester2 1536202201 1536203709 1508
5 test2 tester2 1536202201 1536203710 1509
6 test3 tester3 1536202201 1536203710 1509

I’m trying to create a bar graph (gauge) showing the sum of ‘total_sec’ for each ‘name’.
As you can see, there can be multiple instances of each ‘name’ with different times and ‘total_sec’ values.
The ‘up’ and ‘down’ timestamps are in epoch time. The table is updated every 10 min.
I don’t care about the ‘id’, ‘ip’, or ‘description’ fields…

Since this is my first time working in Grafana with MySQL as the datasource, I could use some help on the proper Grafana mysql syntax.

If you have done something similar to this, can you please share your syntax.