Can build logstash input are API?

Can build logstash input are API for waiting log
there are samples?

I am not sure I understand your question. Can you please clarify and provide some additional details?

1 Like

Sorry for the question.
I want to use Rest API as input for logstsh

If you want to poll an external rest point for data, have a look at the HTTP poller input plugin to see if it matches your needs.

@Christian_Dahlqvist HTTP poller input plugin don't meets i needs.

logstash can create rest api of own? for system other use api logstash

Example

Any ideas on how to do this?

Aha, then it may be the http input plugin you are looking for...

If that does not match I suspect you may need to create a custom input plugin.

@Christian_Dahlqvist I tried to write an http input plugin but could not set the path url and only called localhost only.

Example code
input {
http {
host => "127.0.0.1"
port => "5043"
response_headers => {
"Access-Control-Allow-Methods" => "POST"
"Access-Control-Allow-Origin" => "*"
"Content-Type" => "text/plain"
"Access-Control-Allow-Headers" => "Origin, X-Requested-With, Content-Type, Accept"
}
codec => "json"
}
}
output {
stdout { codec => json { charset => "UTF-8" }}
}

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