Hi there!
I created a custom command for monitoring SAP services.
The command should be: /usr/sap/hostctrl/exe/sapcontrol -function GetProcessList -host somehost.somedomain -nr 00 -user someuser somepassword
But Icinga turns it to '/usr/sap/hostctrl/exe/sapcontrol' '-function' 'GetProcessList' '-host' 'somehost.somedomain' '-nr' '00' '-user' 'someuser somepassword'
How do I get rid of those single-quotes?
And please, do not tell me, that there are other modules to use, they don’t work for us.
Thanks!
-user is the argument
someuser sompassword is the value.
There is no extra argument for the password.
Problem is, that sapcontrol does not accept any quotes.
And for every system I monitor, i have different values for “-user”, “-host” and “-nr”.
So creating a command for every system is way to much work.
you don’t need to create a command for every changed value.
yes, so ‘user’ ‘password’ should work, but ‘user password’ not.
I think that the quotes are newer interpreted by the command, but by bash to determine the end of the argument. So SAP should not get these “'”. Otherwithe every variable you send to a script would have these in it and that is NOT the case. But maybe I learn something new today
Thanks, ist not a plugin, I simply call saphostctrl, I can’t manipulate the output.
So:
if Output Text contains “RED” or “GRAY” -> Status critical
if Output contains “YELLOW” -> Status warning
if Output contains “NO STATUS” -> Status Unknown
else Status OK