Dashboards¶
The examples/ folder of the repository has a test stack and ready-made dashboards for the Moodle log sent by logstore_opensearch (data stream <prefix>-logstore):
File |
Contents |
|---|---|
|
OpenSearch, OpenSearch Dashboards and Grafana on the |
|
Index pattern |
|
Grafana dashboard Moodle - log (tool_opensearch), with the same filters as variables. |
|
Grafana datasource (OpenSearch plugin) and dashboard provisioning. |
Filters¶
The dashboards filter by the same criteria as the Moodle logs report (Site administration > Reports > Logs), plus the site:
Moodle report |
Field |
|---|---|
(site) |
|
Course |
|
User |
|
Date |
time filter on |
Activity |
|
Actions |
|
Origin |
|
Events |
|
The documents keep the ids of the standard log (no names): use the ids shown in Moodle, for example in the URL of a course (course/view.php?id=) or of an activity (mod/.../view.php?id=).
Using them¶
Start the stack:
cd examples && docker compose up -d. Connect the Moodle container to theopensearchnetwork and setMOODLE_OPENSEARCH_HOSTS=http://opensearch:9200(Configuration).OpenSearch Dashboards (http://localhost:5601): Dashboards Management > Saved objects > Import, choose
moodle-log.ndjsonand keep the ids (Check for existing objects). Open Dashboards > Moodle - log query.Grafana (http://localhost:3001): the datasource and the dashboard are provisioned on start, in the Moodle folder. In another Grafana, install the
grafana-opensearch-datasourceplugin, create a datasource for*-logstore*with@timestampand importmoodle-log.json.
With a custom prefix, the pattern *-logstore* still matches. To show a single site of a shared cluster, use the Moodle filter.