2 Replies Latest reply: Aug 20, 2010 5:14 PM by 750907 RSS

    AV Agent and OS Collector after server reboot

    790358
      We are using Oracle AV Server and AV Agent on version 10.2.0.3.2 with Bundle Patch #1.

      If the target server reboots, both AV agent and OS Aud collector does not come up automatically ?

      Is that a normal behavior ? or we have to do some modifications to get it automatically started.

      Appreciate your guidance.

      Thanks,

      Viral
        • 1. Re: AV Agent and OS Collector after server reboot
          683924
          dear viral,

          This is normal behavior of Oracle Audit vault server, if the source database restarts you should have to start agent and collectors manually.



          Regards,
          • 2. Re: AV Agent and OS Collector after server reboot
            750907
            You could put it as a startup script, but there isn't anything already written. I call a cron script every hour to make sure that the collectors and agent is up. We had to setup trusted connections from the avagent -> avserver to start the collectors:

            This is on the agent server. We call it every hour from cron.
            #!/bin/ksh
            
            export ORACLE_HOME=<you set>
            export LD_LIBRARY_PATH_64=<you set>
            export LD_LIBRARY_PATH=<you set>
            export PATH=/bin:/usr/local/bin:/usr/bin:${ORACLE_HOME}/bin
            
            export collector_info="<yer collector name 1>:<yer source name 1>
            <yer collector name 2>:<yer source name 2>"
            
            start_av () {
            # See if av agent is running
            avctl show_oc4j_status | grep not
            export exit_status=${?}
            # If it is not running then start it
            if [ ${exit_status} -eq 0 ]; then
              echo "Starting AV agent"
              avctl start_oc4j
            else
              echo "AV agent is already running"
            fi
            }
            
            start_collector () {
            
            export collector_name=$1
            export source_name=$2
            # The collector needs to be started from the home av box
            ssh <yer av server ip> /home/oracle/sh/start_collector.sh ${collector_name} ${source_name}
            export exit_status=$?
            if [ ${exit_status} -eq 0 ]; then
              echo "The collector ${collector_name} for ${source_name} was started"
            elif [ ${exit_status} -eq 99 ]; then
              echo "The collector ${collector_name} for ${source_name} was already running"
            else
              echo "The collector ${collector_name} for ${source_name} may have an issue"
            fi
            
            }
            
            start_av
            for i in ${collector_info}; do
            
            collector_name=`echo $i | awk '{ FS=":" }{ print $1 }'`
            source_name=`echo $i | awk '{ FS=":" }{ print $2 }'`
            
            start_collector ${collector_name} ${source_name}
            
            done
            This is on your av server start_collector.sh
            export ORACLE_SID=<yer sid>
            export ORAENV_ASK=NO
            . /usr/local/bin/oraenv 1>/dev/null 2>/dev/null
            
            export collector_name=$1
            export source_name=$2
            
            export exit_collector_already_running=99
            
            start_collector () {
            
            #Check to see if the collector is already running
            avctl show_collector_status     \
                  -collname $collector_name \
                  -srcname $source_name     \
                  | grep not
            export exit_status=$?
            # If the collector is not running then start it
            if [ $exit_status -eq 0 ]; then
              avctl start_collector           \
                    -collname $collector_name \
                    -srcname $source_name
            else
            # Exit with a status that the collector is already running
              exit $exit_collector_already_running
            fi
            }
            
            start_collector