<?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>iWebDev&#039;s blog &#187; event log</title>
	<atom:link href="http://www.iwebdev.it/blog/?feed=rss2&#038;tag=event-log" rel="self" type="application/rss+xml" />
	<link>http://www.iwebdev.it/blog</link>
	<description>and everything goes around</description>
	<lastBuildDate>Sat, 06 Aug 2011 23:08:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Collect syslog events to database (first part)</title>
		<link>http://www.iwebdev.it/blog/?p=148</link>
		<comments>http://www.iwebdev.it/blog/?p=148#comments</comments>
		<pubDate>Wed, 09 Mar 2011 22:05:32 +0000</pubDate>
		<dc:creator>to</dc:creator>
				<category><![CDATA[Log event]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[CEF syntax]]></category>
		<category><![CDATA[Common Event Format]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[event log]]></category>
		<category><![CDATA[syslog-ng]]></category>

		<guid isPermaLink="false">http://www.iwebdev.it/blog/?p=148</guid>
		<description><![CDATA[Syslog-ng is an open source implementation of the Syslog protocol for Unix and Unix-like systems. It extends the original syslogd model with content-based filtering, rich filtering capabilities, flexible configuration options and adds important features to syslog, like using TCP for transport. In syslog-ng starting from version 3.0 there is a great option of forward logs directly to database (Postgres, or for [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Syslog-ng</strong> is an open source implementation of the Syslog protocol for Unix and Unix-like systems. It extends the original syslogd model with content-based filtering, rich filtering capabilities, flexible configuration options and adds important features to syslog, like using TCP for transport. In syslog-ng starting from version 3.0 there is a great option of <strong>forward logs directly to database</strong> (Postgres, or for that matter to MySQL, Firebird or sqlite database). In comparison with the old way of doing that, namely using a pipe and executing either a wrapper script or mysql client directly, the new way saves a great deal of resources as syslog-ng does not need to start a process every time there is a log message to log. So if you want this features you have to install syslog-ng of version 3.0 or greater with <strong>use flag sql enabled</strong>. In order to install syslog-ng you have to download the right version from the <a title="BalaBit IT Security Syslog-ng" href="http://www.balabit.com/downloads/files/syslog-ng/sources" target="_blank">official site</a>. For our purpose we download the syslog-ng 3.2.2 version (3.2.2/setups/linux-glibc2.3.6-i386).</p>
<blockquote><p>wget http://www.balabit.com/downloads/files?path=/syslog-ng/sources/3.2.2/setups/linux-glibc2.3.6-i386/syslog-ng-3.2.2-linux-glibc2.3.6-i386.run</p></blockquote>
<p>Once you downloaded the file you have to grant execute permission to syslog-ng-3.2.2-linux-glibc2.3.6-i386.run.</p>
<blockquote><p>chmod +x syslog-ng-3.2.2-linux-glibc2.3.6-i386.run</p></blockquote>
<p>Now you are ready to install the syslog-ng.</p>
<blockquote><p>./syslog-ng-3.2.2-linux-glibc2.3.6-i386.run</p></blockquote>
<p>The first screen shows the path where the syslog-ng will be installed; you have to presso &#8220;continue&#8221;.</p>
<p><a href="http://www.iwebdev.it/blog/wp-content/uploads/2011/03/screen-capture-2.png"><img class="aligncenter size-medium wp-image-151" title="Syslog-ng installation step 1" src="http://www.iwebdev.it/blog/wp-content/uploads/2011/03/screen-capture-2-300x180.png" alt="" width="300" height="180" /></a>The second screen resumes the parameters about your system; press &#8220;yes&#8221; if the information are corrects.</p>
<p><a href="http://www.iwebdev.it/blog/wp-content/uploads/2011/03/screen-capture-3.png"><img class="aligncenter size-medium wp-image-152" title="Syslog-ng installation step 2" src="http://www.iwebdev.it/blog/wp-content/uploads/2011/03/screen-capture-3-300x180.png" alt="" width="300" height="180" /></a>The third screen suggest user to check if the &#8220;/opt/syslog-ng/bin&#8221; and &#8220;/opt/syslog-ng/sbin&#8221; directory are in the <strong>search PATH</strong>. In order to do so, please add the following line into the shell profile:</p>
<blockquote><p>PATH=/opt/syslog-ng/bin:$PATH</p></blockquote>
<p><a href="http://www.iwebdev.it/blog/wp-content/uploads/2011/03/screen-capture-4.png"><img class="aligncenter size-medium wp-image-153" title="Syslog-ng installation step 3" src="http://www.iwebdev.it/blog/wp-content/uploads/2011/03/screen-capture-4-300x180.png" alt="" width="300" height="180" /></a>The fourth step checks if there is old version of syslog-ng installed. If the installer has detected a configuration file from a previous syslog-ng installation, the user can use this old configuration file. We choose &#8220;no&#8221;.</p>
<p><a href="http://www.iwebdev.it/blog/wp-content/uploads/2011/03/screen-capture-5.png"><img class="aligncenter size-medium wp-image-154" title="Syslog-ng installation step 4" src="http://www.iwebdev.it/blog/wp-content/uploads/2011/03/screen-capture-5-300x180.png" alt="" width="300" height="180" /></a>The installer generates a simple configuration file and asks if user wants to receive log messages from the network. We choose &#8220;yes&#8221;.</p>
<p><img class="aligncenter size-medium wp-image-155" title="Syslog-ng installation step 5" src="http://www.iwebdev.it/blog/wp-content/uploads/2011/03/screen-capture-6-300x180.png" alt="" width="300" height="180" />The last step asks user if he wants forward the log messages to a remote server; we choose &#8220;skip&#8221;.</p>
<p><a href="http://www.iwebdev.it/blog/wp-content/uploads/2011/03/screen-capture-7.png"><img class="aligncenter size-medium wp-image-156" title="Syslog-ng installation step 6" src="http://www.iwebdev.it/blog/wp-content/uploads/2011/03/screen-capture-7-300x180.png" alt="" width="300" height="180" /></a></p>
<p>Congratulation, we installed syslog-ng 3.2.2.</p>
<p><a href="http://www.iwebdev.it/blog/wp-content/uploads/2011/03/screen-capture-8.png"><img class="aligncenter size-medium wp-image-157" title="Syslog-ng installation final step" src="http://www.iwebdev.it/blog/wp-content/uploads/2011/03/screen-capture-8-300x180.png" alt="" width="300" height="180" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.iwebdev.it/blog/?feed=rss2&#038;p=148</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
