#!/bin/bash

nmisLogs=(nmis.log event.log cisco.log trap.log fpingd.log auth.log)
omkLogs=(omkd_out.log opDaemon.log opEvents.log opFlow-cli.log opConfig-cli.log opReports.log opFlow.log opConfig.log opCharts.log common.log audit.log auth.log opData.log)

mkdir /tmp/nmisLogs
mkdir /tmp/omkLogs

for i in ${nmisLogs[@]}; do
	tail -8000 /var/log/nmis/$i > /tmp/nmisLogs/$i
done
for i in ${omkLogs[@]}; do
	tail -8000 /var/log/omk/$i > /tmp/omkLogs/$i
done



tar -zcvf /tmp/cgData.tar.gz /usr/local/nmis8/bin/ /usr/local/nmis8/mibs/ /usr/local/nmis8/conf /etc/snmp/ /etc/sysconfig/ /etc/rc.d/init.d /tmp/omkLogs/ /tmp/nmisLogs/

rm -rf /tmp/nmisLogs
rm -rf /tmp/omkLogs

echo ""
echo "please find cgData.tar.gz in the /tmp directory and send it to Chris, Thanks!"
echo ""


