Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Pre-requisites

rsyslog v7

add Ubuntu repository for rsyslog (precise)

edit /etc/apt/sources.d/adiscon

deb http://ubuntu.adiscon.com/v7-devel precise/
deb-src http://ubuntu.adiscon.com/v7-devel precise/

...and then... (make sure it installs v7)

apt-get install rsyslog

Building and installing sendkafka

make
mv sendkafka /usr/local/bin

Rsyslog configuration

/etc/rsyslog.conf configuration directive:

At the start:

$ModLoad omprog

In the global section:

$template JSONDefault, "{\"message\":\"%msg:::json%\",\"fromhost\":\"%HOSTNAME:::json%\",\"facility\":\"%syslogfacility-text%\",\"priority\":\"%syslogpriority-text%\",\"timereported\":\"%timereported:::date-rfc3339%\",\"timegenerated\":\"%timegenerated:::date-rfc3339%\"}\n",json

After the very last line:

$ActionOMProgBinary /usr/local/bin/sendkafka
*.* :omprog:;cee_enhanced

Check configuration

rsyslogd -f /etc/rsyslog.conf -N1

Modify AppArmor:

/etc/apparmor.d/local/usr.sbin.rsyslogd

Reload

If you're having problems, look into AppArmor or SELinux CAP.

About

Read for stdin and send to local Kafka broker

Resources

Stars

5 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages