Hello,
I'm implementing some checks on our vm hosts, the checks seem to be working just fine if I run them by hand, but when I run them with the Nagios engine is having serious issues reading the password from the resource file.
Currently what I have is something like this on the resource file:
$USER20$=monitor
$USER21$=\@T4rd3$$
As you can see I have scaped the @ with a backslash and the $ with an extra $ but is not working.
If I run it by hand it works using just backslashes for both special characters, any idea on how to tackle this one?
Thank you
Problem reading password from resource file
Re: Problem reading password from resource file
If it is in the resource file you should not need to escape the characters at all.
Former Nagios employee
Re: Problem reading password from resource file
Odd, I tried it in any way shape or form I can think of and still it doesn't work.
Any idea what may be the issue, I did double check the commands to see that the actual macros were being used and indeed they are.
Any idea what may be the issue, I did double check the commands to see that the actual macros were being used and indeed they are.
Re: Problem reading password from resource file
what happens if you wrap the password in quotes?
"@T4rd3$"
"@T4rd3$"
Re: Problem reading password from resource file
You probably want to wrap the macro itself in quotes in the command:
Code: Select all
"$USER21$"Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Problem reading password from resource file
Thank you for your input, I still have the same message when I add quotes to the macro in the command file.
I figure that the issue here is the $ inside the password, but sadly I'm not in the liberty to change it.
Any other suggestions are more than welcome.
Cheers
I figure that the issue here is the $ inside the password, but sadly I'm not in the liberty to change it.
Any other suggestions are more than welcome.
Cheers
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Problem reading password from resource file
Does this particular plugin allow for accepting user\pass via file? You might be able to give it a flat file instead with the password and get out of having it in resources.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.