diff options
author | George Rawlinson | 2020-10-13 19:32:16 +1300 |
---|---|---|
committer | George Rawlinson | 2020-10-13 19:32:16 +1300 |
commit | 5ec96849d5eb2995b27f7336e1da9b43303a6114 (patch) | |
tree | ac995cf3e7782e9e3791e623ff874e071e25f0af | |
parent | c6e474573c87dee134f3610da5870fb2d0b624e6 (diff) | |
download | aur-5ec96849d5eb2995b27f7336e1da9b43303a6114.tar.gz |
upgpkg: fluentd 1.11.3-1
-rw-r--r-- | .SRCINFO | 31 | ||||
-rw-r--r-- | PKGBUILD | 54 | ||||
-rw-r--r-- | fluentd.conf | 139 | ||||
-rw-r--r-- | fluentd.service | 25 | ||||
-rw-r--r-- | fluentd.sysusers | 1 | ||||
-rw-r--r-- | fluentd.tmpfiles | 2 |
6 files changed, 231 insertions, 21 deletions
@@ -1,18 +1,33 @@ pkgbase = fluentd - pkgdesc = Open source data collector designed to scale and simplify log management. It can collect, process and ship many kinds of data in near real-time. - pkgver = 1.11.0 + pkgdesc = Open source data collector designed to scale and simplify log management + pkgver = 1.11.3 pkgrel = 1 - url = http://fluentd.org/ - arch = any + url = https://github.com/fluentd/fluentd + arch = x86_64 license = Apache depends = ruby - depends = ruby-json depends = ruby-msgpack + depends = ruby-yajl-ruby + depends = ruby-cool.io + depends = ruby-serverengine + depends = ruby-http_parser.rb + depends = ruby-sigdump depends = ruby-tzinfo - depends = ruby-concurrent + depends = ruby-tzinfo-data + depends = ruby-strptime + noextract = fluentd-1.11.3.gem options = !emptydirs - source = https://rubygems.org/downloads/fluentd-1.11.0.gem - sha512sums = 14289ac3174ae417bafcf78e4574fd4f0d84799def9d47629ea36679d08d74c6c2eb4dd72b1915177f6eadd03e26779beda59c0e7bf9e6087f26bebcf8561daa + backup = etc/fluentd/fluentd.conf + source = https://rubygems.org/downloads/fluentd-1.11.3.gem + source = fluentd.conf + source = fluentd.service + source = fluentd.tmpfiles + source = fluentd.sysusers + b2sums = 872cfa5c7b92661c1b666d1633c76f3d5cf6e9bacb23b113900e5fcf77f61ad0ae4e7b8f2a52a78be7f6a9a13fad0b6883fb8fb425f00c961d36b643c6a223d8 + b2sums = 73a3afc0e3692890087d03a778e26949af2d68c3eb3c0656b4d278c8f4e51f71678482a2dde58565df7ca3b9ce7d1f9dd4b1cc3f85d9c0ac2b7e6ccacd8e6ff5 + b2sums = 80b220bdee1eb18f128db3514484fcfd13c8e2a99fb43f03f4e2ebfa0ddc893a7b128f1bcbdc9f43b235c0613cdce71ef7d12120131b419d9efeb89d51860c3a + b2sums = 8957872f805a274a56ae9e63896033a5fe175bd4d71704e62aff18524b95bf2a611bb3a4bff3c93b6d977f209e415a7d38d806341e144919022226ab1f53247d + b2sums = 78cf6da081b7f370bfe6b362e5f545cefcb770cc42eafd713de5befd8489c543a99e60112b09dc47b7867fdac8be91291cab68fc102f97834f248ce879782d6c pkgname = fluentd @@ -1,22 +1,50 @@ -# Maintainer: Daniel Nagy <danielnagy at gmx de> +# Maintainer: George Rawlinson <george@rawlinson.net.nz> +# Contributor: Daniel Nagy <danielnagy at gmx de> # Contributor: kusakata <shohei atmark kusakata period com> _gemname=fluentd pkgname=$_gemname -pkgver=1.11.0 +pkgver=1.11.3 pkgrel=1 -pkgdesc='Open source data collector designed to scale and simplify log management. It can collect, process and ship many kinds of data in near real-time.' -arch=('any') -url="http://fluentd.org/" -license=('Apache') -#depends=('ruby' 'ruby-cool.io' 'ruby-json' 'ruby-http_parser.rb-0.5' 'ruby-msgpack' 'ruby-sigdump' 'ruby-tzinfo-data' 'ruby-yajl-ruby') -depends=('ruby' 'ruby-json' 'ruby-msgpack' 'ruby-tzinfo' 'ruby-concurrent') +pkgdesc='Open source data collector designed to scale and simplify log management' +arch=(x86_64) +url='https://github.com/fluentd/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) options=(!emptydirs) -source=("https://rubygems.org/downloads/${_gemname}-${pkgver}.gem") -sha512sums=('14289ac3174ae417bafcf78e4574fd4f0d84799def9d47629ea36679d08d74c6c2eb4dd72b1915177f6eadd03e26779beda59c0e7bf9e6087f26bebcf8561daa') +source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem" + "$pkgname.conf" + "$pkgname.service" + "$pkgname.tmpfiles" + "$pkgname.sysusers") +noextract=("$_gemname-$pkgver.gem") +backup=('etc/fluentd/fluentd.conf') +b2sums=('872cfa5c7b92661c1b666d1633c76f3d5cf6e9bacb23b113900e5fcf77f61ad0ae4e7b8f2a52a78be7f6a9a13fad0b6883fb8fb425f00c961d36b643c6a223d8' + '73a3afc0e3692890087d03a778e26949af2d68c3eb3c0656b4d278c8f4e51f71678482a2dde58565df7ca3b9ce7d1f9dd4b1cc3f85d9c0ac2b7e6ccacd8e6ff5' + '80b220bdee1eb18f128db3514484fcfd13c8e2a99fb43f03f4e2ebfa0ddc893a7b128f1bcbdc9f43b235c0613cdce71ef7d12120131b419d9efeb89d51860c3a' + '8957872f805a274a56ae9e63896033a5fe175bd4d71704e62aff18524b95bf2a611bb3a4bff3c93b6d977f209e415a7d38d806341e144919022226ab1f53247d' + '78cf6da081b7f370bfe6b362e5f545cefcb770cc42eafd713de5befd8489c543a99e60112b09dc47b7867fdac8be91291cab68fc102f97834f248ce879782d6c') + package() { local _gemdir="$(ruby -e'puts Gem.default_dir')" -# gem install --ignore-dependencies --no-user-install --no-ri --no-rdoc -i "$pkgdir/$_gemdir" -n "$pkgdir/usr/bin" $_gemname-$pkgver.gem - gem install --no-user-install --no-document -i "$pkgdir/$_gemdir" -n "$pkgdir/usr/bin" $_gemname-$pkgver.gem - rm "$pkgdir/$_gemdir/cache/$_gemname-$pkgver.gem" + gem install --ignore-dependencies --no-user-install --no-document -i "$pkgdir/$_gemdir" -n "$pkgdir/usr/bin" $_gemname-$pkgver.gem + + # delete unnecessary files + cd "$pkgdir/$_gemdir" + find extensions/ -name *.so -delete + rm -f "cache/$_gemname-$pkgver.gem" + + # move documentation + cd "gems/$_gemname-$pkgver" + install -dm755 "$pkgdir/usr/share/doc/$pkgname" + mv -t "$pkgdir/usr/share/doc/$pkgname" \ + docs/SECURITY_AUDIT.pdf *.md *.yml + + # configuration + install -Dm644 -t "$pkgdir/etc/fluentd" "$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" } diff --git a/fluentd.conf b/fluentd.conf new file mode 100644 index 000000000000..3c393b451d4e --- /dev/null +++ b/fluentd.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 <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> diff --git a/fluentd.service b/fluentd.service new file mode 100644 index 000000000000..e3180a434e2d --- /dev/null +++ b/fluentd.service @@ -0,0 +1,25 @@ +[Unit] +Description=Fluentd daemon +After=network-online.target +Wants=network-online.target + +[Service] +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_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 +ExecStop=/usr/bin/kill -TERM ${MAINPID} +ExecReload=/usr/bin/kill -HUP ${MAINPID} +Restart=always +TimeoutStopSec=120 + +[Install] +WantedBy=multi-user.target diff --git a/fluentd.sysusers b/fluentd.sysusers new file mode 100644 index 000000000000..f9b9ccff2dd2 --- /dev/null +++ b/fluentd.sysusers @@ -0,0 +1 @@ +u fluentd - "Fluentd user" diff --git a/fluentd.tmpfiles b/fluentd.tmpfiles new file mode 100644 index 000000000000..7a81140aa01b --- /dev/null +++ b/fluentd.tmpfiles @@ -0,0 +1,2 @@ +d /run/fluentd 0755 fluentd fluentd - +d /var/log/fluentd 0755 fluentd fluentd - |