I have written a small script to check the states of PfSense, and using this script to get the output in nagios, through NRPE...
Here is the script
used=`pfctl -s state | wc -l | bc | cut -c1-5 | bc`
echo "States consumed=$used"
Normal output of the script is as follows (as it runs on the client.
But the issue is that when the same script is ran through NRPE from the nagios server, I get this command.
But when I put anything in the variable "used" , for example pass it value of 123, or abc,,it is visible on the nagios server through nrpe... What can be the issue here? I have tried every possible solution from my side, since last 5 days..