Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
boernd opened this issue Jul 18, 2017 · 0 comments · May be fixed by #75
Open

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

boernd opened this issue Jul 18, 2017 · 0 comments · May be fixed by #75

Comments

@boernd
Copy link

boernd commented Jul 18, 2017

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"]
}
@boernd boernd linked a pull request Jul 18, 2017 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant