From 6957f5c65b02bba533954eabc0b62f5de36be206 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 10 Apr 2018 17:26:49 +0100 Subject: gentoo resync : 10.04.2018 --- app-admin/fluentd/files/fluent.conf | 139 ++++++++++++++++++++++++++++++++++ app-admin/fluentd/files/fluentd.confd | 2 + app-admin/fluentd/files/fluentd.initd | 13 ++++ 3 files changed, 154 insertions(+) create mode 100644 app-admin/fluentd/files/fluent.conf create mode 100644 app-admin/fluentd/files/fluentd.confd create mode 100644 app-admin/fluentd/files/fluentd.initd (limited to 'app-admin/fluentd/files') diff --git a/app-admin/fluentd/files/fluent.conf b/app-admin/fluentd/files/fluent.conf new file mode 100644 index 000000000000..099d1b4af47d --- /dev/null +++ b/app-admin/fluentd/files/fluent.conf @@ -0,0 +1,139 @@ +# In v1 configuration, type and id are @ prefix parameters. +# @type and @id are recommended. type and id are still available for backward compatibility + +## built-in TCP input +## $ echo | fluent-cat +# +# @type forward +# @id forward_input +# + +## built-in UNIX socket input +# +# @type unix +# + +# HTTP input +# http://localhost:8888/?json= +# +# @type http +# @id http_input + +# port 8888 +# + +## File input +## read apache logs with tag=apache.access +# +# @type tail +# format apache +# path /var/log/httpd-access.log +# tag apache.access +# + +## Mutating event filter +## Add hostname and tag fields to apache.access tag events +# +# @type record_transformer +# +# hostname ${hostname} +# tag ${tag} +# +# + +## Selecting event filter +## Remove unnecessary events from apache prefixed tag events +# +# @type grep +# include1 method GET # pass only GET in 'method' field +# exclude1 message debug # remove debug event +# + +# Listen HTTP for monitoring +# http://localhost:24220/api/plugins +# http://localhost:24220/api/plugins?type=TYPE +# http://localhost:24220/api/plugins?tag=MYTAG +# +# @type monitor_agent +# @id monitor_agent_input + +# port 24220 +# + +# Listen DRb for debug +# +# @type debug_agent +# @id debug_agent_input + +# bind 127.0.0.1 +# port 24230 +# + +## match tag=apache.access and write to file +# +# @type file +# path /var/log/fluent/access +# + +## match tag=debug.** and dump to console + + @type stdout + @id stdout_output + + +# match tag=system.** and forward to another fluent server +# +# @type forward +# @id forward_output + +# +# host 192.168.0.11 +# +# +# +# host 192.168.0.12 +# +# +# + +## match tag=myapp.** and forward and write to file +# +# @type copy +# +# @type forward +# buffer_type file +# buffer_path /var/log/fluent/myapp-forward +# retry_limit 50 +# flush_interval 10s +# +# host 192.168.0.13 +# +# +# +# @type file +# path /var/log/fluent/myapp +# +# + +## match fluent's internal events +# +# @type null +# + +## match not matched logs and write to file +# +# @type file +# path /var/log/fluent/else +# compress gz +# + +## Label: For handling complex event routing +# diff --git a/app-admin/fluentd/files/fluentd.confd b/app-admin/fluentd/files/fluentd.confd new file mode 100644 index 000000000000..c693e6289b8a --- /dev/null +++ b/app-admin/fluentd/files/fluentd.confd @@ -0,0 +1,2 @@ +# If you need to pass any extra options to fluentd, set them here. +#fluentd_opts="" diff --git a/app-admin/fluentd/files/fluentd.initd b/app-admin/fluentd/files/fluentd.initd new file mode 100644 index 000000000000..ecbd10e0622a --- /dev/null +++ b/app-admin/fluentd/files/fluentd.initd @@ -0,0 +1,13 @@ +#!/sbin/openrc-run +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command=/usr/bin/fluentd +pidfile=/var/run/fluentd.pid +command_args="--daemon ${pidfile} --no-supervisor ${fluent_opts}" +command_background=yes +command_user=fluentd:fluentd + +start_pre() { +fluentd -q --dry-run +} -- cgit v1.2.3