Skip to content

Logstash

Collecting logging through Logstash.

Configuration

DataKit enable the logstreaming collector

  • Enable logstreaming collector

Open the DataKit logstreaming plug-in and copy the sample file , Rename it logstreaming.conf.

[inputs.logstreaming]
  ignore_url_tags = true

For a detailed introduction to the logstreaming collector, please refer to the official document

  • Restart DataKit

Restart DataKit

Logstash configuration adjustment

DataKit uses the logstreaming collector to collect log information reported by Logstash, so Logstash needs to point the output address to the receiving address of the logstreaming collector.

    ....
## Send the collected data to DataKit
output {  
    http {
        http_method => "post"
        format => "json"
        url => "http://127.0.0.1:9529/v1/write/logstreaming?source=nginx"
    }
}
  • url :The address is the DataKit collector address, adjusted according to the actual situation.
  • source:Identify the data source, which is the measurement of the protocol. For example, nginx or redis (/v1/write/logstreaming?source=nginx)

Regarding the introduction of logstreaming collector parameters, please refer to the official document

After the adjustment is completed, restart Logstash to make its configuration effective.

Feedback

Is this page helpful? ×