This project is created with the need to have moodle metrics in prometheus / grafana. Because there is no exporter for moodle related metrics i wrote this one. I'm not a programmer or python expert, but its working fine. Any help or improvements are welcome.
- python 3.6+
- mysql-connector-python
- prometheus_client
-
Clone Repository
-
Create a user to run it with dedicated user and not as root (recommended)
-
Create a systemd service file (optional)
-
Install needed python modules
pip3 install mysql-connector-python pip3 install prometheus_client
-
Copy db_secrets.example to db_secrets.py and fill in your credentials
cp db_secrets.example db_secrets.py
-
Start exporter - with nohup or systemd in backgroud