To ensure that you can troubleshoot issues with Apache Kafka or Logstash, enable logging for
those components.
About this task
Use the logging function only in Proof of Concept or test systems. For production scale volumes
of data, disable logging.
Procedure
Configuring logging for Logstash
-
To enable logging for Logstash, add the following code
to the
output
section of the configuration:
output {
file {
path => <path_to_log_directory>/rubydebug.log
"
codec => rubydebug
}
}
where
<path_to_log_directory> is the path to the directory where you want to store
the log files.
This code enables the rubydebug
codec, which logs all the messages
that Logstash receives.
You can use these logs to check to see whether the appropriate tags are applied and if the
processing is correct.
-
To generate log files for the Log Analysis
Logstash plug-in, add
the full path for the log file to the following property in the Log Analysis output plug-in
section of your Sender configuration:
log_file => <log_file_and_path>
For
example:
log_file => /data/ioala/Logstash/logs/scala_logstash.log
log_level => warn
If
you do enable logging in production systems, the plug-in needs to be configured for the warning
level.