Scrub log grabber files removing IP information and account names

Idea ID 1790746

Scrub log grabber files removing IP information and account names

Hi,

In OpsBridge/OBM/OMi you generate support logs with the loggrabber utility.  These logs can have over 100MBs of zipped data.

Is there a way to scub the logs from loggrabber to remove the IP addresses and account information?  A switch on the tool would be wonderful.

Would like tool to clean the logs before sending to support.  Thank you!

Johnson Hays

 

Tags (2)
4 Comments
Regular Contributor.
Regular Contributor.

Hi,

FYI

You can strip IPv4 addresses from the logs with this sed command:

sed 's/\([0-9]\{1,3\}\.\)\{3,3\}[0-9]\{1,3\}/x.x.x.x/g' opr-svcdiscserver.log

Johnson

Regular Contributor.
Regular Contributor.

Also, create a directory with the logs, /tmp/logs and a directory where the scubbed logs will go /tmp/logsMF.  From /tmp/logs I ran the following command to remove IP information:

for i in `ls`; do echo $i ; sed 's/\([0-9]\{1,3\}\.\)\{3,3\}[0-9]\{1,3\}/x.x.x.x/g' $i | sed 's/\([A-Za-z0-9]*:\)\{1,7\}[A-Za-z0-9]\{1,4\}/xxx:xxxx:xxx:xxx::xxx/2g' | tee /tmp/logsMF/$i ; done

 

Micro Focus Contributor
Micro Focus Contributor
Status changed to: Waiting for Votes
 
Micro Focus Contributor
Micro Focus Contributor
Status changed to: Declined

A solution was provided in the comments in this thread.

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.