Starting in Mitto 2.9, users can add a
system job that monitors system resources including memory, disk space and services.
To create this job, click on the
Add Job button on the bottom left of the Mitto UI, and select "Generic Job".
Enter a title like:
[system] monitor memory and disk, under
type select "System".
Use the following config:
The system job will fail if the resources on the machine are above the set thresholds, or if any of the system's services are down.
write_json is set to true, every time the system job runs it will write JSON data to a JSON lines file defined by
json_file. This file will include the amount of disk and memory used, as well as any jobs that were running at the time.
max_disk set the thresholds at which the system job will fail for memory and disk usage.
A common practice for using system jobs is to set up a webhook on job failure to receive notifications when the resources on the box are failing.
To create a webhook, click the little orange edit pencil next to
Event select "JOB_FAILURE". Enter the URL for your webhook and the JSON you want to send.
Below is an example config that works for webhooks sent to a slack channel, includnig the current memory and disk usage and the URL of the Mitto:
For example job configs including configs for pulling the data out of the JSON lines file, see the Zuar Mitto job templates repo.