On Mon, Aug 17, 2015 at 10:48 PM, Christopher Wilson
<[email protected]> wrote:
> I'm trying to get a working Kafka forwarding rule and am not finding any
> functional examples. Does anyone have a code snippet they could share for
> omkafka?
>
> Thank you in advance.
>
> -Chris
Hi Chris,
I've been using it with very successful results as follows:
module(load="omkafka")
template(name="kafkadyntopic" type="string" string="%programname%")
template(name="kafkamsg" type="string" string="%msg%")
# Filtering rules/rulesets etc go here
action(type="omkafka"
name="log1_kafka"
brokers="kafkaserver01:9092,kafkaserver02:9092"
confparam=["client.id=server01"]
topic="kafkadyntopic"
dynatopic="on"
dynatopic.cachesize="1000"
partitions.unassigned="on"
errorfile="/var/log/omkafka/log1_kafka_failures.log"
template="kafkamsg")
With the following notes:
- The topic that is produced is dynamic based on the "programname"
property (template for kafkadyntopic)
- confparam was added to discern producer errors that appear in the
kafka broker logs (instead of the default which is "rdkafka")
- The content of the topic will be the "msg" property, meaning no
additional syslog properties (template for kafkamsg)
- Any errors will be written to "/var/log/omkafka/log1_kafka_failures.log"
If you want to have a static topic, omit the dynatopic* configuration
and the topic parameter would be the topic that gets produced into.
You can also post your config and I can see if anything looks incorrect.
Tait
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE
THAT.