MySQL Database logger

logging

(Cr76) #1

I am looking at creating an events logger on a raspberry pi web server running php and MySQL. From my searching it sounds like people have been tying to create one before but couldn’t find any examples. If there is any can someone point me in the right direction if not I will get to work :nerd:.


ROUNDUP: Data Logging and Charting Solutions
(Jody) #2

There are several examples of “loggers” on the community, you will need to subscribe to events and push them to the pi through a port forward.


(Michael Hess) #3

I suppose this logger would be right up your alley for MySQL.


(Cr76) #4

Thanks guys :grinning:. I have seen these examples and was wondering is anyone had used MySQL specifically to save me having to reinvent the wheel. I am sure with these examples I can get some thing up and running thanks for the help.


(codersaur) #5

I think the reason why there aren’t many MySQL examples for event logging solutions is because there are several popular time-series database (TSDB) stacks available that are more-suited to the task. These tend to have native support for things like retention policies and down-sampling etc, as well as being easy to integrate with popular data collection and visualisation tools. E.g. the Influx Data stack (Telegraf / InfluxDB / Chronograf / Kapacitor), Graphite, or the Elastic stack (Elasticsearch, Kibana, Logstash, and Beats), which is really powerful. Just pick the bits you need, bolt them together, and away you go.

I could have spent weeks writing my own custom logging solution on top of LAMP, but instead learnt and built a solution using InfluxDB and Grafana in less than a day. :sunglasses: