#!/bin/bash
. /usr/local/nagios/libexec/utils.sh
{
netstat -lnp|grep "358:*"
if [ "$?" == "0" ]
then

 {
                echo "SUCCESS: Flume Agent Service is Up and Running"
                exitstatus=$STATE_OK
                exit $exitstatus

        }
else
 {
                echo "CRITICAL: Flume Agent Service is Down"
                exitstatus=$STATE_CRITICAL
                exit $exitstatus

        }
fi
}