You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using 'add_field' in the http_poller input plugin of a Logstash configuration, the field is lost when the plugin returns an error on the test URL.
See example input block below. The Links LINK_1 and LINK_3 for example may return a success (http 200) and the added field 'environment' will be part of the resulting document.
But in a case were LINK_2_DOWN and LINK_3_UNREACHABLE return an error response (http <> 200) then the added field 'environment' is NOT part of the result document.
I just wanted to open a similar Issue and found this existing one.
I hit this issue with Logstash 6.6 this weekend, when our Healthcheck failed with a timeout, and then didn't include the metadata I needed.
I will try to include the add_field in a mutate filter as a workaround for now.
migrated from elastic/logstash#6773
When using 'add_field' in the http_poller input plugin of a Logstash configuration, the field is lost when the plugin returns an error on the test URL.
See example input block below. The Links LINK_1 and LINK_3 for example may return a success (http 200) and the added field 'environment' will be part of the resulting document.
But in a case were LINK_2_DOWN and LINK_3_UNREACHABLE return an error response (http <> 200) then the added field 'environment' is NOT part of the result document.
input {
# ITT Polling.
http_poller {
urls => {
LINK_1 => "http://xxx-it.html"
LINK_2_DOWN => "http://xxx-down.html"
}
request_timeout => 10
interval => 300
codec => plain
metadata_target => "http_poller_metadata"
add_field => { "environment" => "I" }
}
# UAT Polling.
http_poller {
urls => {
LINK_3 => "http://xxx-uat.html"
LINK_4_UNREACHABLE => "http://xxx-unreachable.html"
}
request_timeout => 10
interval => 300
codec => plain
metadata_target => "http_poller_metadata"
add_field => { "environment" => "A" }
}
}
The text was updated successfully, but these errors were encountered: