mirror of https://github.com/nicolargo/glances
Update doc
parent
928026c8c1
commit
7b41105c1a
|
@ -715,15 +715,19 @@ Glances can trigger actions on events.
|
||||||
|
|
||||||
By action, we mean all shell command line. For example, if you want to execute the foo.py script if the last 5 minutes load are critical then add the action line to the Glances configuration file:
|
By action, we mean all shell command line. For example, if you want to execute the foo.py script if the last 5 minutes load are critical then add the action line to the Glances configuration file:
|
||||||
|
|
||||||
[load]
|
.. code-block::
|
||||||
critical=5.0
|
|
||||||
critical_action=python /path/to/foo.py
|
[load]
|
||||||
|
critical=5.0
|
||||||
|
critical_action=python /path/to/foo.py
|
||||||
|
|
||||||
All the stats are available in the command line through the use of the {{mustache}} syntax. Another example to create a log file containing used vs total disk space if a space trigger warning is reached:
|
All the stats are available in the command line through the use of the {{mustache}} syntax. Another example to create a log file containing used vs total disk space if a space trigger warning is reached:
|
||||||
|
|
||||||
[fs]
|
.. code-block::
|
||||||
warning=70
|
|
||||||
warning_action=echo {{mnt_point}} {{used}}/{{size}} > /tmp/fs.alert
|
[fs]
|
||||||
|
warning=70
|
||||||
|
warning_action=echo {{mnt_point}} {{used}}/{{size}} > /tmp/fs.alert
|
||||||
|
|
||||||
*Note*: You can use all the stats for the current plugin (see https://github.com/nicolargo/glances/wiki/The-Glances-2.x-API-How-to for the stats list)
|
*Note*: You can use all the stats for the current plugin (see https://github.com/nicolargo/glances/wiki/The-Glances-2.x-API-How-to for the stats list)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue