i have problem when i try to create a graph with Grafana for my MySQL Data:
my table (jobs) has the following coloms:
- id int(11) as primary Key
- Current int(11)
3.date_at timestamp default:CURRENT_TIMESTAMP
now the problem is when i am trying to run this query
UNIX_TIMESTAMP(date_at) as time_sec,
Current as value,
‘Current’ as metric
ORDER BY date_at
i am getting under the time_sec field somthing like this (1.52Bil) which is the a number in seconds i guess.
and when i am running the follwoing query
SELECT UNIX_TIMESTAMP(date_at) as time_sec, Current as value, ‘Current’ as metric FROM jobs WHERE $__timeFilter(date_at) ORDER BY date_at desc
so the graph is not showing the previous value of current. it shows just the last two points or values
- how i can show the different value of Current job as graph with lines and points change with changing the value of current and its timestamp in database.
2.how i can show the date of each value in readable form 2018-03-23 12:24:06 for example.
- if i have multiple lines or records for Current job in my database with its corresponding timestamp how i can rewrite my query so i can show it like a line and point graph.
i will be thankful for a quick Answer