Nagios Core Bash Command Does not return Variable
Posted: Tue Nov 20, 2012 5:07 pm
I created a bash script that SSH into another machine and gets a value and sets it to a variable and prints the variable out.
But when the command in executed by Nagios it does not print the variable.
Sudo code goes as follow:
var_used=$(SSH root@host free -m | get the used memory)
echo used $var_used
In nagios it prints out used $
I have also tried it with
var_used=2 and still get the same results.
But when the command in executed by Nagios it does not print the variable.
Sudo code goes as follow:
var_used=$(SSH root@host free -m | get the used memory)
echo used $var_used
In nagios it prints out used $
I have also tried it with
var_used=2 and still get the same results.