fluent-plugin-logdna
Using fluent-plugin-logdna, you can send the logs you collect with Fluentd to LogDNA.
Instructions
- Requirements:
ruby >= 2.3
fluentd < 2.0
- Install Fluentd
- Download here
- If using fluentd package manager (td-agent):
td-agent-gem install fluent-plugin-logdna
- To install without td-agent:
gem install fluent-plugin-logdna
- Add the config below to
/etc/fluent/fluent.conf
. Fortd-agent
,/etc/td-agent/td-agent.conf
:
Configuration
Configuration Parameters
api_key
: Ingestion Key, Requiredhostname
: Hostname, Requiredapp
: App Name, Optionalmac
: MAC Address, Optionalip
: IP Address, Optionaltags
: Comma-Separated List of Tags, Optionalrequest_timeout
: HTTPS POST Request Timeout, Optional- Note: Supports
s
andms
Suffices - Default:
30 s
- Note: Supports
ingester_domain
: Custom Ingester URL, Optional- Default:
htttps://logs.logdna.com
- Default:
ingester_endpoint
: Custom Ingester Endpoint, Optional- Default:
/logs/ingest
- Default:
Sample Configuration
<match **>
@type logdna
api_key xxxxxxxxxxxxxxxxxxxxxxxxxxx
hostname "#{Socket.gethostname}"
app my_app
mac C0:FF:EE:C0:FF:EE
ip 127.0.0.1
tags web,dev
request_timeout 30000 ms
ingester_domain https://logs.logdna.com
</match>
Line Parameters
The following line parameters can be set to the information coming from each record
object:
level
: Level:record['level']
orrecord['severity']
or the lasttag
given in eachrecord
file
: File Name: set tofile
given in eachrecord
app
: App Name: set to either_app
orapp
given in eachrecord
- Default:
app
given in the configuration
- Default:
env
: Environment Name: set toenv
given in eachrecord
meta
: Meta Object: set tometa
given in eachrecord
LogDNA Pay-per-gig Pricing
Our paid plans start at $1.25/GB per month, and it's based only on usage. There are no fixed data buckets and all paid plans include all features.
Building a debian package for td-agent
If you use td-agent you can build a debian package instead of installing via td-agent-gem
. This requires that td-agent is already installed and that you've installed fpm. Then run make
in your git directory.
gem install --no-document fpm
git clone https://github.com/logdna/fluent-plugin-logdna
cd fluent-plugin-logdna
gem build fluent-plugin-logdna.gemspec
fpm --input-type gem --output-type deb \
--no-auto-depends \
--no-gem-fix-name \
--depends 'td-agent > 2' \
--deb-build-depends 'td-agent > 2' \
fluent-plugin-logdna-*.gem
sudo dpkg -i fluent-plugin-logdna*.deb
Additional Options
For advanced configuration options, please refer to the buffered output parameters documentation.
Questions or concerns? Contact [email protected].
Contributions are always welcome. See the contributing guide to learn how you can help.