In Nagios XI - How do I escape the $ sign in nsclient++ nrpe check commands.
For example
check_drivesize drive=* "top-syntax=${status} : ${list}" "detail-syntax=%(drive_or_name) free - %(free_pct)"
How do I escape $ sign in nsclient++ nrpe check commands
Re: How do I escape $ sign in nsclient++ nrpe check commands
Try any of the following:
- check_drivesize drive=* 'top-syntax=${status} : ${list}' "detail-syntax=%(drive_or_name) free - %(free_pct)" (single quotes instead of double)
- check_drivesize drive=* "top-syntax=$${status} : $${list}" "detail-syntax=%(drive_or_name) free - %(free_pct)" (escape a dollar sign with itself)
- check_drivesize drive=* "top-syntax=\${status} : \${list}" "detail-syntax=%(drive_or_name) free - %(free_pct)" (escape a dollar sign with a backslash)
Former Nagios employee
Re: How do I escape $ sign in nsclient++ nrpe check commands
Thanks you very much escaping the $ with the backslash worked the best.
Re: How do I escape $ sign in nsclient++ nrpe check commands
Glad to see this worked out for you. I'll be locking this thread now, but feel free to open another thread if you need assistance.
Former Nagios Employee