how to use $ symbol in custom field values

This forum was archived to /woltlab and is now in read-only mode.
  • I am trying to pass the arguments to check_by_ssh for-C option as the below value. below value is passed in -C like -C $comamnd$, but i am facing some parsing errors, even i tried to put \ before $, icinga inserts one more \ before the \, like \\$,


    Disk Space' of type 'Service'; Attribute 'vars' -> 'command': Closing $ not found in macro format string 'perl -MPOSIX -le 'df -Pk | awk '{print $5 "\t" $6}' | tr -d '%' | egrep '[0-9]' | awk '{if ($1 >= 90) print "OVERLOAD\t" $1 "%\t" $2;else print "OK\t\t" $1 "%\t" $2}'|grep "OVERLOAD" ''.

    [stage]/zones.d/director-global/service_apply.conf(81): vars.command = "perl -MPOSIX -le 'df -Pk | awk '{print $5 \"\\t\" $6}' | tr -d '%' | egrep '[0-9]' | awk '{if ($1 >= 90) print \"OVERLOAD\\t\" $1 \"%\\t\" $2;else print \"OK\\t\\t\" $1 \"%\\t\" $2}'|grep \"OVERLOAD\" '"

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^



    could you please suggest how to use $ sign in this command. ?