report:zabbix:customindicators
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| report:zabbix:customindicators [2026/02/07 11:07] – créée admin | report:zabbix:customindicators [2026/02/07 17:10] (Version actuelle) – [Creating the measurements] admin | ||
|---|---|---|---|
| Ligne 27: | Ligne 27: | ||
| Than fill the measurment definition form: | Than fill the measurment definition form: | ||
| + | {{ : | ||
| + | **Measurement name:** Visible name for the measurment. Zabbix report usually name the measurements in Zabbix as " | ||
| + | |||
| + | **Measuremnet Key:** This is the name of the item key in Zabbix. We use a dotted namespace for measurments, | ||
| + | |||
| + | **Units:** Give the measurement Units that will match Zabbix item definition. | ||
| + | |||
| + | **Active:** Custom measurements can be disabled at any time, and so wil not be actualized if disabled. | ||
| + | |||
| + | **Indicator SQL Query: ** Write a SQL query from moodle DB data. It must be a SELECT statement that returns a single value aliased to the field name '' | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | **Context: | ||
| + | |||
| + | e.g. : '' | ||
| + | |||
| + | In case you run a custom measurement on a discoverable context level, your SQL statement SHOULD use the '': | ||
| + | |||
| + | //IMPORTANT NOTE: At the moment, individual instances for a scanned context will generate one SQL query per instance, wich must result as **very costfull process** when targeting f.e. users, or many courses. In case this features finds interested people, we will drop in roadmap an optimisation taskforce to do it better.// | ||
| + | |||
| + | **Context allowed instances: | ||
| + | |||
| + | **Context excluded instances: | ||
| + | |||
| + | **Emission Rate:** Choose the emission task rate for this indicator. | ||
| + | |||
| + | ====Setting up the item in Zabbix==== | ||
| + | |||
| + | In Zabbix, edit the host representing the Moodle instance. Add a new element matching the Measurement Key, Adjust the storage ranges if needed, and add this measurement or graphs using it in your dashboards. | ||
| + | |||
| + | ====Checking the custom indicator works==== | ||
| + | |||
| + | You should have checked your SQL statement previoulsy in your DB command line tool or your DB manager tool. | ||
| + | |||
| + | To check if the measurmeent works, and sends expected values: | ||
| + | |||
| + | - Ensure your CLI path is setup in the Server settings | ||
| + | - Go to **scheduled tasks board** in Moodle Server section | ||
| + | - Run the appropriate Zabbix sending task | ||
| + | - Check you can see the sending trace line in output. | ||
| + | |||
| + | ====Example of check==== | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | The above measure fails because of misuse of the '' | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | Once fixed, the measure is sending the proper way. | ||
| ---- | ---- | ||
report/zabbix/customindicators.1770462438.txt.gz · Dernière modification : de admin
