Hi All,
I am trying to using multiple Url's for the http_poller and need to use a different Grok patterns for each of the Url's
I am aware that i can make use of type string in the Input plugins and make Grok patterns using 'If' condition , if it matches the type.
I tried to built with the below sample file ,Provide me help on building it .
input {
http_poller {
urls => {
url1 => "https://hedeededededje"
type[url1] => "JVM_Memory"
}
}
http_poller {
urls => {
url2 => "https://wwdwjjwhewkjek"
type[url2] => "GC"
}
}
request_timeout => 60
user => "tttttt"
password => "yyyyyy"
request_timeout => 60
schedule => { cron => "*/5 * * * *"}
codec => "json"
metadata_target => "http_metadata"
}
}
filter {
if type[url1] == "JVM_Memory"{
split {
terminator => "\n"
field => "message"
remove_field => "tags"
}
}
if type[url2] == "GC" {
split {
terminator => "\n"
field => "message"
remove_field => "tags"
}
}
}
Thanks in Advance.
Kamal