Tech C**P
15 subscribers
161 photos
9 videos
59 files
304 links
مدرس و برنامه نویس پایتون و لینوکس @alirezastack
Download Telegram
In icinga2 monitoring tools, you may have used check disk space command check_snmp_storage. In its default behaviour it lists all
the partitions which is present on disk either mounted by NFS or /run, etc.

In Incinga2 you would have a command called snmp-storage in /etc/icinga2/conf.d/commands. To exclude unnecessary partitions from all disks you can pass -e (e stands for exclude) argument to the perl command. You can use -m to pass regex to say which partitions you want to use.

e, --exclude:
Select all storages except the one(s) selected by -m
No action on storage type selection.

The final config for snmp-storage to exclude a list is like below:
object CheckCommand "snmp-storage" {
import "snmp-manubulon-command"

command = [ ManubulonPluginDir + "/check_snmp_storage.pl" ]

arguments += {
"-m" = "$snmp_storage_name$"
"-f" = {
set_if = "$snmp_perf$"
}
"-w" = 80
"-c" = 90
"-H" = "$address$"
"-m" = "^Cached|^Shared|^Swap|^/run|^Physical|^Memory|^Virtual|^/dev|^/sys"
"-e" = ""
}

vars.snmp_perf = true
}

In brief the combination of -m & -e means: select all partitions except the ones listed in front of -m.

#icinga2 #monitoring #snmp #snmp_storage #exlude #exclude_partition