Warning: This project is no longer maintainted. It currently won't work with the Plex Webhooks payload, since Plex changes their JSON format without notice and without any versioning.
plexStats is a project I did at my university (HTWK Leipzig) to get my accreditation for the exam of the databases module.
It provides a webservice with Gin with a webhook endpoint for Plex and gathers all received information in a SQLite database. The frontend shows basic usage statistics like total plays by hour.
I got inspired by Tautulli which provides full stack monitoring and tracking for Plex Media Servers.
Thanks to go-bindata you can deploy it with a single binary from the releases page. Just pick one for your architecture and launch it, it will provide you with a web server running on http://localhost:65431/. The webhook is available on http://localhost:65431/webhook.
Note that it will create a SQLite Database in a file named plex.db
in your current working directory.
If you want to build by source you have to install the following dependencies:
Afterwards you can install the Go dependencies.
make dependencies
And build plexStats which will provide you with a binary under ./bin/plexStats
.
make build