How to configure an alarm to monitor only one directory when many are included in the chart ?

Example:

file and directories config file filecheck.conf :

  • name: all_directories
    dirs:
    collect_dir_size: yes
    include:
    • ‘/path/to/dir1’
    • ‘/path/to/dir2’
    • ‘/path/to/dir3’

the corresponding health config file :

alarm: size_directory_1
on: filecheck_all_directories.dir_size
lookup: max -1m absolute
units: bytes
every: 10m
warn: $this > …
crit: $this > …

I would like to monitor only the size of directory 1 with this alarm. Is that possible ?

Hi @STAZ ! Welcome!

When the chart is created, it should have 3 dimensions: /path/to/dir1, /path/to/dir2 and /path/to/dir3.

On the alert, you can use the field lookup to specify a specific dimension that you want to monitor, using the of keyword. Most likely, using lookup: max -1m absolute of '/path/to/dir1' should help.

There is more information here → Health configuration reference | Learn Netdata

Please do try it, and let us know. If it doesn’t work, I’ll try to recreate as well and see.

1 Like

@Manolis_Vasilakis It did work, thank you !