Glances can trigger actions on events.

By action, we mean all shell command line. For example, if you want to execute the script if the last 5 minutes load are critical then add the _action line to the Glances configuration file:

critical_action=python /path/to/

All the stats are available in the command line through the use of the {{mustache}} syntax. Another example would be to create a log file containing used vs total disk space if a space trigger warning is reached:

warning_action=echo {{mnt_point}} {{used}}/{{size}} > /tmp/fs.alert


You can use all the stats for the current plugin. See for the stats list.