NAME
XAS::Collector::Alerts::Logstash - Send output to a logstash server
SYNOPSIS
use XAS::Collector::Alerts::Logstash;
my $output = XAS::Collector::Alerts::Logstash->new(
-alias => 'output-logstash',
-port => 9500,
-host => 'localhost',
-tcp_keepalive => 1,
-retry_reconnect => 1.
);
DESCRIPTION
This module will open and maintain a connection to a logstash server.
METHODS
new
This method initializes the module. This module inherits from XAS::Lib::Net::POE::Client and uses the same parameters for new().
EVENTS
handle_connection(OBJECT)
Notify the input session that the connection to logstash is up.
- OBJECT
-
A handle to the current object.
connection_down(OBJECT)
An event to notify the input session that the logstash connection is currently down.
- OBJECT
-
A handle to the current object.
connection_up(OBJECT)
An event to notify the input session that the logstash connection is up.
- OBJECT
-
A handle to the current object.
store_data(OBJECT, ARG0, ARG1)
this event recieves a data packet and an ack. The data packet is sent to the logstash server and the ack is sent to the input session.
- OBJECT
-
A handle to the current object.
- ARG0
-
The data to send to logstash.
- ARG1
-
The acknowledgement to send back to the message queue server.
read_data(OBJECT, ARG0)
Read any data from logstash. Log the input to the log file.
- OBJECT
-
A handle to the current object.
- ARG0
-
The data received from logstaeh.
SEE ALSO
AUTHOR
Kevin L. Esteb, <kevin@kesteb.us>
COPYRIGHT AND LICENSE
Copyright (c) 2014 Kevin L. Esteb
This is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0. For details, see the full text of the license at http://www.perlfoundation.org/artistic_license_2_0.