Skip to content

Event does not get decorated in case of a request failure #74

Open
@boernd

Description

@boernd

Logstash version 5.4.2

Example config where e.g. the added field mycustomfield gets lost:

input {
    http_poller {
        add_field => { "mycustomfield" => "custom" }
        urls => {
            test => {
                method => get
                url => "http://myunavailable-service.elastic"
                headers => {
                    Accept => "application/json"
                }
            }
        }
        request_timeout => 5
        schedule => { "every" => "30s" }
        codec => "json"
    }
}

output {
    stdout {
        codec => rubydebug
    }
}

Output:

{
	"http_request_failure" => {
		"request" => {
			"headers" => {
				"Accept" => "application/json"
			},
			"method" => "get",
			"url" => "http://myunavailable-service.elastic"
		},
		"backtrace" => nil,
		"runtime_seconds" => 0.439,
		"name" => "test",
		"error" => "myunavailable-service.elastic: unknown error"
	},
	"@timestamp" => 2017-07-18T13: 33: 19.127Z,
	"@version" => "1",
	"tags" => [[0]"_http_request_failure"]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions