CPUG: The Check Point User Group

Resources for the Check Point Community, by the Check Point Community.


Tim Hall has done it again! He has just released the 2nd edition of "Max Power".
Rather than get into details here, I urge you to check out this announcement post.
It's a massive upgrade, and well worth checking out. -E

 

Results 1 to 16 of 16

Thread: Script for MDS log summary

Threaded View

  1. #1
    Join Date
    2011-08-02
    Location
    http://spikefishsolutions.com
    Posts
    1,623
    Rep Power
    9

    Default Script for MDS log summary

    Hi I made this .. um... wonderful script to give me some worst case numbers for a R77.30 MDS based on how many logs were in the system. Shows highest number of logs per day per CMA.

    Code:
    #!/bin/sh
    # Print log rate data on all Domains
    
    # execute the script that defines Check Point environment variables
    source /etc/profile
    
    
    TOTAL_LOGS_COUNT=0
    TOTAL_LOGS_SIZE=0
    TOTAL_LOGS_PER_SEC=0
    for DOMAIN in $(ls -1 $MDSDIR/customers)
    do
                    mdsenv "$DOMAIN"
                    echo "Working on $DOMAIN"
                    CPLogInvestigator -a -p >& $DOMAIN-logs.txt || ( echo "Please install CPLogInvestigator sk87263" ; exit 1 )
                    HIGHEST_LOGS_PER_DAY=$( awk '/([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]|fw.log) \|/ {print $5}' $DOMAIN-logs.txt | sort -rn | head -1)
                    HIGHEST_LOGS_SIZE_PER_DAY=$( awk '/([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]|fw.log) \|/ {print $3}' $DOMAIN-logs.txt | sort -rn | head -1)
                    echo "For CMA $DOMAIN"
                    echo "    Highest logs per day $HIGHEST_LOGS_PER_DAY"
                    echo "    Logs Avg Per Sec $(( $HIGHEST_LOGS_PER_DAY / 86400)) "
                    echo "    Highest gigbytes day $HIGHEST_LOGS_SIZE_PER_DAY"
                    TOTAL_LOGS_COUNT=$( echo | awk "{print $TOTAL_LOGS_COUNT + $HIGHEST_LOGS_PER_DAY}"      )
                    TOTAL_LOGS_SIZE=$(  echo | awk "{print $TOTAL_LOGS_SIZE + $HIGHEST_LOGS_SIZE_PER_DAY}" )
    
    done
    
    echo
    echo "For hostname: $( hostname )"
    echo "Highest Daily logs per day across all CMAs: $( echo $TOTAL_LOGS_COUNT | sed ':a;s/\B[0-9]\{3\}\>/,&/;ta' )"
    echo "Highest average logs per second across all CMAs: $( echo $(( TOTAL_LOGS_COUNT / 86400)) | sed ':a;s/\B[0-9]\{3\}\>/,&/;ta' )"
    echo "Highest log file size per day across all CMAs: $TOTAL_LOGS_SIZE GBs"
    echo
    exit 0
    Last edited by jflemingeds; 2018-01-11 at 18:57. Reason: what was i thinking.. -k ..pfft

Similar Threads

  1. RIM summary routes
    By Serji in forum IPsec VPN Blade (Virtual Private Networks)
    Replies: 0
    Last Post: 2012-04-06, 04:53
  2. Is it possible to amend alert summary options for IPS software blade?
    By dmease in forum IPS Blade (Formerly SmartDefense)
    Replies: 1
    Last Post: 2011-08-22, 07:55
  3. Configuration summary?
    By mhakali in forum Check Point SecurePlatform (SPLAT)
    Replies: 3
    Last Post: 2008-08-22, 07:35
  4. Generate automatic Voyager summary files
    By robori in forum Check Point IP Appliances and IPSO (Formerly Sold By Nokia)
    Replies: 0
    Last Post: 2008-01-24, 12:05
  5. summary of Smartdefense that are turn on
    By hi_there in forum IPS Blade (Formerly SmartDefense)
    Replies: 0
    Last Post: 2006-08-11, 04:50

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •