OXIESEC PANEL
- Current Dir:
/
/
home
/
cubot
/
bin
/
utils
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/03/2023 08:06:37 AM
rwxr-xr-x
📄
.auditreport.sh.swp
12 KB
02/03/2023 07:34:08 AM
rw-r--r--
📄
CollectReportData.sh
2.17 KB
02/03/2023 07:34:08 AM
rwxr-xr-x
📄
ComapreCubotTableData.sh
1.06 KB
02/03/2023 07:34:08 AM
rwxr-xr-x
📄
VBox.sh
1.59 KB
02/03/2023 07:34:08 AM
rw-r--r--
📄
auditreport.sh
1.35 KB
02/03/2023 07:34:08 AM
rwxr-xr-x
📄
cleanSRCid.sql
386 bytes
02/03/2023 07:34:08 AM
rw-r--r--
📄
cleancache.sh
8.89 KB
02/03/2023 07:34:08 AM
rwxr-xr-x
📄
compare_database.sh
148 bytes
02/03/2023 07:34:08 AM
rwxr-xr-x
📄
compressCSS.sh
262 bytes
02/03/2023 07:34:08 AM
rwxr-xr-x
📄
compressJS.sh
251 bytes
02/03/2023 07:34:08 AM
rwxr-xr-x
📄
cubbackup.sh
1.43 KB
02/03/2023 07:34:08 AM
rwxr-xr-x
📄
cubbackup_sync.sh
314 bytes
02/03/2023 07:34:08 AM
rwxr-xr-x
📄
cubmonitor.sh
3.77 KB
02/03/2023 07:34:08 AM
rwxr-xr-x
📄
cubotmail
29.64 KB
02/03/2023 07:34:08 AM
rwxr-xr-x
📄
esalesforce.pl
1.87 KB
02/03/2023 07:34:08 AM
rw-r--r--
📄
etl_xform_template.sh
543 bytes
02/03/2023 07:34:08 AM
rwxr-xr-x
📄
killrunaway.sh
609 bytes
02/03/2023 07:34:08 AM
rwxr-xr-x
📄
migrateSharedreports.sh
1.14 KB
02/03/2023 07:34:08 AM
rw-r--r--
📄
mysql2pgsql.perl
40.98 KB
02/03/2023 07:34:08 AM
rwxr-xr-x
📄
removenewlinechar.awk
292 bytes
02/03/2023 07:34:08 AM
rw-r--r--
📄
removenewlinechar.pl
534 bytes
02/03/2023 07:34:08 AM
rw-r--r--
📄
removenewlinechar2.awk
82 bytes
02/03/2023 07:34:08 AM
rw-r--r--
📄
renameCubUser.sh
2.38 KB
02/03/2023 07:34:08 AM
rw-r--r--
📄
sendmail.pl
2.13 KB
02/03/2023 07:34:08 AM
rwxr-xr-x
📄
updatealldb.sh
1.08 KB
02/03/2023 07:34:08 AM
rw-r--r--
📄
yuicompressor-2.4.6.jar
832.85 KB
02/03/2023 07:34:08 AM
rwxr-xr-x
📄
zap
1.86 KB
02/03/2023 07:34:08 AM
rwxr-xr-x
Editing: cubmonitor.sh
Close
#!/bin/bash ########################### # Robust Designs India # # Dev Team : Bangalore # ########################### #Who is sending mail to RD'ns from="admin@robustdesigns.com (CUBOT-admin)"; #Whom to send sendto="vikash@robustdesigns.com, olaf@robustdesigns.com"; #What shld be subject line subject="!! Attention CUBOT Server !!"; #What message in body message[0]="Please be advised:" message[1]="" message[2]="CUBOT System on Bangalore Server@localhost"; message[3]="Is experiencing problems, please recrify at the earliest." CUBLOGDIR="/home/cubot/logs/"; #Where is cubot log file to refer cubotlog="$CUBLOGDIR/cubot.log"; #Temporary Output file for email dt=`date +%d%m%y` outfile="/tmp/cubsys_${dt}.txt" #Disk to chk disk[0]='/dev/hda2'; th[0]=50; #/home disk[1]='/dev/hda1'; th[1]=80; #/boot disk[2]='/dev/hdb1'; th[2]=50; #/mysql data ######################################################### ## Do Not Change After This ## ######################################################### >$outfile #CHKING DISK SPACE diskfull=0 for (( i = 0 ; i < ${#disk[@]} ; i++ )) do #echo ">> df -lhm ${disk[$i]} | grep -v Use | awk -v TS=${th[$i]} '{usedperc=5; gsub(\"%\", \"\", usedperc); if(usedperc > TS){ print \"1\" } else { print \"0\" } }' <<" if [ `df -lhm ${disk[$i]} | grep -v Use | awk -v TS=${th[$i]} '{usedperc=$5; gsub("%", "", usedperc); if(usedperc > TS){ print "YES" } else { print "NO" } }' ` == "YES" ] ; then echo >> $outfile echo "Disk Space Is Crossing Threshold for ${disk[$i]}" >> $outfile df -lh ${disk[$i]} >> $outfile diskfull=1 echo fi done #CHKING CUBOT STATUS cubot=0; rdcubot=`/etc/init.d/rdcubot status | grep running | wc -l` ; if [ test $rdcoubot == "0" ]; then echo >> $outfile echo >> $outfile echo "rdcubot service is not running" >> $outfile cubot=1;# print "NOT Working \n"; fi #CHKING HTTPD STATUS http=0; cubhttpd=`/etc/init.d/cubhttpd status | grep running | wc -l` ; if [ $cubhttpd == "0" ]; then echo >> $outfile echo >> $outfile echo "cubhttpd service is not running" >> $outfile http=1;# print "NOT Working \n"; fi #SENDING MAIL IF NEEDED if [ $cubot == "1" -o $http == "1" -o $diskfull == "1" ]; then MAIL="/tmp/${dt}.mail" >$MAIL echo "From: $from" >> $MAIL echo "To: $sendto " >> $MAIL echo "Subject: $subject" >> $MAIL echo "Content-Type: text/plain;" >> $MAIL echo "" >> $MAIL for (( i = 0 ; i < ${#message[@]} ; i++ )) do echo "${message[$i]}" >> $MAIL done echo "------------ Cubot Service Status ----------------" >> $MAIL if [ $cubot == "0" -a $http == "0" ]; then echo "CUBOT Services are running properly." >> $MAIL fi echo "" >> $MAIL echo "-------------- Disk Usage Status -------------- " >> $MAIL cat $outfile >> $MAIL if [ $diskfull == "1" ]; then echo "!! Warning : DISK SPACE !!" >> $MAIL else echo "DISK SPACE : OK" >> $MAIL fi echo "" >> $MAIL echo "-------------- MySQL Status -------------- " >> $MAIL mysqladmin status -u cubot >> $MAIL echo "" >> $MAIL echo "-------------- IPCS Status -------------- " >> $MAIL ipcs -q >> $MAIL echo "" >> $MAIL echo "-------------- Log File Size -------------- " >> $MAIL cd $CUBLOGDIR; ls -lh cubot.log >> $MAIL ls -lh access_log >> $MAIL ls -lh error_log >> $MAIL ls -lh etllogs/etl.log >> $MAIL cd - echo "" >> $MAIL echo "Please do not reply to this mail." >> $MAIL echo >> $MAIL echo >> $MAIL echo "Thanks." >> $MAIL echo >> $MAIL echo >> $MAIL echo "Regards," >> $MAIL echo >> $MAIL echo "CUBOT Support." >> $MAIL echo >> $MAIL echo >> $MAIL echo "--------------------------- C U B O T - L O G --------------------------------------" >> $MAIL echo "" >> $MAIL tail -n10 $cubotlog >> $MAIL echo "" >> $MAIL /usr/sbin/sendmail -t $sendto < $MAIL; # vikash@robustdesigns.com fi rm -f $outfile rm -f $MAIL