- OS Support
- Enterprise Edition Reference Manual
- 127. Man Pages
- 128. Configuration
- 129. Language
- 130. Extension Modules
- 131. Input Modules
- 132. Processor Modules
- 133. Output Modules
- 133.1. Batched Compression (om_batchcompress)
- 133.2. Blocker (om_blocker)
- 133.3. DBI (om_dbi)
- 133.4. Elasticsearch (om_elasticsearch)
- 133.5. EventDB (om_eventdb)
- 133.6. Program (om_exec)
- 133.7. Files (om_file)
- 133.8. Go (om_go)
- 133.9. HTTP(s) (om_http)
- 133.10. Java (om_java)
- 133.11. Kafka (om_kafka)
- 133.12. Null (om_null)
- 133.13. ODBC (om_odbc)
- 133.14. Perl (om_perl)
- 133.15. Named Pipes (om_pipe)
- 133.16. Python (om_python)
- 133.17. Raijin (om_raijin)
- 133.18. Redis (om_redis)
- 133.19. Ruby (om_ruby)
- 133.20. TLS/SSL (om_ssl)
- 133.21. TCP (om_tcp)
- 133.22. UDP (om_udp)
- 133.23. UDP with IP Spoofing (om_udpspoof)
- 133.24. Unix Domain Sockets (om_uds)
- 133.25. WebHDFS (om_webhdfs)
- 133.26. ZeroMQ (om_zmq)
- NXLog Manager
- NXLog Add-Ons
|To examine the supported platforms, see the list of installer packages in the Available Modules chapter.|
|The om_kafka module is not supported as the underlying librdkafka library is unstable on AIX. Use it on IBM AIX at your own risk.|
The module uses an internal persistent queue to back up event records that should be pushed to a Kafka broker. Once the module receives an acknowledgement from the Kafka server that the message has been delivered successfully, the module removes the corresponding message from the internal queue. If the module is unable to deliver a message to a Kafka broker (for example, due to connectivity issues or the Kafka server being down), this message is retained in the internal queue (including cases when NXLog restarts) and the module will attempt to re-deliver the message again.
The number of re-delivery attempts can be specified by passing the
message.send.max.retries property via the Option
Option message.send.max.retries 5). By default, the number of retries
is set to 2 and the time interval between two subsequent retries is 5 minutes.
Thus, by altering the number of retries, it is possible to control the total
time for a message to remain in the internal queue. If a message cannot be
delivered within the allowed retry attempts, the message is dropped. The
maximum size of the internal queue defaults to 100 messages. To increase the
size of the internal queue, you can use the LogqueueSize directive.
This mandatory directive specifies the list of Kafka brokers to connect to for publishing logs. The list should include ports and be comma-delimited (for example,
This mandatory directive specifies the Kafka topic to publish records to.
This specifies the path of the certificate authority (CA) certificate, which will be used to check the certificate of the remote brokers. CAFile is required if Protocol is set to
sasl_ssl. To trust a self-signed certificate presented by the remote (which is not signed by a CA), provide that certificate instead.
This specifies the path of the certificate file to be used for the SSL handshake.
This specifies the path of the certificate key file to be used for the SSL handshake.
This directive specifies the compression types to use during transfer. Available types depend on the Kafka library, and should include
With this directive, a password can be supplied for the certificate key file defined in CertKeyFile. This directive is not needed for passwordless private keys.
This directive can be used to pass a custom configuration property to the Kafka library (librdkafka). For example, the group ID string can be set with
Option group.id mygroup. This directive may be used more than once to specify multiple options. For a list of configuration properties, see the librdkafka CONFIGURATION.md file.Warning
Passing librdkafka configuration properties via the Option directive should be done with care since these properties are used for the fine-tuning of the librdkafka performance and may result in various side effects.
This optional integer directive specifies the topic partition to write to. If this directive is not given, messages are sent without a partition specified.
This optional directive specifies the protocol to use for connecting to the Kafka brokers. Accepted values include
sasl_ssl. If Protocol is set to
sasl_ssl, then the CAFile directive must also be provided.
This directive specifies the Kerberos service name to be used for SASL authentication. The service name is required for the
This specifies the client’s Kerberos principal name for the
sasl_sslprotocols. This directive is only available and mandatory on Linux/UNIX. See note below.
Specifies the path to the kerberos keytab file which contains the client’s allocated principal name. This directive is only available and mandatory on Linux/UNIX.
The SASLKerberosServiceName and SASLKerberosPrincipal directives are only available on Linux/UNIX. On Windows, the login user’s principal name and credentials are used for SASL/Kerberos authentication.
For details about configuring Apache Kafka brokers to accept SASL/Kerberos
authentication from clients, please follow the instructions provided by the
This configuration sends events to a Kafka cluster using the brokers
specified. Events are published to the first partition of the
1 2 3 4 5 6 7 8 9 10 11 12 <Output out> Module om_kafka BrokerList localhost:9092,192.168.88.35:19092 Topic nxlog LogqueueSize 100000 Partition 0 Protocol ssl CAFile /root/ssl/ca-cert CertFile /root/ssl/client_debian-8.pem CertKeyFile /root/ssl/client_debian-8.key KeyPass thisisasecret </Output>
librdkafka library can produce its performance statistics and format it
in JSON. All fields from the JSON structure are explained on the
page of the
librdkafka project on the GitHub website. NXLog can be
configured to poll this data at a specified fixed interval. The result can be
saved to the internal logger.
To read statistical data of the
librdkafka library, the millisecond polling
interval needs to be specified against the Option
directive using the
To get the
librdkafka statistics produced and delivered synchronously, the
statistics.interval.ms option and the Schedule block should specify the
same interval amount.