Alexander Hartmaier > Message-Passing-Output-Search-Elasticsearch-0.002 > Message::Passing::Output::Search::Elasticsearch

Download:
Message-Passing-Output-Search-Elasticsearch-0.002.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.002   Source  

NAME ^

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

VERSION ^

version 0.002

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. The only two Elasticsearch specific fields are type and index name.

ATTRIBUTES ^

es_params

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

es

An object conforming to the Search::Elasticsearch::Role::Client role. Can either be passed directly or gets constructed from "es_params".

es_bulk_params

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

es_bulk

A Search::Elasticsearch::Bulk instance. Can either be passed directly or gets constructed from "es_bulk_params" in which case 'es' is set to "es".

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) 2014 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.

syntax highlighting: