Closed jgough closed 2 years ago
@jgough I think what you are looking for is the fields
object. For an example have a look at https://github.com/magnusbaeck/logstash-filter-verifier/blob/master/testdata/testcases/testcases_event/testcases.json respectively the new version of this file in my most recent PR https://github.com/magnusbaeck/logstash-filter-verifier/blob/a0b728bf8f8c7ce4407ed0ba2ea40add6463377d/testdata/testcases/testcases_event/testcases.json
Does this solve your problem?
Looks indeed that with https://github.com/magnusbaeck/logstash-filter-verifier/pull/129 that I can probably now use the fields object as several of the plugins I need to use (s3, dead_letter_queue) output data nested under @metadata
. Thanks!
In the v2 beta daemon mode, what is the preferred way of testing input plugins that output multiple fields and don't need a codec?
For example, the
jdbc
input produces fields containing values output from the query statement specified:Should output an event with fields
What is the best way of testing this?
Previously in v1 I would have tested this with the following:
Since codec is not an option in daemon mode then how would you recommend testing this? If I do:
Then the string just comes as a JSON string inside the message field. Any suggestions? I can't think of any tidy way of doing this.