Check Drive Size

Hello all,

i try to configure this command in icinga:

/usr/lib/nagios/plugins/check_nrpe -H XXXX -c check_drivesize -a drive=* “crit=free<99%”

all works fine when execute in command line but when i try to setup the same in director i receive this error:

Filter processing failed: Failed to get size for c “crit=free<99%”: 7b: The filename, directory name, or volume label syntax is incorrect.

: 0 > convert(0)

i think the quotes create some problems, i try different syntax without success

hope someone can help me



Can you share the screen captures of your service definition in Director, and the resolved service in the deployment ?
That will help us understand your situation better.

here the check:


the output:

Change the field type of the nrpe_arguments field to “Array” in the Director and then put the two arguments into separate entries of that array. Quotes will not be needed, as the Director encases all attributes with quotes automatically.

Example from one of my disk checks:

apply Service "disk-h" {
    check_command = "nrpe"
    max_check_attempts = "5"
    check_interval = 5m
    retry_interval = 1m
    assign where == "xyz"
    vars.graphite_check_command = "disk-windows"
    vars.nrpe_arguments = [ "H:", "98", "99" ]
    vars.nrpe_command = "alias_disk_ex"
    vars.nrpe_timeout = "10"
    vars.nrpe_timeout_unknown = true

    import DirectorOverrideTemplate

Check command inside the nsclient.ini looks like this:

alias_disk_ex = check_drivesize "detail-syntax=${drive_or_name} TOTAL: ${size}  USED: ${used} (${used_pct}%) FREE: ${free} (${free_pct}%)" "drive=$ARG1$" "warn=used>$ARG2$%" "crit=used>$ARG3$%"
1 Like

thank you very much, it works like a charm :top: