<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.iis.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:cs="http://blogs.iis.net/"><channel><title>Search results matching tag 'NCSA input format'</title><link>http://forums.iis.net/search/SearchResults.aspx?o=DateDescending&amp;tag=NCSA+input+format&amp;orTags=0</link><description>Search results matching tag 'NCSA input format'</description><dc:language>en-US</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Parse Errors in NSCA format -- can I do anything?</title><link>http://forums.iis.net/p/1162508/1924103.aspx#1924103</link><pubDate>Tue, 10 Nov 2009 18:01:17 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1924103</guid><dc:creator>msdn_dave</dc:creator><cs:applicationKey>input_formats-51</cs:applicationKey><description>&lt;p&gt;The following line causes parse errors (&amp;quot;Log row terminates unexpectedly.&amp;quot;) when the input format is NCSA.&amp;nbsp; (IPs&amp;nbsp;altered to protect the guilty.)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;299.99.45.146 - - [25/Oct/2009:01:39:44 -0700] &amp;quot;GET /images/expert/spacer.gif\&amp;quot; HTTP/1.1&amp;quot; 404 11124 &amp;quot;&lt;a href="http://www.website.com/lms/agentDashboard.page"&gt;http://www.website.com/lms/agentDashboard.page&lt;/a&gt;&amp;quot; &amp;quot;Akamai Edge&amp;quot;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m pretty sure the problem is the forward slash after spacer.gif.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m assuming there is nothing I can do, short of pre-parsing and editing the&amp;nbsp;error out, right?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Also,&amp;nbsp; I had to go to quite a length to discover the&amp;nbsp;problem.&amp;nbsp; I used the &amp;nbsp;-e:9999 tag, but that simply give me line numbers (in some very large files, hard to deal with.)&amp;nbsp;&amp;nbsp; Is there a way to actually output the troublesome lines in the future to STDERR somehow?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;d.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>RE: Replacing URL (request) with Friendly Names??</title><link>http://forums.iis.net/p/1146018/1855252.aspx#1855252</link><pubDate>Thu, 31 May 2007 16:03:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1855252</guid><dc:creator>LogParser User : Greg C</dc:creator><cs:applicationKey>input_formats-51</cs:applicationKey><description>&lt;P&gt;FYI: Found the answer on SQL forums - This works...:&lt;/P&gt;&lt;P&gt;select remotehostname, datetime, &lt;BR&gt;replace(&lt;BR&gt;replace(&lt;BR&gt;replace(&lt;BR&gt;replace(&lt;BR&gt;replace(&lt;BR&gt;replace(&lt;BR&gt;replace(&lt;BR&gt;replace(request,'GET /portal/site/marketintel/menuitem.6dc3d475ebbc54fca120231020248a0c/ HTTP/1.1','Home')&lt;BR&gt;, 'GET /portal/site/marketintel/menuitem.45dc4e7d2e1e54fca120231020248a0c/ HTTP/1.1','News')&lt;BR&gt;, 'GET /portal/site/marketintel/menuitem.d6831dc3617f54fca120231020248a0c/ HTTP/1.1','Research') &lt;BR&gt;, 'GET /portal/site/marketintel/menuitem.13d8b98ff8e164fca120231020248a0c/ HTTP/1.1','Case Studies')&lt;BR&gt;, 'GET /portal/site/marketintel/template.PAGE/menuitem.45dc4e7d2e1e54fca120231020248a0c/?addCatFilter=','News -Filter:')&lt;BR&gt;, 'GET /portal/site/marketintel/template.PAGE/menuitem.13d8b98ff8e164fca120231020248a0c/?addCatFilter=','Case Studies-Filter:')&lt;BR&gt;, 'GET /portal/site/marketintel/template.PAGE/menuitem.d6831dc3617f54fca120231020248a0c/?addCatFilter=','Research-Filter:')&lt;BR&gt;, '&amp;amp;removeCatFilter=&amp;amp;moreCatList=&amp;amp;removeSearchText=&amp;amp;pastDays=10000&amp;amp;goingBack=10000&amp;amp;sources=0&amp;amp;industries=0 HTTP/1.1','')&lt;BR&gt;, statuscode, bytessent&lt;BR&gt;from.....&lt;/P&gt;</description></item><item><title>Replacing URL (request) with Friendly Names??</title><link>http://forums.iis.net/p/1146018/1851230.aspx#1851230</link><pubDate>Wed, 30 May 2007 17:38:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1851230</guid><dc:creator>LogParser User : Greg C</dc:creator><cs:applicationKey>input_formats-51</cs:applicationKey><description>&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;I'm using LogParser to import an Apache web server log into an MS SQL server db. I can't figure out how to clean up the URL's at the same time...&lt;/P&gt;&lt;P&gt;My command:&lt;BR&gt;LogParser "SELECT RemoteHostName, DateTime, Request, StatusCode, BytesSent INTO&amp;nbsp;MyTable FROM D:\IBMHTTPServer6\logs\access.log" -i:NCSA -o:SQL -server:MyServer -database:MyDB -driver:"SQL Server" -username:xxxx -password:xxxx -createTable&lt;img src='images/emotions/shocked.gif' height='20' width='20' border='0' title='Shocked' align='absmiddle'&gt;N -iCheckPoint&lt;img src='images/emotions/biggrin.gif' height='20' width='20' border='0' title='Big Grin' align='absmiddle'&gt;:\web\weblog.lpc &lt;/P&gt;&lt;P&gt;The input referer field looks like:&lt;/P&gt;&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;&lt;P&gt;GET /portal/site/marketintel/menuitem.13d8b98ff8e164fca120231020248a0c/ HTTP/1.1&lt;BR&gt;GET /portal/site/marketintel/menuitem.d6831dc3617f54fca120231020248a0c/ HTTP/1.1&lt;BR&gt;GET /portal/site/marketintel/menuitem.45dc4e7d2e1e54fca120231020248a0c/ HTTP/1.1&lt;BR&gt;GET /portal/site/marketintel/menuitem.6dc3d475ebbc54fca120231020248a0c/ HTTP/1.1&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I want to replace the first (...13d8b...) with "Home" and the next (...d683...) with "News Page", so that the referer field in the DB looks like: &lt;/P&gt;&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;&lt;P&gt;Home &lt;BR&gt;News Page&lt;BR&gt;Reseach Page&lt;BR&gt;About&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P dir=ltr&gt;I figured out how to use REPLACE_STR but only for one 'url/page'...&lt;/P&gt;&lt;P dir=ltr&gt;Thanks!&lt;/P&gt;&lt;P dir=ltr&gt;Greg&lt;/P&gt;</description></item><item><title>RE: NCSA Input format and the same as Output?</title><link>http://forums.iis.net/p/1145772/1854811.aspx#1854811</link><pubDate>Thu, 16 Nov 2006 08:07:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1854811</guid><dc:creator>LogParser User : NickSoft</dc:creator><cs:applicationKey>input_formats-51</cs:applicationKey><description>Hi&lt;br&gt;&lt;br&gt;I did it....everything now is clear and the Logfile did it the way I want.&lt;br&gt;&lt;br&gt;For information the way I did it &lt;img src='images/emotions/wink.gif' height='20' width='20' border='0' title='Wink' align='absmiddle'&gt;&lt;br&gt;&lt;br&gt;The sql-file:&lt;br&gt;&lt;br&gt;select RemoteHostName, UserName, DateTime, Request, StatusCode, BytesSent into oktober.log from wiseaccess311006.log WHERE DateTime &gt; TO_TIMESTAMP('2006-10-15 00:00:00', 'yyyy-MM-dd hh:mm:ss')&lt;br&gt;&lt;br&gt;The Command Line:&lt;br&gt;&lt;br&gt;LogParser -i:NCSA -o:TSV file:selall.sql&lt;br&gt;&lt;br&gt;This is the way I wanna do it &lt;img src='images/emotions/biggrin.gif' height='20' width='20' border='0' title='Big Grin' align='absmiddle'&gt;&lt;br&gt;&lt;br&gt;Many Thanks for help Daniel !!!&lt;br&gt;&lt;br&gt;Greetz and cu soon &lt;br&gt;&lt;br&gt;NickSoft&lt;br&gt;&lt;br&gt;</description></item><item><title>RE: NCSA Input format and the same as Output?</title><link>http://forums.iis.net/p/1145772/1854891.aspx#1854891</link><pubDate>Tue, 14 Nov 2006 14:13:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1854891</guid><dc:creator>LogParser User : DEinspanjer</dc:creator><cs:applicationKey>input_formats-51</cs:applicationKey><description>Oops, NAT doesn't support multiplexing.&lt;br&gt;Try using the TSV output instead. As long as you are only outputting one field, it shouldn't put any delimiters in and you should be alright.&lt;br&gt;&lt;br&gt;Are you sure you used the select statement I suggested instead of a *?&lt;br&gt;&lt;br&gt;SELECT FileNum, Text USING ...</description></item><item><title>RE: NCSA Input format and the same as Output?</title><link>http://forums.iis.net/p/1145772/1854906.aspx#1854906</link><pubDate>Tue, 14 Nov 2006 07:43:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1854906</guid><dc:creator>LogParser User : NickSoft</dc:creator><cs:applicationKey>input_formats-51</cs:applicationKey><description>Sounds good but doesn´t work &lt;img src='images/emotions/sad.gif' height='20' width='20' border='0' title='Sad' align='absmiddle'&gt;&lt;br&gt;&lt;br&gt;Well I just try it and the only think is that LP is wrote a number in front of Line. The Line looks like this now:&lt;br&gt;1 C:\Programme\Log Parser 2.2\z2.log, 18547, 142.160.44.19, -, Anonymous, 11/14/2006, 5:45:01, GET /UNIFIL/gpers_img HTTP/1.0, 200, 479, http://www.flottenkdo.mar/UNIFIL, Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0), -,&lt;br&gt;&lt;br&gt;I try it also in another input formats.&lt;br&gt;&lt;br&gt;Anyone another idea? &lt;br&gt;&lt;br&gt;I just need the part after and incl. "Anonymous".&lt;br&gt;&lt;br&gt;Thx and Greetz&lt;br&gt;&lt;br&gt;&lt;br&gt;</description></item><item><title>RE: NCSA Input format and the same as Output?</title><link>http://forums.iis.net/p/1145772/1854810.aspx#1854810</link><pubDate>Mon, 13 Nov 2006 17:34:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1854810</guid><dc:creator>LogParser User : DEinspanjer</dc:creator><cs:applicationKey>input_formats-51</cs:applicationKey><description>If you use SELECT *, LP is going to output the filename and row number in addition to the other fields defined as NCSA.&lt;br&gt;&lt;br&gt;Try using this query and see if it works for you:&lt;br&gt;&lt;br&gt;logparser -i:TEXTLINE -o:NAT -headers&lt;img src='images/emotions/shocked.gif' height='20' width='20' border='0' title='Shocked' align='absmiddle'&gt;FF "SELECT FileNum, Text USING ADD(1, DIV(Index, 1000)) AS FileNum INTO outfile-*.log FROM infile.log"</description></item><item><title>RE: NCSA Input format and the same as Output?</title><link>http://forums.iis.net/p/1145772/1854809.aspx#1854809</link><pubDate>Mon, 13 Nov 2006 08:40:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1854809</guid><dc:creator>LogParser User : NickSoft</dc:creator><cs:applicationKey>input_formats-51</cs:applicationKey><description>Hi me again &lt;img src='images/emotions/smile.gif' height='20' width='20' border='0' title='Smile' align='absmiddle'&gt;&lt;br&gt;&lt;br&gt;I think I´ve found the problem why ma Web-Analyser isn´t able do evaluate the Information.&lt;br&gt;It doesn´t matter which Outputformat I choose the LogParser always write something at the beginning of each line.&lt;br&gt;The things he wrote in front of each line are:&lt;br&gt;&lt;br&gt;C:\Programme\Log Parser 2.2\wiseaccess311006.log 7479960&lt;br&gt;&lt;br&gt;The number seems to be an counter the number is rising.&lt;br&gt;&lt;br&gt;Is there an possibility that the LogParser didn´t write this Line??&lt;br&gt;&lt;br&gt;Then I´m thinking this is se easiest way to make it understandable for my Web-Analyser.&lt;br&gt;&lt;br&gt;Thx and Greetz&lt;br&gt;&lt;br&gt;Nicki&lt;br&gt;&lt;br&gt;</description></item><item><title>RE: NCSA Input format and the same as Output?</title><link>http://forums.iis.net/p/1145772/1854874.aspx#1854874</link><pubDate>Mon, 13 Nov 2006 07:10:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1854874</guid><dc:creator>LogParser User : NickSoft</dc:creator><cs:applicationKey>input_formats-51</cs:applicationKey><description>Thx this sounds good&lt;br&gt;&lt;br&gt;Sometimes is it better then see it from another view....the new problem how I will give only the textline out? The Input data in textline is no problem also the text comparison but in which format I can make the output....the output formats are already the same then Input in NCSA. &lt;br&gt;Or is there any possibility to put the line as textformat in an file out?&lt;br&gt;&lt;br&gt;For sure there is an posibility...but im too stupid to find it o_O&lt;br&gt;&lt;br&gt;Well I will search for it today and will report in but if you have an solution I will be happy.&lt;br&gt;&lt;br&gt;Thx and Greetz &lt;br&gt;&lt;br&gt;Nicki&lt;br&gt;&lt;br&gt;</description></item><item><title>RE: NCSA Input format and the same as Output?</title><link>http://forums.iis.net/p/1145772/1854807.aspx#1854807</link><pubDate>Fri, 10 Nov 2006 15:53:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1854807</guid><dc:creator>LogParser User : DEinspanjer</dc:creator><cs:applicationKey>input_formats-51</cs:applicationKey><description>If you just want to cut the file into smaller chunks so your web-analyzer is able to understand them then I wouldn't even bother with LP. There are plenty of programs that can chunk data like that or you could just write a simple Perl/Python/Ruby/Bash script to do it.&lt;br&gt;&lt;br&gt;If you want to use LP, I'd suggest actually treating the files as TEXTLINE instead of NCSA.  Use string parsing to do the timestamp comparison you want to do and just write out the Text field to the new file.  This will be easier than trying to craft a new output format and it will also let you use the multiplexing feature if you want to automatically break the big files into month or week or daily chunks.  Good luck!</description></item></channel></rss>