[rsyslog-notify] Forum Thread: omkafka only wants to publish to localhost:9092 - (Mode 'post')

noreply at adiscon.com noreply at adiscon.com
Mon Jun 13 08:58:35 CEST 2016


User: sfcloudman 
Forumlink: http://kb.monitorware.com/viewtopic.php?p=26576#p26576

Message: 
----------
Im trying to run some tests using rsyslog publishing to a kafka cluster
using a very simple config.

I have a kafka cluster and a separate rsyslog server.

This is my rsyslog conf file for omkafka:
module(load="omkafka")
template(name="kafka" type="string" string="%msg%")


action(
        broker="kafka1"
        type="omkafka"
        topic="syslog"
        errorfile="/var/log/omkafka/error.log"
        template="kafka"
)

No matter what I put in to brokers, this is the error message rsyslog
throws:
rsyslogd: omkafka: kafka message localhost:9092/0: Failed to connect to
broker at localhost:9092: Connection refused [v8.19.0 try <!-- m --><a
class="postlink"
href="http://www.rsyslog.com/e/2422">http://www.rsyslog.com/e/2422</a><!--
m --> ]

I have tried:
broker=['kafka1:9092"]
broker='kafka1:9092"
broker="kafka1"
broker=["kafka1"]

kafka1 is defined in /etc/hosts as 192.168.0.6	kafka1

If remove the entry from /etc/hosts:
rsyslogd: omkafka: kafka message Failed to resolve 'kafka1:9092': Name or
service not known [v8.19.0 try <!-- m --><a class="postlink"
href="http://www.rsyslog.com/e/2422">http://www.rsyslog.com/e/2422</a><!--
m --> ]

telnet kafka1 9092
Trying 192.168.0.6...
Connected to kafka1.
Escape character is '^]'.

>From cmd line it can resolve with no issues.

Any help would be appreciated.

Thanks.


More information about the rsyslog-notify mailing list