<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Search Nuggets &#187; log analysis</title>
	<atom:link href="http://blog.comperiosearch.com/blog/tag/log-analysis/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.comperiosearch.com</link>
	<description>A blog about Search as THE solution</description>
	<lastBuildDate>Mon, 13 Jun 2016 08:59:45 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=3.9.40</generator>
	<item>
		<title>SharePoint ULS log analysis using ELK</title>
		<link>http://blog.comperiosearch.com/blog/2014/08/01/sharepoint-log-analysis-using-elk/</link>
		<comments>http://blog.comperiosearch.com/blog/2014/08/01/sharepoint-log-analysis-using-elk/#comments</comments>
		<pubDate>Fri, 01 Aug 2014 11:31:06 +0000</pubDate>
		<dc:creator><![CDATA[Madalina Rogoz]]></dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Elasticsearch]]></category>
		<category><![CDATA[Kibana]]></category>
		<category><![CDATA[log analysis]]></category>
		<category><![CDATA[logstash]]></category>
		<category><![CDATA[sharepoint]]></category>

		<guid isPermaLink="false">http://blog.comperiosearch.com/?p=2775</guid>
		<description><![CDATA[E is for Elasticsearch Elasticsearch is an open source search and analytics engine that extends the limits of full-text search through a robust set of APIs and DSLs, to deliver a flexible and almost limitless search experience. L is for Logstash One of the most popular open source log parser solutions on the market, Logstash has the possibility of reading any data source [...]]]></description>
				<content:encoded><![CDATA[<h3>E is for Elasticsearch</h3>
<p><a href="http://www.elasticsearch.org/">Elasticsearch</a> is an open source search and analytics engine that extends the limits of full-text search through a robust set of APIs and DSLs, to deliver a flexible and almost limitless search experience.</p>
<h3>L is for Logstash</h3>
<p>One of the most popular open source log parser solutions on the market, <a href="http://logstash.net/">Logstash</a> has the possibility of reading any data source and extracting the data in JSON format, easy to use and running in minutes.</p>
<h3>K is for Kibana</h3>
<p>A data visualization engine, <a href="http://www.elasticsearch.org/overview/kibana/">Kibana</a> allows the user to create custom dashboards and to analyze Elasticsearch data on-the-fly and in real-time.</p>
<h3>Getting set up</h3>
<p>To start using this technology, you just need to <a href="http://www.elasticsearch.org/overview/elkdownloads/">install</a> the three above mentioned components, which actually means downloading and unzipping three archive files.</p>
<p>The data flow is this: the log files are text files residing in a folder. Logstash will use a configuration file to read from the logs and parse all the entries. The parsed data will be sent to Elasticsearch for storing. Once here, it can be easily read and displayed by Kibana.</p>
<p><img class="alignnone size-full wp-image-2779" src="http://blog.comperiosearch.com/wp-content/uploads/2014/08/elk004.jpg" alt="elk004" width="608" height="107" /></p>
<h3>Parsing SharePoint ULS log files with Logstash</h3>
<p>We will now focus on the most simple and straightforward way of getting this to work, without any additional configuration or settings. Our goal is to open Kibana and be able to configure some charts that will help us visualize and explore what type of entries we have in the SharePoint ULS logs, and to be able to search the logs for interesting entries.</p>
<p>To begin, we need some ULS log files from SharePoint that will be placed in a folder on the server (I am working on a Windows Server virtual environment) where we are testing the ELK stack. My ULS logs are located here: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS</p>
<p>As an example, the first line in one of my log files looks like this:</p><pre class="crayon-plain-tag">05/06/2014 10:20:20.85 wsstracing.exe (0x0900)                 0x0928SharePoint Foundation         Tracing Controller Service    5152InformationTracing Service started.</pre><p><span class="TextRun SCX192432813" style="color: #000000" xml:lang="EN-US"><span class="NormalTextRun SCX192432813">The next step is to build the configuration file. This is a text file with a .</span><span class="SpellingError SCX192432813">config</span><span class="NormalTextRun SCX192432813"> extension, located by defau</span></span><span class="TextRun SCX192432813" style="color: #000000" xml:lang="EN-US"><span class="NormalTextRun SCX192432813">l</span></span><span class="TextRun SCX192432813" style="color: #000000" xml:lang="EN-US"><span class="NormalTextRun SCX192432813">t in the </span><span class="SpellingError SCX192432813">Logstash</span><span class="NormalTextRun SCX192432813"> folder. The starting point for the content of this file </span></span><span class="TextRun SCX192432813" style="color: #000000" xml:lang="EN-US"><span class="NormalTextRun SCX192432813">would be</span></span><span class="TextRun SCX192432813" style="color: #000000" xml:lang="EN-US"><span class="NormalTextRun SCX192432813">:</span></span><span class="EOP SCX192432813" style="color: #000000"> </span></p><pre class="crayon-plain-tag">input {  
 file {  
  type =&gt; "sharepointlog" 
    path =&gt; ["[folder where the logs reside]/*.log"] 
   start_position =&gt; "beginning" 
   codec =&gt; "plain" 
} 
} 
filter  
{ 
 } 
output  
{    
 elasticsearch {  
embedded =&gt; true 
 } 
}</pre><p>The Input defines the location of the logs and some reading parameters, like the starting position where Logstash will begin parsing the files. The Output section defines the location of the parsed data, in our case the Elasticsearch instance installed on the same server.</p>
<p>Now for the important part, the Filter section. The Filter section contains one or more GROK patterns that are used by Logstash for identifying the format of the log entries. There are many types of entries, but we are focusing on the event type and message, so we have to parse all the parameters up to the message part in order to get what we need.</p>
<p>The documentation is pretty detailed when it comes to GROK and a <a href="http://grokdebug.herokuapp.com/">pattern debugger website</a> with a GROK testing engine is available online, so you can develop and test your patterns before actually running them in Logstash.</p>
<p>So this is what I came up with for the SharePoint ULS logs:</p><pre class="crayon-plain-tag">filter { 
   if [type] == "sharepointlog" { 
grok { 
match =&gt; [ "message",  
"(?&lt;parsedtime&gt;%{MONTHNUM}/%{MONTHDAY}/%{YEAR} %{HOUR}:%{MINUTE}:%{SECOND}) \t%{DATA:process} \(%{DATA:processcode}\)(\s*)\t%{DATA:tid}(\s*)\t(?&lt;area&gt;.*)(\s*)\t(?&lt;category&gt;.*)(\s*)\t%{WORD:eventID}(\s*)\t%{WORD:level}(\s*)\t%{DATA:eventmessage}\t%{UUID:CorrelationID}"] 
match =&gt; [ "message",  
"(?&lt;parsedtime&gt;%{MONTHNUM}/%{MONTHDAY}/%{YEAR} %{HOUR}:%{MINUTE}:%{SECOND}) \t%{DATA:process} \(%{DATA:processcode}\)(\s*)\t%{DATA:tid}(\s*)\t(?&lt;area&gt;.*)(\s*)\t(?&lt;category&gt;.*)(\s*)\t%{WORD:eventID}(\s*)\t%{WORD:level}(\s*)\t%{DATA:eventmessage}"] 
match =&gt; [ "message",  
“(?&lt;parsedtime&gt;%{MONTHNUM}/%{MONTHDAY}/%{YEAR} %{HOUR}:%{MINUTE}:%{SECOND})%{GREEDYDATA}\t%{DATA:process} \(%{DATA:processcode}\)(\s*)\t%{DATA:tid}(\s*)\t(?&lt;area&gt;.*)(\s*)\t(?&lt;category&gt;.*)(\s*)\t%{WORD:eventID}(\s*)\t%{WORD:level}(\s*)\t%{DATA:eventmessage}"] 
} 
date { 
match =&gt; ["parsedtime","MM/dd/YYYY HH:mm:ss.SSS"] 
} 
   } 
}</pre><p></p>
<h3>Logstash in action</h3>
<p>All that&#8217;s left to do is to get Logstash going and see what comes out. Run the following on the command line:</p><pre class="crayon-plain-tag">logstash.bat agent -f "sharepoint.conf"</pre><p>This runs logstash as an agent, so it will monitor the file or the folder you specify in the input section of the config for changes. If you are indexing a folder where files appear periodically, you don&#8217;t need to worry about restarting the process, it will continue on its own.</p>
<h3>Kibana time</h3>
<p>Now let&#8217;s create a new dashboard in Kibana and see what was indexed. The most straight-forward panel type is Histogram. Make no changes to the default settings of this panel (Chart value = count, Time field = @timestamp) and you should see something similar to this:</p>
<p><a href="http://blog.comperiosearch.com/wp-content/uploads/2014/08/elk005.jpg"><img class="alignnone wp-image-2780 size-medium" src="http://blog.comperiosearch.com/wp-content/uploads/2014/08/elk005-300x125.jpg" alt="elk005" width="300" height="125" /></a></p>
<p><span class="TextRun SCX61371348" style="color: #000000" xml:lang="EN-US"><span class="NormalTextRun SCX61371348">To get some more relevant information, we can add some pie charts and let them display other properties that we have mapped, for example ‘process’ or ‘</span></span><span class="TextRun SCX61371348" style="color: #000000" xml:lang="EN-US"><span class="NormalTextRun SCX61371348">area</span></span><span class="TextRun SCX61371348" style="color: #000000" xml:lang="EN-US"><span class="NormalTextRun SCX61371348">’. </span></span><span class="LineBreakBlob BlobObject SCX61371348" style="color: #000000"><span class="SCX61371348"> </span><br class="SCX61371348" /></span></p>
<p><a href="http://blog.comperiosearch.com/wp-content/uploads/2014/08/elk001.jpg"><img class="alignnone size-medium wp-image-2776" src="http://blog.comperiosearch.com/wp-content/uploads/2014/08/elk001-300x68.jpg" alt="elk001" width="300" height="68" /></a></p>
<p><span class="TextRun SCX4542470" style="color: #000000" xml:lang="SV-SE"><span class="SpellingError SCX4542470">Now</span><span class="NormalTextRun SCX4542470"> </span><span class="SpellingError SCX4542470">let&#8217;s</span><span class="NormalTextRun SCX4542470"> </span><span class="SpellingError SCX4542470">turn</span><span class="NormalTextRun SCX4542470"> </span><span class="SpellingError SCX4542470">this</span><span class="NormalTextRun SCX4542470"> </span><span class="SpellingError SCX4542470">up</span><span class="NormalTextRun SCX4542470"> a </span><span class="SpellingError SCX4542470">notch</span><span class="NormalTextRun SCX4542470">:</span></span><span class="TextRun SCX4542470" style="color: #000000" xml:lang="SV-SE"><span class="NormalTextRun SCX4542470"> </span><span class="SpellingError SCX4542470">t</span></span><span class="TextRun SCX4542470" style="color: #000000" xml:lang="SV-SE"><span class="SpellingError SCX4542470">hrough</span><span class="NormalTextRun SCX4542470"> </span><span class="SpellingError SCX4542470">Kibana</span><span class="NormalTextRun SCX4542470"> </span><span class="SpellingError SCX4542470">we</span><span class="NormalTextRun SCX4542470"> </span><span class="SpellingError SCX4542470">can</span><span class="NormalTextRun SCX4542470"> </span><span class="SpellingError SCX4542470">take</span><span class="NormalTextRun SCX4542470"> a look at the </span><span class="SpellingError SCX4542470">err</span></span><span class="TextRun SCX4542470" style="color: #000000" xml:lang="SV-SE"><span class="SpellingError SCX4542470">ors</span></span><span class="TextRun SCX4542470" style="color: #000000" xml:lang="SV-SE"><span class="NormalTextRun SCX4542470"> in the SharePoint logs. </span></span><span class="TextRun SCX4542470" style="color: #000000" xml:lang="SV-SE"><span class="SpellingError SCX4542470">Create</span></span><span class="TextRun SCX4542470" style="color: #000000" xml:lang="SV-SE"><span class="NormalTextRun SCX4542470"> a </span><span class="SpellingError SCX4542470">pie</span><span class="NormalTextRun SCX4542470"> </span><span class="SpellingError SCX4542470">chart</span><span class="NormalTextRun SCX4542470"> </span><span class="SpellingError SCX4542470">that</span><span class="NormalTextRun SCX4542470"> displays the &#8220;</span><span class="SpellingError SCX4542470">level</span></span><span class="TextRun SCX4542470" style="color: #000000" xml:lang="SV-SE"><span class="NormalTextRun SCX4542470">&#8221; </span><span class="SpellingError SCX4542470">field</span></span><span class="TextRun SCX4542470" style="color: #000000" xml:lang="SV-SE"><span class="NormalTextRun SCX4542470">. By</span></span><span class="TextRun SCX4542470" style="color: #000000" xml:lang="SV-SE"><span class="NormalTextRun SCX4542470"> </span><span class="SpellingError SCX4542470">clicking</span><span class="NormalTextRun SCX4542470"> on the &#8220;</span><span class="SpellingError SCX4542470">Unexpected</span><span class="NormalTextRun SCX4542470">&#8221; slice in </span><span class="SpellingError SCX4542470">this</span><span class="NormalTextRun SCX4542470"> </span><span class="SpellingError SCX4542470">chart</span><span class="NormalTextRun SCX4542470"> </span><span class="SpellingError SCX4542470">you</span><span class="NormalTextRun SCX4542470"> </span><span class="SpellingError SCX4542470">will</span><span class="NormalTextRun SCX4542470"> filter all the </span><span class="SpellingError SCX4542470">dashboard</span><span class="NormalTextRun SCX4542470"> on </span><span class="SpellingError SCX4542470">this</span></span><span class="TextRun SCX4542470" style="color: #000000" xml:lang="SV-SE"><span class="NormalTextRun SCX4542470"> </span><span class="SpellingError SCX4542470">value</span></span><span class="TextRun SCX4542470" style="color: #000000" xml:lang="SV-SE"><span class="NormalTextRun SCX4542470">. </span></span><span class="EOP SCX4542470" style="color: #000000"> </span></p>
<p><a href="http://blog.comperiosearch.com/wp-content/uploads/2014/08/elk002.jpg"><img class="alignnone size-medium wp-image-2777" src="http://blog.comperiosearch.com/wp-content/uploads/2014/08/elk002-300x151.jpg" alt="elk002" width="300" height="151" /></a></p>
<p>Kibana will automatically refresh the page, the filter itself will be displayed in the &#8220;Filter&#8221; row and all you will see are the &#8220;Unexpected&#8221; events.  Time to turn to the help of a Table chart: by displaying the columns you select on the Fields section of this chart, you can view and sort the log entries for a more detailed analysis of the unexpected events.</p>
<p><a href="http://blog.comperiosearch.com/wp-content/uploads/2014/08/elk003.jpg"><img class="alignnone size-medium wp-image-2778" src="http://blog.comperiosearch.com/wp-content/uploads/2014/08/elk003-300x74.jpg" alt="elk003" width="300" height="74" /></a></p>
<p><span class="TextRun SCX126625747" style="color: #000000" xml:lang="SV-SE"><span class="NormalTextRun SCX126625747">As the </span></span><span class="TextRun SCX126625747" style="color: #000000" xml:lang="SV-SE"><span class="SpellingError SCX126625747">Logstash</span><span class="NormalTextRun SCX126625747"> process </span><span class="SpellingError SCX126625747">runs</span><span class="NormalTextRun SCX126625747"> as an agent, </span><span class="SpellingError SCX126625747">you</span><span class="NormalTextRun SCX126625747"> </span><span class="SpellingError SCX126625747">can</span><span class="NormalTextRun SCX126625747"> monitor the SharePoint events in </span><span class="SpellingError SCX126625747">real-</span></span><span class="TextRun SCX126625747" style="color: #000000" xml:lang="SV-SE"><span class="SpellingError SCX126625747">time</span><span class="NormalTextRun SCX126625747">!</span></span><span class="EOP SCX126625747" style="color: #000000"> So there you have it, SharePoint log analysis using ELK.</span></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.comperiosearch.com/blog/2014/08/01/sharepoint-log-analysis-using-elk/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to monetize with a zero result strategy!</title>
		<link>http://blog.comperiosearch.com/blog/2014/01/08/how-to-monetize-with-a-zero-result-strategy/</link>
		<comments>http://blog.comperiosearch.com/blog/2014/01/08/how-to-monetize-with-a-zero-result-strategy/#comments</comments>
		<pubDate>Wed, 08 Jan 2014 21:25:37 +0000</pubDate>
		<dc:creator><![CDATA[Espen Klem]]></dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[User Experience]]></category>
		<category><![CDATA[customer service]]></category>
		<category><![CDATA[design patterns]]></category>
		<category><![CDATA[log analysis]]></category>
		<category><![CDATA[logs]]></category>
		<category><![CDATA[roi]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[strategy]]></category>
		<category><![CDATA[user experience]]></category>
		<category><![CDATA[ux]]></category>
		<category><![CDATA[zero result]]></category>
		<category><![CDATA[zero results]]></category>

		<guid isPermaLink="false">http://blog.comperiosearch.com/?p=1878</guid>
		<description><![CDATA[In Comperio, we create and develop a lot of interesting search solutions for our customers. The UX designers do user interviews, create personas, user stories, concepts analysis and interaction design. The developers follow up with content analysis, installation of software, configuration, development, and a lot of relevancy tuning: &#8220;How can we ensure that the right [...]]]></description>
				<content:encoded><![CDATA[<p>In Comperio, we create and develop a lot of interesting search solutions for our customers. The UX designers do user interviews, create personas, user stories, concepts analysis and interaction design. The developers follow up with content analysis, installation of software, configuration, development, and a lot of relevancy tuning: &#8220;How can we ensure that the right results end up at the top of our result page&#8221; is always one of the big questions.</p>
<p><a href="http://blog.comperiosearch.com/wp-content/uploads/2014/01/ebok-no-zero-results.png"><img class="alignnone wp-image-1879 size-full" style="border: 1px solid black" src="http://blog.comperiosearch.com/wp-content/uploads/2014/01/ebok-no-zero-results.png" alt="How to monetize search, here exemplified by Ebok.no zero result page" width="958" height="787" /></a></p>
<p>But very often a small aspect of search is neglected: The zero result page, or the zero results strategy (There are many reasons for this, I&#8217;ll explain one later*). Yesterday I came across a search that I think could benefit greatly from zero result strategy. I was reading an article about some really good Norwegian authors, and decided to buy some of the books at a Norwegian E-book store called <a href="https://ebok.no/">ebok.no</a>.  The E-book market in Norway is not very big, even if the general book market is. Few books are published as E-books and you often have to wait a while before a book is available as an E-book. I was lucky and found two out of the three books I wanted. The last one: &#8220;Bergeners&#8221; by Tomas Espedal I misspelled a couple of times <a href="https://ebok.no/search/Bergeners/default">before I got it right</a>. Even then I had to check a regular bookstore to see if it was actually correctly spelled.</p>
<h2>Solution: Monetize search</h2>
<p>What if ebok.no, every time a user got a zero result, did a lookup in a database to check if the search query matched an actual book. If yes, say the following:</p>
<blockquote><p>Sorry, we don&#8217;t have the book &#8220;[title]&#8221; by [author] available as an E-book.</p>
<p>Would you like us to send an email when/if it is available as an E-book at ebok.no?</p></blockquote>
<p>It the user agrees, you have achieved one and maybe two things. Firstly, you&#8217;ve made your users do a one time subscription to pay you money even if you slapped them with a zero result. Secondly, if the user wasn&#8217;t a registered user already, you may have convinced him or her to become a registered user later on because of good customer service.</p>
<p>*One reason a zero result strategy often is neglected is that you need the search to be in production for a while before you have enough data to analyse your zero results. In most cases, by that time, the project has ended.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.comperiosearch.com/blog/2014/01/08/how-to-monetize-with-a-zero-result-strategy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
