<?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>SoftLayer Blog &#187; log files</title>
	<atom:link href="http://blog.softlayer.com/tag/log-files/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.softlayer.com</link>
	<description>A Behind the Scenes Look at the Best Hosting Provider in the World</description>
	<lastBuildDate>Wed, 15 May 2013 15:33:34 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.1</generator>
		<item>
		<title>Papertrail: Tech Partner Spotlight</title>
		<link>http://blog.softlayer.com/2011/technology-partner-spotlight-papertrail/</link>
		<comments>http://blog.softlayer.com/2011/technology-partner-spotlight-papertrail/#comments</comments>
		<pubDate>Wed, 20 Jul 2011 15:15:24 +0000</pubDate>
		<dc:creator>Guest Blog</dc:creator>
				<category><![CDATA[Partner Marketplace]]></category>
		<category><![CDATA[SoftLayer]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[email notifications]]></category>
		<category><![CDATA[log files]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[partner]]></category>
		<category><![CDATA[partner marketplace]]></category>
		<category><![CDATA[platform]]></category>
		<category><![CDATA[server alerts]]></category>
		<category><![CDATA[service]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.softlayer.com/?p=4400</guid>
		<description><![CDATA[This is a guest blog from Troy Davis of Papertrail, a SoftLayer Tech Marketplace Partner that helps customers detect, resolve and avoid infrastructure problems using log messages. Company Website: http://papertrailapp.com/Tech Partners Marketplace: http://www.softlayer.com/marketplace/papertrail Receive DB Slow Query Logs in Your Inbox Want to wake up to important database and syslog messages with your bagel and [...]]]></description>
			<content:encoded><![CDATA[<p class="attribution">This is a guest blog from Troy Davis of <a href="http://papertrailapp.com">Papertrail</a>, a SoftLayer Tech Marketplace Partner that helps customers detect, resolve and avoid infrastructure problems using log messages.</p>
<div class="yt560"><iframe width="560" height="349" src="http://www.youtube.com/embed/0r8kW_ebi5c" frameborder="0" allowfullscreen></iframe></div>
<div class="more-info"><strong>Company Website:</strong> <a href="http://papertrailapp.com/">http://papertrailapp.com/</a><br/><strong>Tech Partners Marketplace:</strong> <a href="http://www.softlayer.com/marketplace/papertrail">http://www.softlayer.com/marketplace/papertrail</a></div>
<h3>Receive DB Slow Query Logs in Your Inbox</h3>
<p>Want to wake up to important database and syslog messages with your bagel and coffee? Here&#8217;s how. It&#8217;s free and takes about 5 minutes.</p>
<p>Most of us run a database somewhere on our SoftLayer servers. Whether it&#8217;s MySQL, PostgreSQL, SQL Server, or another relational or NoSQL sibling, a responsive data store is critical to happy users. That&#8217;s why databases send slow queries to a log file. It&#8217;s much better than no logging at all, but as an engineer, I&#8217;d wanted more. I wanted to:</p>
<ul>
<li>View all my query logs in one place, without SSHing to each server for tail and grep. My workload shouldn&#8217;t scale linearly as I add systems</li>
<li>Share log visibility with employees who don&#8217;t have server access or command-line knowledge (and email links to specific log messages to my developers and DBAs)</li>
<li>Receive log messages in my inbox &ndash; or send them to my team or monitoring service &ndash; when I know they need attention</li>
<li>Examine logs for related HTTP requests, daemon output, API invocations, and other parts of our stack &mdash; I can troubleshoot faster with start-to-finish logs on a single screen.</li>
</ul>
<p>That&#8217;s where <a href="http://papertrailapp.com">Papertrail</a> was born. We built Papertrail to make log aggregation and log management effortless and usable. It&#8217;s the hosted log management service that <em>we</em> wanted as developers, systems engineers and tech entrepreneurs.</p>
<p>We know the hesitation you might have when approaching this kind of service, so our goal was to enable users to have Papertrail deliver those SQL slow query logs &ndash; or any other logs &ndash; to your inbox every morning for free:</p>
<p><span id="more-4400"></span></p>
<p><strong>1. Register a Papertrail log Repository</strong><br />
Hit <a href="https://papertrailapp.com/plans">https://papertrailapp.com/plans</a> and sign up. You&#8217;ll land on a welcome page. From there, click the &#8220;Add System&#8221; link, and on the form shown, type the IP of your DB server and its name (like &#8220;db1&#8243;).</p>
<p>Papertrail will display a remote syslog destination for your logs and easy instructions for sending app log files and syslog. The steps below are customized for MySQL&#8217;s slow query log.</p>
<p><strong>2. Send MySQL logs</strong><br />
Install a log sender. To install a tiny standalone binary that sends log file contents to Papertrail as they occur without any other system-wide configuration changes, with <a href="http://www.ruby-lang.org/en/downloads/">Ruby</a> you can run the &#8220;gem&#8221; binary: <code>sudo gem install remote_syslog</code></p>
<p>Next, locate your MySQL or other database slow query log file. Usually these are in the directory <code>/var/mysql/log/</code> or <code>/var/log/mysql/</code>, usually with a filename containing &#8220;slow&#8221;. An example slow query log path is: <code>/var/log/mysql/mysql-slow.log</code></p>
<p>If you don&#8217;t see one, try running &#8220;<code>locate mysql | grep slow.log</code>&#8221; (or to configure a slow query log, head <a href="http://dev.mysql.com/doc/refman/5.1/en/slow-query-log.html">here</a>).</p>
<p>Next, tell remote_syslog the path to that file. Edit <code>/etc/log_files.yml</code> and add a single line:<br />
<code>files: [/var/log/mysql/mysql-slow.log]</code></p>
<p>Use the path to your slow query log (<a href="https://github.com/papertrail/remote_syslog/blob/master/examples/log_files.yml.example">Example</a>). Finally, run remote_syslog:<br />
<code>sudo remote_syslog</code></p>
<p><strong>3. Set up Nightly Email</strong><br />
Now that you&#8217;ve completed those first two steps, you&#8217;re configured to send those slow query logs to Papertrail as soon as they happen. Hit Papertrail&#8217;s <a href="https://papertrailapp.com/events">events viewer</a> to watch them roll in. Because only slow queries are being logged, you may not see any events immediately. </p>
<p>To receive these messages in email, search Papertrail&#8217;s events viewer for &#8216;mysql&#8217;. Then click &#8220;Save Search&#8221; and give this search a name (like &#8220;MySQL slow queries&#8221;). Click the Dashboard link and you&#8217;ll see that search as a new choice. Click the Edit link next to it, and you&#8217;ll be prompted for the email address(es) which should receive these in email every night.</p>
<p>That&#8217;s it. Congrats! If you were hoping for more steps, I&#8217;d recommend that you get yourself a <a href="http://en.wikipedia.org/wiki/Bock#Doppelbock">Doppelbock</a> or porter as Step 4.</p>
<p>You have the ability to give co-workers access to these logs in Papertrail, and because Papertrail doesn&#8217;t charge a per-system fee, you can add other systems at will. With your SQL logs done, it only takes a few more minutes to aggregate Web server request logs and OS syslog results from your dedicated and CloudLayer systems (try &#8220;Add System&#8221; or &#8220;Quick Start&#8221;). </p>
<p>Enjoy!</p>
<p>- Troy Davis, <a href="http://papertrailapp.com">Papertrail</a></p>
<div class="tpm-note">This guest blog series highlights companies in SoftLayer&#8217;s <a href="http://www.softlayer.com/marketplace">Technology Partners Marketplace</a>. <br/>These <a href="http://blog.softlayer.com/partner-marketplace/">Partners</a> have built their businesses on the SoftLayer Platform, and we&#8217;re excited for them to tell their stories. New Partners will be added to the Marketplace each month, so stay tuned for many more come.</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.softlayer.com/2011/technology-partner-spotlight-papertrail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
