Hi,
We would like to monitor below command output
/opt/oracle/product/middleware/bin/emctl status oms|grep -vi up|grep -vi oracle
If command return any output send an alert.
Kindly advice if it is possible ?
Monitoring of Command output
-
bolson
Re: Monitoring of Command output
This script should do it:
This script will issue a critical alert and the output of the command if any, and a status of ok if there is no output.
Code: Select all
#!/bin/bash
var1=$(/opt/oracle/product/middleware/bin/emctl status oms|grep -vi up|grep -vi oracle)
if [ -n "$var1" ] then
echo $var1
exit 2
fi