Reading Web Service Log Files
All requests that are successfully received by IM are stored in a backup directory. The following Bash scripts present an example how to find out how many records a customer sent.
Search for all unique Product records in one file:
Grep
cat ID-int1-eu-pricefx-net-39189-1507646532189-0-21 | grep --perl-regex -o '<prod:sku>.*?</prod:sku>' | wc -l
486
cat ID-int1-eu-pricefx-net-39189-1507646532189-0-21 | grep --perl-regex -o '<prod:sku>.*?</prod:sku>' | sort --unique | wc -l
485
cat ID-int1-eu-pricefx-net-39189-1507646532189-0-21 |grep --perl-regex -o '<tns:sku>000000000000.{5}[0-9]</tns:sku>' | sort --unique | wc -l
Â
All Customers that were sent on Sep 5:
for i in `find . -type f -ls | grep -i 'Sep 5' | awk '{print $11}'` ; do found=`cat $i | grep -Po '(?<=>)[^>]+(?=</customerId>)'` ; echo "$found" ; done > _output_customerId_5.txt
cat _output_customerId_5.txt | sort —unique | wc -l
Â
Look for files with the tag <customerId> and count them and count them in Excel:
for i in `find . -type f -ls | grep -i 'Sep 6' | awk '{print $11}'` ; do count=`cat $i | grep -o '<customerId>' | wc -l` ; echo "$i:$count" ; done
Â
In the Excel file use "Text import Wizard"Â to split names of the file and the count.Â
IntegrationManager version 5.8.0