var the name of a case-insensitive NAGIOS_variable (defaults to "servicedesc")
default a default value if \$NAGIOS_var\$ is blank (case sensitive)
field an awk-compatible field number (potentially to use with <delim>)
field an awk-compatible field number (potentially to use with <delim>) (see below)
delim an awk-compatible field delimiter (defaults to space and colon)
-u Convert the output to uppercase
-l Convert the output to lowercase
-p Convert / to | (mainly for disk names in NCPA checks)
suffix Take var result and use the it to get NAGIOS__[HOST|SERVICE|CONTACT]<result><suffix>
-v Be verbose (only for debugging)
-s The result must match this value or else it will return blank
--num The result will have all non-numbers stripped from it
-NP Returns NAGIOS__HOSTNCPAPORT (implied default of 5693)
-N Look for NAGIOS__HOSTNCPA<suffix> (defaults to TOKEN)
Can do double lookup if -H is specified directly: -H TOKEN will find NAGIOS__HOSTNCPATOKEN=Level1 which then finds NAGIOS__HOSTLEVEL1TOKEN=Secret
Or -H PASS will find NAGIOS__HOSTNCPAPASS=Level2 which will then find NAGIOS__HOSTLEVEL2PASS=SuperSecret
@ -44,8 +47,9 @@ Where:
The value will always be trimmed of leading and/or trailing spaces/tabs.
If -f is used, then the result will be as if the request were as follows, unless the field starts with a negative, in which case it will read from the last word forward: