Hi everyone
How can i use the special character ! in a password to check services with nagiosxi
thanks:::
Special Characters in passwords
Re: Special Characters in passwords
The ! is actually a delimiter for service arguments with Nagios, so I would recommend avoiding using them where possible. One workaround that can be done is that you can define either a custom macro for that password either as a service macro, or if it's a commonly used password, you can enter it as a global macro variable in the /usr/local/nagios/etc/resource.cfg file.
Re: Special Characters in passwords
Hi,
I'm having this same issue.
My password contains ! and I can't change it.
I went to the /usr/local/nagios/etc/resource.cfg and added a $USER8$=password, but I'm not sure how I can use it.
Is it possible to use it when I'm testing the command manually? I.e.:
It didn't work.
Also, how do I add the $USER9$ to the check_command?
I have other passwords with the same issue. Will I have to create a check_command for each PW?
Cheers!
I'm having this same issue.
My password contains ! and I can't change it.
I went to the /usr/local/nagios/etc/resource.cfg and added a $USER8$=password, but I'm not sure how I can use it.
Is it possible to use it when I'm testing the command manually? I.e.:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H hostaddress -c check_fb -a '-u [email protected] -p $USER9$'
Also, how do I add the $USER9$ to the check_command?
I have other passwords with the same issue. Will I have to create a check_command for each PW?
Cheers!
Last edited by badcom on Wed Nov 06, 2013 1:23 pm, edited 1 time in total.
Re: Special Characters in passwords
Just to add one more information:
If I run the command from the remote server which is where the plugin is, it works:
However, if I run the below command from the server, it won't work:
If I run the command from the remote server which is where the plugin is, it works:
Code: Select all
/usr/lib/nagios/plugins/check_fb.pl -u [email protected] -p 'passwordWith!Mark'
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H hostaddress -c check_fb -a '-u [email protected] -p passwordWith!Mark'