Basically this post contains two questions and the data contains the status per minute(unixtime0 of a machine:
I am using a MariaDB server, similar to MySQL, and I’ve created a multi bar graph to show the availability of the machine. However, the width of the bar is too small. I’ve searched for solutions already and know that it is the result of the chosen time interval. But I do not found myself capable enough to implement the solutions.
Furthermore, the actual result I want is an availability bar, with next to it a stacked bar of “Productive” and “Standby”. I want to group them by day to show how the availability is compiled of productive and standby.
Could anyone help me out? I am a bit of a beginner on Grafana.
my sql query looks like this:
Timestamp/1000 AS “time”,
avg(MSD.Available) as “Availability”,
avg(MSD.Productive) as “Productive”,
avg(MSD.Standby) as “Standby”,
avg(MSD.UnscheduledDown) as “UnscheduledDown”,
avg(MSD.ScheduledDown) as “Scheduled Down”
FROM Availability as Av, MachineStatusDefinition as MSD
Where Av.idStatus = MSD.idStatus and Av.idMachineAllocation in ($Machine)
Group by DATE(FROM_UNIXTIME((TIMESTAMP/1000)))