<?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 'SYSLOG output target'</title><link>http://forums.iis.net/search/SearchResults.aspx?o=DateDescending&amp;tag=SYSLOG+output+target&amp;orTags=0</link><description>Search results matching tag 'SYSLOG output target'</description><dc:language>en-US</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>SYSLOG and newlines?</title><link>http://forums.iis.net/p/1146032/1851244.aspx#1851244</link><pubDate>Thu, 10 May 2007 15:26:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1851244</guid><dc:creator>LogParser User : Quarantainenet</dc:creator><cs:applicationKey>output_targets-51</cs:applicationKey><description>Hey all - let me kick off by saying I think Log Parser is a wonderful bit of software &lt;img src='images/emotions/smile.gif' height='20' width='20' border='0' title='Smile' align='absmiddle'&gt;&lt;br&gt;&lt;br&gt;However, using it I've run into a bit of an issue - allow me to sketch my situation first.&lt;br&gt;I'm parsing MS DHCP Logfiles in order to send them to a Linux box. The obvious choice to send this information with was the SYSLOG output - which works like a charm, over both UDP and TCP. &lt;br&gt;The thing is however, that sending the information over TCP caused all lines to end up in one big blob of information. Not impossible to parse, but not particularly pretty either.&lt;br&gt;&lt;br&gt;Allow me to illustrate with an example (a):&lt;br&gt;-----&lt;br&gt;&lt;14&gt;May 10 14:17:50 Q2K3-AD LogParser:c:\WINDOWS\System32\dhcp\DhcpSrvLog-Thu.log 264 11,05/10/07,15:34:49,Renew,10.200.1.100,qcam,00031B568036,&lt;14&gt;May 10&lt;br&gt;               14:17:50 Q2K3-AD LogParser:c:\WINDOWS\System32\dhcp\DhcpSrvLog-Thu.log 265 11,05/10/07,15:35:33,Renew,10.200.1.100,qcam,00031B568036,&lt;14&gt;May 10 14:17:50&lt;br&gt;               Q2K3-AD LogParser:c:\WINDOWS\System32\dhcp\DhcpSrvLog-Thu.log 266 11,05/10/07,15:36:18,Renew,10.200.1.100,qcam,00031B568036,&lt;br&gt;&lt;br&gt;-----&lt;br&gt;&lt;br&gt;would look a lot better if it were shaped like this (b), especially to the human eye &lt;img src='images/emotions/smile.gif' height='20' width='20' border='0' title='Smile' align='absmiddle'&gt;&lt;br&gt;&lt;br&gt;-----&lt;br&gt;&lt;14&gt;May 10 14:17:50 Q2K3-AD LogParser:c:\WINDOWS\System32\dhcp\DhcpSrvLog-Thu.log 264 11,05/10/07,15:34:49,Renew,10.200.1.100,qcam,00031B568036,&lt;br&gt;&lt;14&gt;May 10 14:17:50 Q2K3-AD LogParser:c:\WINDOWS\System32\dhcp\DhcpSrvLog-Thu.log 265 11,05/10/07,15:35:33,Renew,10.200.1.100,qcam,00031B568036,&lt;br&gt;&lt;14&gt;May 10 14:17:50 Q2K3-AD LogParser:c:\WINDOWS\System32\dhcp\DhcpSrvLog-Thu.log 266 11,05/10/07,15:36:18,Renew,10.200.1.100,qcam,00031B568036,&lt;br&gt;&lt;br&gt;&lt;br&gt;-----&lt;br&gt;My current commandline looks like this:&lt;br&gt;----&lt;br&gt;LogParser "SELECT * INTO @1.2.3.4:1234 FROM c:\*.Log" -i:TEXTLINE -o:SYSLOG -iCheckpoint:checkpoints.lpc -protocol:TCP&lt;br&gt;----&lt;br&gt;&lt;br&gt;My question would be as follows: is it possible to make it so that (a) gets formatted like (b) (i.e. with newlines between each parsed line)? And, if yes, how? &lt;img src='images/emotions/smile.gif' height='20' width='20' border='0' title='Smile' align='absmiddle'&gt;&lt;br&gt;Alternatively, some sort of separator character would work for my purposes as well ofcourse - any pointers or solid information is most welcome!&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</description></item><item><title>Sysloc COM API and Protocol</title><link>http://forums.iis.net/p/1145568/1850780.aspx#1850780</link><pubDate>Mon, 15 May 2006 20:41:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1850780</guid><dc:creator>LogParser User : ssnodgra</dc:creator><cs:applicationKey>output_targets-51</cs:applicationKey><description>How do I tell logparser to use tcp for syslog output. Below is what I have been trying and it does not work.&lt;br&gt;&lt;br&gt;&lt;br&gt;Set SysLogOutput = CreateObject("MSUtil.LogQuery.SYSLOGOutputFormat")&lt;br&gt;SysLogOutput.protocol =TCP&lt;br&gt;&lt;br&gt;' Create query text&lt;br&gt;EventQuery = "SELECT * INTO " &amp; "@" &amp; Trim(sls(1)) &amp; " FROM Security, Application, System, Directory\u0020Service, DNS\u0020Server, File\u0020Replication\u0020Service"&lt;br&gt;&lt;br&gt;' Execute query&lt;br&gt;ParserO.ExecuteBatch EventQuery, EVTLogInput, SysLogOutput</description></item><item><title>RE: Can I use logParser to write a file with SYSlog format</title><link>http://forums.iis.net/p/1145538/1854105.aspx#1854105</link><pubDate>Fri, 14 Apr 2006 19:29:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1854105</guid><dc:creator>LogParser User : DEinspanjer</dc:creator><cs:applicationKey>output_targets-51</cs:applicationKey><description>Did you look in the help file?</description></item><item><title>Can I use logParser to write a file with SYSlog format</title><link>http://forums.iis.net/p/1145538/1850750.aspx#1850750</link><pubDate>Thu, 13 Apr 2006 13:26:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1850750</guid><dc:creator>LogParser User : andoni</dc:creator><cs:applicationKey>output_targets-51</cs:applicationKey><description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure if I can achive that but can I use logparser to collect Security logs but instead of sending the logs to a LogSysserver save the output as a file in Syslog format?&lt;/P&gt;&lt;P&gt;Issam&lt;/P&gt;</description></item><item><title>RE: Exchange Message Tracking to Syslog - Can it be done?</title><link>http://forums.iis.net/p/1145010/1854066.aspx#1854066</link><pubDate>Tue, 07 Mar 2006 14:06:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1854066</guid><dc:creator>LogParser User : montm</dc:creator><cs:applicationKey>output_targets-51</cs:applicationKey><description>&lt;P&gt;Daniel,&lt;/P&gt;&lt;P&gt;IO.&amp;nbsp; This is great !!&amp;nbsp; Much cleaner... and works.&lt;/P&gt;&lt;P&gt;TY TY TY&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mont&lt;/P&gt;</description></item><item><title>RE: Exchange Message Tracking to Syslog - Can it be done?</title><link>http://forums.iis.net/p/1145010/1854022.aspx#1854022</link><pubDate>Mon, 06 Mar 2006 15:59:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1854022</guid><dc:creator>LogParser User : DEinspanjer</dc:creator><cs:applicationKey>output_targets-51</cs:applicationKey><description>That was exactly what I needed.&lt;br&gt;&lt;br&gt;The ultimate issue here is that LogParser's Timestamp data type has no support for timezone identifiers or offsets.  Something I sincerely think should be fixed in the next version.&lt;br&gt;&lt;br&gt;The -i:W3C format example shows that it recognizes the Date and Time fields as Timestamp fields, but apparently the format that is being used for your log files isn't understood so they are coming in as regular strings.  This means that you do have to do some string processing. :/&lt;br&gt;&lt;br&gt;Here is my attempt at making the transformation to localtime timestamps as concise and simple as possible. HTH&lt;br&gt;&lt;br&gt;&lt;pre&gt;SELECT&lt;br&gt;      DateTime&lt;br&gt;    , [Origination Time]&lt;br&gt;USING&lt;br&gt;      TO_TIMESTAMP(date, 'yyyy-M-d') AS RealDate&lt;br&gt;    , TO_TIMESTAMP(time, 'h:m:s G\MT') AS RealTime&lt;br&gt;    , TO_LOCALTIME(TO_TIMESTAMP(RealDate,RealTime)) as DateTime&lt;br&gt;    , TO_LOCALTIME(TO_TIMESTAMP([Origination-time], 'yyyy-M-d h:m:s G\MT')) as [Origination Time]&lt;br&gt;FROM message.log&lt;br&gt;&lt;/pre&gt;</description></item><item><title>RE: Exchange Message Tracking to Syslog - Can it be done?</title><link>http://forums.iis.net/p/1145010/1854019.aspx#1854019</link><pubDate>Mon, 06 Mar 2006 01:05:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1854019</guid><dc:creator>LogParser User : montm</dc:creator><cs:applicationKey>output_targets-51</cs:applicationKey><description>&lt;P&gt;Daniel,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for engaging.&amp;nbsp; Here's a bit of the file...&amp;nbsp; Am hoping I have not mangled the format in presenting/anoymizing this scrap.&lt;/P&gt;</description></item><item><title>RE: Exchange Message Tracking to Syslog - Can it be done?</title><link>http://forums.iis.net/p/1145010/1854018.aspx#1854018</link><pubDate>Mon, 06 Mar 2006 00:53:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1854018</guid><dc:creator>LogParser User : DEinspanjer</dc:creator><cs:applicationKey>output_targets-51</cs:applicationKey><description>Could you give me an excerpt of your log file that I could play around with? I don't have any w3c files so it hampers my ability to test ideas.</description></item><item><title>RE: Exchange Message Tracking to Syslog - Can it be done?</title><link>http://forums.iis.net/p/1145010/1854065.aspx#1854065</link><pubDate>Sun, 05 Mar 2006 21:52:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1854065</guid><dc:creator>LogParser User : montm</dc:creator><cs:applicationKey>output_targets-51</cs:applicationKey><description>&lt;P&gt;Daniel,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the reply.&amp;nbsp; I tried what you suggest and I got nulls for the datetime.&amp;nbsp; Perhaps I am not picking up on something I should be assuming.&amp;nbsp; I am trying to&amp;nbsp;transform the 2 GMT timestamps in the message tracking logs to UTC formatted localtime ( i.e. 2006-03-04 17:44:40 ).&amp;nbsp; I do wonder if there is not a much simpler way of getting there.&amp;nbsp; That being said, I know I am close.&amp;nbsp; I realized after my initial post that I could simply change the expression from TO_TIME to TO_DATE to get the date and vice versa.&amp;nbsp; From there I tried to concatenate the 2, but that would seem to require string formatting (?).&amp;nbsp; I was able to reduce both to string format.&amp;nbsp; So from here it would seem a small step to STRCAT the 2.&amp;nbsp; Been at it for an hour or so and no joy.&lt;/P&gt;&lt;P&gt;Here's the date piece:&lt;/P&gt;&lt;P&gt;logparser "SELECT TO_STRING (TO_DATE( TO_LOCALTIME( TO_TIMESTAMP (REPLACE_STR(STRCAT(STRCAT(date,' '), time),' GMT',''),'yyyy-M-d h:m:s') ) ),'yyyy-MM-dd hh:mm:ss') as DateTime,&amp;nbsp; TO_Timestamp(REPLACE_STR([Origination-time], ' GMT',''),'yyyy-M-d h:m:s') as [Origination Time] from D:\MEX_LOG\TITAN.LOG\20060305.log" -i:w3c&lt;BR&gt;&lt;/P&gt;&lt;P&gt;... and the time&amp;nbsp;piece:&lt;/P&gt;&lt;P&gt;logparser "SELECT TO_STRING (TO_TIME( TO_LOCALTIME( TO_TIMESTAMP (REPLACE_STR(STRCAT(STRCAT(date,' '), time),' GMT',''),'yyyy-M-d h:m:s') ) ),'yyyy-MM-dd hh:mm:ss') as DateTime,&amp;nbsp; TO_Timestamp(REPLACE_STR([Origination-time], ' GMT',''),'yyyy-M-d h:m:s') as [Origination Time] from D:\MEX_LOG\TITAN.LOG\20060305.log" -i:w3c&lt;BR&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description></item><item><title>RE: Exchange Message Tracking to Syslog - Can it be done?</title><link>http://forums.iis.net/p/1145010/1854064.aspx#1854064</link><pubDate>Sun, 05 Mar 2006 14:27:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1854064</guid><dc:creator>LogParser User : DEinspanjer</dc:creator><cs:applicationKey>output_targets-51</cs:applicationKey><description>The TO_TIME function strips the date off of DateTime.&lt;br&gt;&lt;br&gt;Also I would think the date and time fields of W3C shouldn't require any string manipulation..&lt;br&gt;Instead of this:&lt;br&gt;TO_LOCALTIME( TO_TIMESTAMP (REPLACE_STR(STRCAT(STRCAT(date,' '), time),' GMT',''),'yyyy-M-d h:m:s') ) as DateTime&lt;br&gt;&lt;br&gt;You should be able to do just this:&lt;br&gt;TO_LOCALTIME( TO_TIMESTAMP(date,time) ) AS DateTime</description></item></channel></rss>