Grafana Plugin for Mysql


So I enable Prometheus in Graylog to show quick reference of metrics on my Graylog server. Going through the forum I noticed a lot more members were also using Grafana Labs to display this on a dashboard. Using a MySQL plugin to connect to a remote database. I created a dashboard panel for Mysql database. What I want from the database is the users activities. So anyone that is logged into the web interface. Basic user tracking. :slight_smile: I will know who and what they did.
Had a problem, Timestamp on the database table column was in Unix time. Tried to find a work around, that was a no go.

I tried everything that could be simple, so I scrapped configuration and made my own SQL query. I replace the following SQL query

SELECT user,affecteduser,app,type,timestamp FROM oc_activity 
ORDER BY activity_id

With the following new query :smiley:

SELECT user,affecteduser,app,type,FROM_UNIXTIME(timestamp) FROM oc_activity 
ORDER BY activity_id

Now it displays as shown below.

Happy me.

1 Like