This plugin was initily developed as part of the loomsystems product for the use of our customers.
There is no specific code for the loomsystem product and you can use it for any purpose.
Link to a StackOverflow question with examples that drove the creation of this plugin.
Fluentd output plugin for tcp secure contains a proper JSON formatter and a socket handler that streams logs directly to your chosen host.
To add the plugin to your fluentd agent, use the following command:
gem install fluent-plugin-loomsystems
To match all events and send them using this output plugin, add the following block to your fluentd configuration file:
<match **>
@type loomsystems
host <your-host>
</match>
Restart Fluentd to have the changes take effect.
Example of match (output) with event tag:
<source>
@type dummy
dummy {"hello":"loom"}
tag loom
</source>
<match loom.**>
@type loom
host <your-subdomain>.loomsystems.com
</match>
Restart Fluentd to have events tagged with loom
shipped to your domain.
As fluent-plugin-loomsystems is an output_buffer, you can set all output_buffer properties like it's describe in the fluentd documentation.
Custom properties:
Property | Description | Default value |
---|---|---|
host | The matched events tagged with "loomsystems.**" will be sent to your loomsystems sub-domain | *requierd |
use_ssl | If true, opens a secured TCP connection to loomsystems.com, and a non secured otherwise | true |
ssl_port | If use_ssl is true, use this property for configuring the sending port | 9999 |
port | If use_ssl is false, use this property for configuring the sending port | 8888 |
max_retries | The number of retries before the output plugin stops. Set to -1 for unlimited retries | -1 |
Do not use fluent codec! there is no need for that.
Example of Logstash tcp input properties:
input {
tcp {
port => 9999
ssl_enable => true
ssl_cert => "creds/cert.pem"
ssl_key => "creds/cert.key"
ssl_verify => false
}
}