input api output kafka
input
{
http_poller
{
urls =>
{
myurl => "http://api.openweathermap.org/data/2.5/weather?q=Seoul&appid=5af8b7bbeacd98abe5e5e4b84a46d520"
}
schedule =>
{
cron => "*/1 * * * * UTC"
}
codec => "json"
}
}
filter
{
mutate
{
remove_field => ["weather"]
}
ruby {
code => "event.set('@timestamp', LogStash::Timestamp.new(event.get('@timestamp')+(9*60*60)))"
}
}
output
{
kafka
{
bootstrap_servers => "kafka:19092"
topic_id => "api_kafka"
codec => "json"
}
stdout
{
codec => "rubydebug"
}
}
'Database > ElasticSearch' 카테고리의 다른 글
[logstash] input file output minio pipeline .conf (0) | 2021.09.20 |
---|---|
[logstash] input api output elasticsearch pipeline .conf (0) | 2021.09.20 |
[logstash] input minio output file pipeline .conf (0) | 2021.09.20 |
[logstash] input api output minio pipeline .conf (0) | 2021.09.20 |
[logstash] input api output file pipeline .conf (0) | 2021.09.20 |