Hello,
I’m in the process of writing yet another nagios plugin which checks TrendMicro’s Server Protect.
Server Protect has about 9 instances I need to check which I do.
The problem now comes when the instances don’t behave as they should I then issue a $STATE_CRITICAL
The problem is I wan to output in Nagios which services are running and which are not instead of just one line.
Right now I have:
some huge ifstatement that verifies serverprotect is not running as it should
echo "CRITICAL: TM SP not running as expected"
exit $STATE_CRITICAL
But I’d like something like:
some huge ifstatement that verifies serverprotect is not running as it should
echo "CRITICAL: TM SP not running as expected
service something status is: $servicestatus
service something2 ststus is: $servicestatus2
etc
"
exit $STATE_CRITICAL
I’ve tried html
injection in the echo statement
some huge ifstatement that verifies serverprotect is not running as it should
echo "CRITICAL: TM SP not running as expected <br>
service something status is: $servicestatus
service something2 ststus is: $servicestatus2
etc
"
exit $STATE_CRITICAL
and echo’ing 9 times but none of those methods seem to work.
some huge ifstatement that verifies serverprotect is not running as it should
echo "CRITICAL: TM SP not running as expected"
echo "service something status is: $servicestatus"
echo "service something2 ststus is: $servicestatus2"
etc
exit $STATE_CRITICAL
Is there a way to do this?