NAME

Message::Passing::Output::Search::Elasticsearch - index messages in Elasticsearch

VERSION

version 0.005

DESCRIPTION

This output is intentionally kept simple to not add dependencies. If you need a special format use a filter like Message::Passing::Filter::ToLogstash before sending messages to this output.

ATTRIBUTES

es_params

A hashref of "CREATING A NEW INSTANCE" in Search::Elasticsearch::Async parameters.

es

A Search::Elasticsearch::Async instance. Can either be passed directly or gets constructed from "es_params".

es_bulk_params

A hashref of "CREATING A NEW INSTANCE" in Search::Elasticsearch::Client::6_0::Async::Bulk parameters.

es_bulk

A Search::Elasticsearch::Client::6_0::Async::Bulk instance. Can either be passed directly or gets constructed from "es" and "es_bulk_params" using bulk_helper.

type

Can be either set to a fixed string or a coderef that's called for every message to return the type depending on the contents of the message.

index_name

Can be either set to a fixed string or a coderef that's called for every message to return the index name depending on the contents of the message.

METHODS

consume ($msg)

Consumes a message, queuing it for consumption by Elasticsearch. Assumes that the message is a hashref, skips silently in case it isn't.

SEE ALSO

Message::Passing

AUTHOR

Alexander Hartmaier <abraxxa@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2018 by Alexander Hartmaier.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.