-
What Grafana version and what operating system are you using?
-
What are you trying to achieve?
Building a horizontal bar gauge visualization of application names and dollar cost per application. -
How are you trying to achieve it?
Retrieving data from MySQL database and using the time series transformation.
My SQL is:
select cost_date, application_name, cost from grafana_data.monthly_cost
where ‘$costdate’ = date_format(cost_date, ‘%m/%d/%y’)
order by cost desc
limit 15;
So I’m looking for the top 15 application costs. As this is a monthly calculation I use a dashboard variable (costdate) to allow the user to select which month they’re interested in. Everything works as it should EXCEPT the application names appear as:
cost VAM - Profile and Server |||||| $184K
The word “cost” should not be there, it a a column name in the table where the 184k is stored.
I tried to regex out “cost” but I’m not very good with regex, but I shouldn’t have to do that. I’m retrieving 3 columns, data, application and cost. The VALUE stored in the cost column in my table should show up in the last column - and it does - but I don’t know why the application name is being prefixed by a column name.
I’m sure I’m doing something goofy but I can’t see it.
Thanks,
Greg
-
What happened?
I do get an horizontal bar gauge but the application name is prefixed with “cost” which is one of the columns in my MySQL table. This works fine when using a CSV as input. -
What did you expect to happen?
I expected a two column gauge - application name and cost. -
Can you copy/paste the configuration(s) that you are having problems with?
-
Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
No -
Did you follow any online instructions? If so, what is the URL?
No.