Escaping special characters in Nagios config files
Nagios uses ‘!’ to separate input arguments in the configuration. This is all well and good until you need to use a ‘!’ or ‘$’ within one of your variables. At this point you need to escape the special character.
You use a Backslash (“\”) to do this for the “!” and “$” characters in a Nagios configuration files.
See this example:
NB: I have colour coded the content that’s passed as ARG1 orange and ARG2 green to help show the use of ‘!’ to separate arguments as well as escaped within the password string.