Net::Lumberjack::Client - a client for the lumberjack protocol
version 1.02
use Net::Lumberjack::Client; my $client = Net::Lumberjack::Client->new( host => '127.0.0.1', port => 5044, # for beats server keepalive => 0, frame_format => 'json', ## for a saftpresse (Log::Saftpresse) server # keepalive => 1, # or 0 # frame_format => 'json', ## for a lumberjack (v1) server # keepalive => 1, # frame_format => 'data', ); $client->send_data( { message => 'hello world!', lang => 'en' }, { message => 'Hallo Welt!', lang => 'de' }, );
Host to connect to.
TCP port to connect to.
If enabled connection will be keept open between send_data() calls. Otherwise it will be closed and reopened on every call.
Needs to be disabled for logstash-input-beats since it expects only one bulk of frames per connection.
The following frame formats are supported:
Uses json formatted data frames as defined in lumberjack protocol v2. (type 'J')
Uses lumberjack DATA (type 'D') frames as defined in lumberjack protocol v1.
This format only supports a flat hash structure.
Maximum number of frames the clients sends in one bulk.
When hitting this limit the client will split up the stream into smaller bulks.
Enable SSL transport encryption.
Enable verification of SSL server certificate.
Use a non-default CA file to retrieve list of trusted root CAs.
Otherwise the system wide default will be used.
Use a non-default CA path to retrieve list of trusted root CAs.
Use a non-default SSL protocol version string.
Check IO::Socket::SSL for string format.
Use a hostname other than the hostname give in 'host' for SSL certificate verification.
This could be used if you use a IP address to connecting to server that only lists the hostname in its certificate.
If 'ssl_cert' and 'ssl_key' is the client will enable client side authentication and use the supplied certificate/key.
This method takes a list of HashRefs and sends them to the server.
Markus Benning <ich@markusbenning.de>
This software is Copyright (c) 2016 by Markus Benning.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
To install Net::Lumberjack, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Lumberjack
CPAN shell
perl -MCPAN -e shell install Net::Lumberjack
For more information on module installation, please visit the detailed CPAN module installation guide.