<?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>ryoku.org &#187; syslog</title>
	<atom:link href="http://www.ryoku.org/tag/syslog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ryoku.org</link>
	<description>Nerd stuff</description>
	<lastBuildDate>Sat, 04 Sep 2010 21:55:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>A central loghost</title>
		<link>http://www.ryoku.org/2009/12/a-central-loghost/</link>
		<comments>http://www.ryoku.org/2009/12/a-central-loghost/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 01:39:34 +0000</pubDate>
		<dc:creator>Arijan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[syslog]]></category>

		<guid isPermaLink="false">http://www.ryoku.org/?p=181</guid>
		<description><![CDATA[As promised in my previous post, my configuration for a central loghost using rsyslog. Most of my clients connect using tls, however some devices do not support this (dd-wrt for example), so I also open an udp socket for use on the lan only. I use splunk to mine my logs. $ModLoad imuxsock # provides [...]]]></description>
			<content:encoded><![CDATA[<p>As promised in my previous post, my configuration for a central loghost using rsyslog.</p>
<p>Most of my clients connect using tls, however some devices do not support this (dd-wrt for example), so I also open an udp socket for use on the lan only.</p>
<p>I use <a href='http://www.splunk.com'>splunk</a> to mine my logs.</p>
<pre class="brush: plain;">
$ModLoad imuxsock # provides support for local system logging
$ModLoad imklog   # provides kernel logging support (previously done by rklogd)

# UDP socket for lan (dd-wrt etc)
$ModLoad imudp
$UDPServerRun 514

# TCP socket for tls clients
$ModLoad imtcp

$DefaultNetstreamDriver gtls
$DefaultNetstreamDriverCAFile /etc/rsyslog/ca.pem
$DefaultNetstreamDriverCertFile /etc/rsyslog/loghost.pem
$DefaultNetstreamDriverKeyFile /etc/rsyslog/loghost.key.pem

$InputTCPServerStreamDriverAuthMode x509/name
$InputTCPServerStreamDriverPermittedPeer *.ryoku.org
$InputTCPServerStreamDriverPermittedPeer *.home
$InputTCPServerStreamDriverMode 1
$InputTCPServerRun 514

$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat

$FileOwner root
$FileGroup adm
$FileCreateMode 0640
$DirCreateMode 0755
$Umask 0022

$IncludeConfig /etc/rsyslog.d/*.conf

# Templates for central loghost
$template t-messages,&quot;/var/log/hosts/%HOSTNAME%/%$YEAR%%$MONTH%/messages&quot;
$template t-debug,&quot;/var/log/hosts/%HOSTNAME%/%$YEAR%%$MONTH%/debug&quot;

$template t-auth,&quot;/var/log/hosts/%HOSTNAME%/%$YEAR%%$MONTH%/auth.log&quot;
$template t-syslog,&quot;/var/log/hosts/%HOSTNAME%/%$YEAR%%$MONTH%/syslog&quot;
$template t-cron,&quot;/var/log/hosts/%HOSTNAME%/%$YEAR%%$MONTH%/cron.log&quot;
$template t-daemon,&quot;/var/log/hosts/%HOSTNAME%/%$YEAR%%$MONTH%/daemon.log&quot;
$template t-kern,&quot;/var/log/hosts/%HOSTNAME%/%$YEAR%%$MONTH%/kern.log&quot;
$template t-lpr,&quot;/var/log/hosts/%HOSTNAME%/%$YEAR%%$MONTH%/lpr.log&quot;
$template t-mail,&quot;/var/log/hosts/%HOSTNAME%/%$YEAR%%$MONTH%/mail.log&quot;
$template t-user,&quot;/var/log/hosts/%HOSTNAME%/%$YEAR%%$MONTH%/user.log&quot;

$template t-mail-info,&quot;/var/log/hosts/%HOSTNAME%/%$YEAR%%$MONTH%/mail.info&quot;
$template t-mail-warn,&quot;/var/log/hosts/%HOSTNAME%/%$YEAR%%$MONTH%/mail.warn&quot;
$template t-mail-err,&quot;/var/log/hosts/%HOSTNAME%/%$YEAR%%$MONTH%/mail.err&quot;

# Standard logfiles
auth,authpriv.*			?t-auth
*.*;auth,authpriv.none		-?t-syslog
#cron.*				?t-cron
daemon.*			-?t-daemon
kern.*				-?t-kern
lpr.*				-?t-lpr
mail.*				-?t-mail
user.*				-?t-user

# Mail logging
mail.info			-?t-mail-info
mail.warn			-?t-mail-warn
mail.err			?t-mail-err

# Catchall
*.=debug;\
	auth,authpriv.none;\
	news.none;mail.none	-?t-debug
*.=info;*.=notice;*.=warn;\
	auth,authpriv.none;\
	cron,daemon.none;\
	mail,news.none		-?t-messages

# Emerg goes to all who are logged in
*.emerg				*
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ryoku.org/2009/12/a-central-loghost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fun with puppet and rsyslog</title>
		<link>http://www.ryoku.org/2009/12/fun-with-puppet-and-rsyslog/</link>
		<comments>http://www.ryoku.org/2009/12/fun-with-puppet-and-rsyslog/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 00:48:11 +0000</pubDate>
		<dc:creator>Arijan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[puppet]]></category>
		<category><![CDATA[syslog]]></category>

		<guid isPermaLink="false">http://www.ryoku.org/?p=179</guid>
		<description><![CDATA[Today I switched from syslog-ng to rsyslog, I am also working with puppet nowadays, I wrote a module for puppet that provides my syslog clients with their certificates (I use TLS to secure the transport) Below is the module I wrote for puppet, the script I wrote to generate certificates for the client machine store [...]]]></description>
			<content:encoded><![CDATA[<p>Today I switched from syslog-ng to rsyslog, I am also working with puppet nowadays, I wrote a module for puppet that provides my syslog clients with their certificates (I use TLS to secure the transport)</p>
<p>Below is the module I wrote for puppet, the script I wrote to generate certificates for the client machine store the certificates into the files area of the module.</p>
<pre class="brush: plain;">
class rsyslog-client {

	package { &quot;rsyslog&quot;:
		ensure =&gt; present,
	}

	package { &quot;rsyslog-gnutls&quot;:
		ensure =&gt; present,
	}

	service { &quot;rsyslog&quot;:
		ensure =&gt; running,
	}

	host { &quot;loghost&quot;:
		ensure =&gt; present,
		name =&gt; &quot;loghost&quot;,
		ip =&gt; &quot;$loghost&quot;,
	}

	file { &quot;/etc/rsyslog&quot;:
		ensure =&gt; directory,
	}	

	file { &quot;/etc/rsyslog/$fqdn.key.pem&quot;:
		owner =&gt; root,
		group =&gt; root,
		source =&gt; &quot;puppet:///rsyslog-client/$fqdn.key.pem&quot;,
		ensure =&gt; file,
		notify =&gt; service[&quot;rsyslog&quot;],
	}

	file { &quot;/etc/rsyslog/$fqdn.pem&quot;:
		owner =&gt; root,
		group =&gt; root,
		source =&gt; &quot;puppet:///rsyslog-client/$fqdn.pem&quot;,
		ensure =&gt; file,
		notify =&gt; service[&quot;rsyslog&quot;],
	}

	file { &quot;/etc/rsyslog/ca.pem&quot;:
		owner =&gt; root,
		group =&gt; root,
		source =&gt; &quot;puppet:///rsyslog-client/ca.pem&quot;,
		ensure =&gt; file,
		notify =&gt; service[&quot;rsyslog&quot;],
	}

	file { &quot;/etc/rsyslog.conf&quot;:
		owner 	=&gt; root,
		group	=&gt; root,
		content =&gt; template(&quot;rsyslog-client/rsyslog.conf.erb&quot;),
		ensure  =&gt; file,
		require =&gt; package[&quot;rsyslog&quot;],
		notify  =&gt; service[&quot;rsyslog&quot;]
	}

}
</pre>
<p>I&#8217;ll post my rsyslog.conf of the central loghost when I have written a decent one.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ryoku.org/2009/12/fun-with-puppet-and-rsyslog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
