[solved]Configuration input http_poller + TCP


#1

Hello,

I have two files .conf.

First have 1 input jdbc to taking data from mysql bdd / no filter / output TCP to logstash.
With this data, i build url for API. ex : https://nomapi/var1/var2/var3
This .conf is ok.

input {
jdbc {
        jdbc_driver_library    => ""
        jdbc_driver_class      => "com.mysql.jdbc.Driver"
        jdbc_connection_string => ""
        jdbc_user              => "user"
        jdbc_password          => "pass"
        schedule               => "* * * * *"
        statement              => "myrequest"
output {
tcp {
 host => ""
 port => "5000"
 mode => "client"
}
stdout { codec => json }
}

Second have 2 inputs, one is TCP for data, second is http_poller.
I need url builded in http_poller but i dont understand how ?

input {
tcp {
 port  => 5000
 codec => "json_lines"
}
http_poller {
        urls => {
                myurl => "http://%{datafromtcp}"
        }
}
}
output {
stdout {
codec => json
}
}

Thanks you


(Magnus B├Ąck) #2

So you want to receive data from the tcp input and use pieces of those events to configure the http_poller input? That's not supported.


#3

Thanks you for your response.

Yes but i found a solution so it's ok.

INPUT
-jdbc

FILTER
filter rest
filter json
filter split
filter prune

OUTPUT
plugin redis


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.