Hi monks,
I am trying to extract the web page report log, which will genarate when i clicked any of the link in a web page.The request and response will be in xml format. There are no of clicks from different ipaddress, i want to see the request log which genarated from a specific ipaddress.
At present i am using perl one liner command which i got from the perl monks.
perl -ane 'print if /<request>/../</request>/' | tail -f logfileBy this i am able to see the xml log from the <request> to </request> tag.It is very difficult for searching the request log from a specific ip address.The log format is as below
<?xml version="1.0" encoding="UTF-8"?><status>SUCCESS</status>
/***********For QA only ****************/
<?xml version="1.0" encoding="UTF-8"?>
<request>
<visitorID>a4379158-2fb5-494b-a195-ee2cc44df2a2</visitorID>
<reportSuiteID>aolmobilewebdev</reportSuiteID>
<pageName>wpt: help_pv</pageName>
<pageURL>http://mqa.aol.com/portal/default/help.do?icid=ft_help</pageU
+RL>
<ipAddress>64.12.218.80</ipAddress>
<userAgent>ApacheBench/2.0.41-dev</userAgent>
<scXmlVer>1.0</scXmlVer>
<timezone>-5</timezone>
<channel>us.wptportal</channel>
<referrer></referrer>
<events>event10</events>
<server>qawire-ql26.tweb.aol.com</server>
<eVar16>ft_help</eVar16>
<prop1>wpt: portal</prop1>
<prop2>wpt: Help Page</prop2>
<prop3>gmt_5</prop3>
<prop10>ApacheBench/2.0.41-dev</prop10>
<prop12>http://mqa.aol.com/portal/default/help.do</prop12>
<prop13>non-authenticated</prop13>
<prop14>no referrer</prop14>
<prop24>uaid_na</prop24>
<prop49>xml api</prop49>
</request>
<?xml version="1.0" encoding="UTF-8"?><status>SUCCESS</status>
/***********For QA only ****************/
<?xml version="1.0" encoding="UTF-8"?>
<request>
<visitorID>c8b26ed4-3370-4402-abd7-b0519c51d80c</visitorID>
<reportSuiteID>aolmobilewebdev</reportSuiteID>
<pageName>wpt: help_pv</pageName>
<pageURL>http://mqa.aol.com/portal/default/help.do?icid=ft_help</pageU
+RL>
<ipAddress>10.146.163.43</ipAddress>
<userAgent>ApacheBench/2.0.40-dev</userAgent>
<scXmlVer>1.0</scXmlVer>
<timezone>-5</timezone>
<channel>us.wptportal</channel>
<referrer></referrer>
<events>event10</events>
<server>qawire-ql26.tweb.aol.com</server>
<eVar16>ft_help</eVar16>
<prop1>wpt: portal</prop1>
<prop2>wpt: Help Page</prop2>
<prop3>gmt_5</prop3>
<prop10>ApacheBench/2.0.40-dev</prop10>
<prop12>http://mqa.aol.com/portal/default/help.do</prop12>
<prop13>non-authenticated</prop13>
<prop14>no referrer</prop14>
<prop24>uaid_na</prop24>
<prop49>xml api</prop49>
</request>
<?xml version="1.0" encoding="UTF-8"?><status>SUCCESS</status>
/***********For QA only ****************/
<?xml version="1.0" encoding="UTF-8"?>
<request>
<visitorID>420ea1fe-c93e-4209-bee9-e548de8ea1c5</visitorID>
<reportSuiteID>aolmobilewebdev</reportSuiteID>
<pageName>wpt: help_pv</pageName>
<pageURL>http://mqa.aol.com/portal/default/help.do?icid=ft_help</pageU
+RL>
<ipAddress>64.12.218.64</ipAddress>
<userAgent>ApacheBench/2.0.41-dev</userAgent>
<scXmlVer>1.0</scXmlVer>
<timezone>-5</timezone>
<channel>us.wptportal</channel>
<referrer></referrer>
<events>event10</events>
<server>qawire-ql26.tweb.aol.com</server>
<eVar16>ft_help</eVar16>
<prop1>wpt: portal</prop1>
<prop2>wpt: Help Page</prop2>
<prop3>gmt_5</prop3>
<prop10>ApacheBench/2.0.41-dev</prop10>
<prop12>http://mqa.aol.com/portal/default/help.do</prop12>
<prop13>non-authenticated</prop13>
<prop14>no referrer</prop14>
<prop24>uaid_na</prop24>
<prop49>xml api</prop49>
</request>
I want to see the log </request> to </request> which is from the ipaddress:10.146.163.43
Appreciate your assistance!