Questions tagged [logparser]

A log parser extracts (usually text) data from a log file into a more specific data structure, making the log information easier to process. A log parser can be implemented as a standalone application, or as a library for a specific programming language. LogParser is also the name of a free Microsoft tool which provides a SQL-like interface to log files of almost any format, from generic CSV, TSV, and XML files to more specific formats.

Many server-side applications create log files, usually in a more-or-less structured text format.

While this allows for maximum flexibility in accessing these logs with a wide variety of tools, it makes programmatic processing a bit of a pain, especially when no concise format specification is available for the logs.

This is where a log parser comes in: it is either a standalone application or a library designed for one or sometimes multiple programming languages, and converts the log file into more specific data structures, such rows in an Excel sheet or class instances.

The newly created data structures contain field names and are type-safe as much as possible, making further processing much easier.

296 questions
0
votes
1 answer

LogParser query to grab only external IP addresses from IIS logs?

I tried this question over at ServerFault and didn't have any luck, so I thought I'd try here. I'm working on a public website that is used by both external visitors and internal employees. I'm after the external visitor hits, but I can't think of…
Josh
  • 2,740
  • 3
  • 27
  • 41
0
votes
1 answer

Microsoft LogParser CSV output format - suppression of double quoting

I am having a problem with MS LogParser v2.2 and cannot seem to track down "the solution". I am importing a UTF-16 TSV file with headers and am trying to export a subset of these fields this to a CSV file, generally with no processing, but with one…
Hamish
  • 193
  • 2
  • 6
0
votes
1 answer

Log Parser c# error using STRCAT with CASE

I'm having trouble with the log parser, punctually on the use of the function STRCAT parameter with CASE, using log parser the query works perfectly and using a simple STRCAT without CASE the query works even using c#, the problem starts when i…
0
votes
2 answers

Spring XD or Integration to parse log stats in real time

I have a dashboard web application that currently starts a thread and tails a log file, even time a line is added to the file the tailer picks it up, parses it and then publishes an event around the application, which in turn does things like send…
Zac Tolley
  • 2,340
  • 4
  • 19
  • 22
0
votes
1 answer

Using LogParser to calculate method execution duration

I have log-file like this: 30.09.2013 15:28:05 Start MethodName QueryGuid ***** Some logs **** 30.09.2013 15:58:32 Stop MethodName QueryGuid I want to use LogParser to calculate method execution duration, but i have no idea how. As…
0
votes
1 answer

Is HTML output possible from Microsoft's log parser?

Is it possible to generate HTML output from the log parser? I'd like to directly parse log files which are in log4j format. It is expecting column header to pickup the contents of each line. Currently I am manually adding the few column header to…
user1614862
  • 3,701
  • 7
  • 29
  • 46
0
votes
1 answer

Output LogParser Query as GIF in ASP.net

I have the following code and I'm trying to generate a gif file to display in my ASP.NET webpage. ... LogParser = New LogQueryClass() W3Clog = New COMW3CInputContextClass() Try strSQL = "select quantize(time, 60) as TimeGenerated,…
UrsulRosu
  • 507
  • 1
  • 6
  • 16
0
votes
1 answer

Use LogParser's graphic image output in an asp.net Page

I would like to create another page with statistics about the usage of my ASP.NET project. Top page visited, etc, etc. I wonder if it is possible to use LogParser to create the graphic images of the page? The following use-case comes to my mind:…
UrsulRosu
  • 507
  • 1
  • 6
  • 16
0
votes
1 answer

What are some suggested LogParser queries to run to detect sources of high network traffic?

In looking at the network in/out metrics for our AWS/EC2 instance, I would like to find the sources of the high network traffic occurrences. I have installed up Log Parser Studio and run a few queries - primarily looking for responses that took a…
ElHaix
  • 12,846
  • 27
  • 115
  • 203
0
votes
1 answer

Running log parser in a batch file issues with -i:EVT switch

I am having unexpected errors while trying to execute a batch file using logparser. I know that colons are used as labels in a batch file and that double colons are used for commenting. But what happens when a colon : appears in a switch like…
Dre_Dre
  • 745
  • 2
  • 6
  • 15
0
votes
1 answer

python Script to parse server log between two different timestamps

I want to parse server accesslogs to find 4xx and 5xx errors count . But failed to get data between two timestamps . Somewhere getting mistakes in logic. Timestamps formate date / month /year / Hr /min /sec : 27/Aug/2013:12:45:54 if time >=…
Anil Arya
  • 3,100
  • 7
  • 43
  • 69
0
votes
1 answer

Log Parser 2.2 - Error : Syntax Error: : no SELECT keyword

Thanks for reading this post. I am getting above error when trying to execute a sql through Log parser 2.2; "Error : Syntax Error: : no SELECT keyword" when executing logparser sql file . This is what I have done: Created a SQL query which…
Lak Ranasinghe
  • 240
  • 4
  • 13
0
votes
1 answer

Using Log Parser Studio and UrlScan Logs

I'm trying to view UrlScan 3.1 Logs in Log Parser Studio 2. I have tried selecting urlscanlog as the log type but no results are returned. I can use log parser directly from the command line and parse urlscan logs without any problem. Log Parser…
Ross Buggins
  • 195
  • 1
  • 11
0
votes
1 answer

Reading IIS log file in Log parser

Just started to use LogParser. Already existing system is using log parser to read the IIS file and update the db to calculate hits, etc.. I am trying to understand the flow and need to extract two more new fields from IIS log and update the db. In…
user1905397
  • 171
  • 1
  • 3
  • 9
0
votes
3 answers

Logparser not recognizing SQL command

I'm trying to use LogParser 2.2 to try to convert a .csv into a SQL table, dynamically creating the columns after stripping out non alphanumeric characters. When I use the following line from the command prompt, I get an error: logparser…
Sean Long
  • 2,163
  • 9
  • 30
  • 49