summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD61
-rw-r--r--fluentd.conf177
-rw-r--r--fluentd.install12
-rw-r--r--fluentd.service9
-rw-r--r--sysusers.conf (renamed from fluentd.sysusers)0
-rw-r--r--tmpfiles.conf (renamed from fluentd.tmpfiles)0
7 files changed, 104 insertions, 173 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e1a7aa92fd74..4016aa27f3f4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,11 +1,12 @@
pkgbase = fluentd
pkgdesc = Open source data collector designed to scale and simplify log management
pkgver = 1.12.3
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/fluent/fluentd
+ install = fluentd.install
arch = any
license = Apache
- depends = ruby
+ depends = ruby-bundler
depends = ruby-msgpack
depends = ruby-yajl-ruby
depends = ruby-cool.io
@@ -15,17 +16,20 @@ pkgbase = fluentd
depends = ruby-tzinfo
depends = ruby-tzinfo-data
depends = ruby-strptime
+ depends = ruby-webrick
+ optdepends = jemalloc: for a more efficient malloc implementation
+ optdepends = ruby-oj: for a faster json parser
noextract = fluentd-1.12.3.gem
options = !emptydirs
- backup = etc/fluentd/fluentd.conf
+ backup = etc/fluent/fluentd.conf
source = https://rubygems.org/downloads/fluentd-1.12.3.gem
source = fluentd.conf
source = fluentd.service
- source = fluentd.tmpfiles
- source = fluentd.sysusers
+ source = tmpfiles.conf
+ source = sysusers.conf
b2sums = 53086b43a3acb43eb6564b43152a8d83d0a5519c301891446f7156efeacddc76ea378532d7c8a2d4f7c7520370c9988a8ff07c754c17992c97d225a1d0ba0f95
- b2sums = 73a3afc0e3692890087d03a778e26949af2d68c3eb3c0656b4d278c8f4e51f71678482a2dde58565df7ca3b9ce7d1f9dd4b1cc3f85d9c0ac2b7e6ccacd8e6ff5
- b2sums = 80b220bdee1eb18f128db3514484fcfd13c8e2a99fb43f03f4e2ebfa0ddc893a7b128f1bcbdc9f43b235c0613cdce71ef7d12120131b419d9efeb89d51860c3a
+ b2sums = 3fb9859e9a73c834891211c220268b0c0808ce4de3c5f334c941e4033f93c5e0c1d1f99fd108b079f93f5ea6b5575f1a0f8d833012259114f091d8784c716491
+ b2sums = dcabc5dd54b7b4a3b98b8ec493ee1409b887f0e89812eb8c13da7158857b4df25f20c43c75a33d492c5ad484db88ed56669cc0048afbe4d8a373b715b7d7a1a5
b2sums = 8957872f805a274a56ae9e63896033a5fe175bd4d71704e62aff18524b95bf2a611bb3a4bff3c93b6d977f209e415a7d38d806341e144919022226ab1f53247d
b2sums = 78cf6da081b7f370bfe6b362e5f545cefcb770cc42eafd713de5befd8489c543a99e60112b09dc47b7867fdac8be91291cab68fc102f97834f248ce879782d6c
diff --git a/PKGBUILD b/PKGBUILD
index 658f67161324..92c819458ed8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,40 +5,54 @@
_gemname=fluentd
pkgname=$_gemname
pkgver=1.12.3
-pkgrel=1
+pkgrel=2
pkgdesc='Open source data collector designed to scale and simplify log management'
arch=(any)
url='https://github.com/fluent/fluentd'
license=(Apache)
depends=(
- ruby
- ruby-msgpack
- ruby-yajl-ruby
- ruby-cool.io
- ruby-serverengine
- ruby-http_parser.rb
- ruby-sigdump
- ruby-tzinfo
- ruby-tzinfo-data
- ruby-strptime
+ 'ruby-bundler'
+ 'ruby-msgpack'
+ 'ruby-yajl-ruby'
+ 'ruby-cool.io'
+ 'ruby-serverengine'
+ 'ruby-http_parser.rb'
+ 'ruby-sigdump'
+ 'ruby-tzinfo'
+ 'ruby-tzinfo-data'
+ 'ruby-strptime'
+ 'ruby-webrick'
+)
+optdepends=(
+ 'jemalloc: for a more efficient malloc implementation'
+ 'ruby-oj: for a faster json parser'
)
options=(!emptydirs)
-source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem"
- "$pkgname.conf"
- "$pkgname.service"
- "$pkgname.tmpfiles"
- "$pkgname.sysusers")
+source=(
+ "https://rubygems.org/downloads/$_gemname-$pkgver.gem"
+ "$pkgname.conf"
+ "$pkgname.service"
+ "tmpfiles.conf"
+ "sysusers.conf"
+)
+install="$pkgname.install"
noextract=("$_gemname-$pkgver.gem")
-backup=('etc/fluentd/fluentd.conf')
+backup=('etc/fluent/fluentd.conf')
b2sums=('53086b43a3acb43eb6564b43152a8d83d0a5519c301891446f7156efeacddc76ea378532d7c8a2d4f7c7520370c9988a8ff07c754c17992c97d225a1d0ba0f95'
- '73a3afc0e3692890087d03a778e26949af2d68c3eb3c0656b4d278c8f4e51f71678482a2dde58565df7ca3b9ce7d1f9dd4b1cc3f85d9c0ac2b7e6ccacd8e6ff5'
- '80b220bdee1eb18f128db3514484fcfd13c8e2a99fb43f03f4e2ebfa0ddc893a7b128f1bcbdc9f43b235c0613cdce71ef7d12120131b419d9efeb89d51860c3a'
+ '3fb9859e9a73c834891211c220268b0c0808ce4de3c5f334c941e4033f93c5e0c1d1f99fd108b079f93f5ea6b5575f1a0f8d833012259114f091d8784c716491'
+ 'dcabc5dd54b7b4a3b98b8ec493ee1409b887f0e89812eb8c13da7158857b4df25f20c43c75a33d492c5ad484db88ed56669cc0048afbe4d8a373b715b7d7a1a5'
'8957872f805a274a56ae9e63896033a5fe175bd4d71704e62aff18524b95bf2a611bb3a4bff3c93b6d977f209e415a7d38d806341e144919022226ab1f53247d'
'78cf6da081b7f370bfe6b362e5f545cefcb770cc42eafd713de5befd8489c543a99e60112b09dc47b7867fdac8be91291cab68fc102f97834f248ce879782d6c')
package() {
local _gemdir="$(ruby -e'puts Gem.default_dir')"
- gem install --ignore-dependencies --no-user-install --no-document -i "$pkgdir/$_gemdir" -n "$pkgdir/usr/bin" $_gemname-$pkgver.gem
+ gem install \
+ --ignore-dependencies \
+ --no-user-install \
+ --no-document \
+ --install-dir "$pkgdir/$_gemdir" \
+ --bindir "$pkgdir/usr/bin" \
+ $_gemname-$pkgver.gem
# delete unnecessary files
cd "$pkgdir/$_gemdir"
@@ -61,10 +75,11 @@ package() {
docs/SECURITY_AUDIT.pdf *.md example
# configuration
- install -Dm644 -t "$pkgdir/etc/$pkgname" "$srcdir/$pkgname.conf"
+ install -Dm644 fluent.conf "$pkgdir/etc/fluent/fluentd.conf"
+ install -Dm644 -t "$pkgdir/etc/conf.d" "$srcdir/$pkgname.conf"
# systemd service
install -Dm644 -t "$pkgdir/usr/lib/systemd/system" "$srcdir/$pkgname.service"
- install -Dm644 "$srcdir/$pkgname.sysusers" "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
- install -Dm644 "$srcdir/$pkgname.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
+ install -Dm644 "$srcdir/sysusers.conf" "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
+ install -Dm644 "$srcdir/tmpfiles.conf" "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
}
diff --git a/fluentd.conf b/fluentd.conf
index 3c393b451d4e..ccdd8d9e8192 100644
--- a/fluentd.conf
+++ b/fluentd.conf
@@ -1,139 +1,38 @@
-# 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 <json> | fluent-cat <tag>
-<source>
- @type forward
- @id forward_input
-</source>
-
-## built-in UNIX socket input
-#<source>
-# @type unix
-#</source>
-
-# HTTP input
-# http://localhost:8888/<tag>?json=<json>
-<source>
- @type http
- @id http_input
-
- port 8888
-</source>
-
-## File input
-## read apache logs with tag=apache.access
-#<source>
-# @type tail
-# format apache
-# path /var/log/httpd-access.log
-# tag apache.access
-#</source>
-
-## Mutating event filter
-## Add hostname and tag fields to apache.access tag events
-#<filter apache.access>
-# @type record_transformer
-# <record>
-# hostname ${hostname}
-# tag ${tag}
-# </record>
-#</filter>
-
-## Selecting event filter
-## Remove unnecessary events from apache prefixed tag events
-#<filter apache.**>
-# @type grep
-# include1 method GET # pass only GET in 'method' field
-# exclude1 message debug # remove debug event
-#</filter>
-
-# Listen HTTP for monitoring
-# http://localhost:24220/api/plugins
-# http://localhost:24220/api/plugins?type=TYPE
-# http://localhost:24220/api/plugins?tag=MYTAG
-<source>
- @type monitor_agent
- @id monitor_agent_input
-
- port 24220
-</source>
-
-# Listen DRb for debug
-<source>
- @type debug_agent
- @id debug_agent_input
-
- bind 127.0.0.1
- port 24230
-</source>
-
-## match tag=apache.access and write to file
-#<match apache.access>
-# @type file
-# path /var/log/fluent/access
-#</match>
-
-## match tag=debug.** and dump to console
-<match debug.**>
- @type stdout
- @id stdout_output
-</match>
-
-# match tag=system.** and forward to another fluent server
-<match system.**>
- @type forward
- @id forward_output
-
- <server>
- host 192.168.0.11
- </server>
- <secondary>
- <server>
- host 192.168.0.12
- </server>
- </secondary>
-</match>
-
-## match tag=myapp.** and forward and write to file
-#<match myapp.**>
-# @type copy
-# <store>
-# @type forward
-# buffer_type file
-# buffer_path /var/log/fluent/myapp-forward
-# retry_limit 50
-# flush_interval 10s
-# <server>
-# host 192.168.0.13
-# </server>
-# </store>
-# <store>
-# @type file
-# path /var/log/fluent/myapp
-# </store>
-#</match>
-
-## match fluent's internal events
-#<match fluent.**>
-# @type null
-#</match>
-
-## match not matched logs and write to file
-#<match **>
-# @type file
-# path /var/log/fluent/else
-# compress gz
-#</match>
-
-## Label: For handling complex event routing
-#<label @STAGING>
-# <match system.**>
-# @type forward
-# @id staging_forward_output
-# <server>
-# host 192.168.0.101
-# </server>
-# </match>
-#</label>
+FLUENT_AGENT_OPTIONS=""
+
+#Usage: fluentd [options]
+# -s, --setup [DIR=/etc/fluent] install sample configuration file to the directory
+# -c, --config PATH config file path (default: /etc/fluent/fluent.conf)
+# --dry-run Check fluentd setup is correct or not
+# --show-plugin-config=PLUGIN [DEPRECATED] Show PLUGIN configuration and exit(ex: input:dummy)
+# -p, --plugin DIR add plugin directory
+# -I PATH add library path
+# -r NAME load library
+# -d, --daemon PIDFILE daemonize fluent process
+# --under-supervisor run fluent worker under supervisor (this option is NOT for users)
+# --no-supervisor run fluent worker without supervisor
+# --workers NUM specify the number of workers under supervisor
+# --user USER change user
+# --group GROUP change group
+# -o, --log PATH log file path
+# --log-rotate-age AGE generations to keep rotated log files
+# --log-rotate-size BYTES sets the byte size to rotate log files
+# --log-event-verbose enable log events during process startup/shutdown
+# -i CONFIG_STRING, inline config which is appended to the config file on-the-fly
+# --inline-config
+# --emit-error-log-interval SECONDS
+# suppress interval seconds of emit error logs
+# --suppress-repeated-stacktrace [VALUE]
+# suppress repeated stacktrace
+# --without-source invoke a fluentd without input plugins
+# --use-v1-config Use v1 configuration format (default)
+# --use-v0-config Use v0 configuration format
+# --strict-config-value Parse config values strictly
+# -v, --verbose increase verbose level (-v: debug, -vv: trace)
+# -q, --quiet decrease verbose level (-q: warn, -qq: error)
+# --suppress-config-dump suppress config dumping when fluentd starts
+# -g, --gemfile GEMFILE Gemfile path
+# -G, --gem-path GEM_INSTALL_PATH Gemfile install path (default: $(dirname $gemfile)/vendor/bundle)
+# --conf-encoding ENCODING specify configuration file encoding
+# --disable-shared-socket Don't open shared socket for multiple workers
+#
diff --git a/fluentd.install b/fluentd.install
new file mode 100644
index 000000000000..5acb99393476
--- /dev/null
+++ b/fluentd.install
@@ -0,0 +1,12 @@
+post_install() {
+ cat <<-EOF
+
+ If a more efficient malloc implementation is desired, jemalloc can
+ be optionally installed. In order for fluentd to use this, a reference
+ to jemalloc is required in LD_PRELOAD environment variable.
+
+ This can be done via 'systemctl edit fluentd.service', and should
+ look like 'Environment=LD_PRELOAD=/usr/lib/libjemalloc.so'.
+
+ EOF
+}
diff --git a/fluentd.service b/fluentd.service
index e3180a434e2d..e20b9bdbb717 100644
--- a/fluentd.service
+++ b/fluentd.service
@@ -1,5 +1,6 @@
[Unit]
Description=Fluentd daemon
+Documentation=https://docs.fluentd.org
After=network-online.target
Wants=network-online.target
@@ -7,15 +8,15 @@ Wants=network-online.target
User=fluentd
Group=fluentd
LimitNOFILE=65536
-Environment=FLUENT_CONF=/etc/fluentd/fluentd.conf
-Environment=FLUENT_PLUGIN=/etc/fluentd/plugin
-Environment=FLUENT_SOCKET=/run/fluentd/fluentd.sock
+Environment=FLUENT_CONF=/etc/fluent/fluentd.conf
+Environment=FLUENT_PLUGIN=/etc/fluent/plugin
+Environment=FLUENT_SOCKET=/run/fluent/fluentd.sock
Environment=FLUENT_LOG_FILE=/var/log/fluentd/fluentd.log
EnvironmentFile=-/etc/conf.d/fluentd
PIDFile=/run/fluentd/fluentd.pid
RuntimeDirectory=fluentd
Type=forking
-ExecStart=/usr/bin/fluentd --log $FLUENT_LOG_FILE --daemon /run/fluentd/fluentd.pid
+ExecStart=/usr/bin/fluentd --log $FLUENT_LOG_FILE --daemon /run/fluentd/fluentd.pid $FLUENT_AGENT_OPTIONS
ExecStop=/usr/bin/kill -TERM ${MAINPID}
ExecReload=/usr/bin/kill -HUP ${MAINPID}
Restart=always
diff --git a/fluentd.sysusers b/sysusers.conf
index f9b9ccff2dd2..f9b9ccff2dd2 100644
--- a/fluentd.sysusers
+++ b/sysusers.conf
diff --git a/fluentd.tmpfiles b/tmpfiles.conf
index 7a81140aa01b..7a81140aa01b 100644
--- a/fluentd.tmpfiles
+++ b/tmpfiles.conf