From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 54FC11384B4 for ; Wed, 9 Dec 2015 08:18:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CAC8D21C08A; Wed, 9 Dec 2015 08:18:35 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2B01721C088 for ; Wed, 9 Dec 2015 08:18:35 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 95D8E340806 for ; Wed, 9 Dec 2015 08:18:31 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5C5B5C6A for ; Wed, 9 Dec 2015 08:18:29 +0000 (UTC) From: "Ian Delaney" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ian Delaney" Message-ID: <1449491397.c846729fc6ea0db39ec9ea2496cc55a00bbcfdd7.idella4@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/filebeat-bin/, app-admin/filebeat-bin/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-admin/filebeat-bin/Manifest app-admin/filebeat-bin/filebeat-bin-1.0.0.ebuild app-admin/filebeat-bin/files/filebeat.confd app-admin/filebeat-bin/files/filebeat.initd app-admin/filebeat-bin/files/filebeat.yml.example app-admin/filebeat-bin/metadata.xml X-VCS-Directories: app-admin/filebeat-bin/files/ app-admin/filebeat-bin/ X-VCS-Committer: idella4 X-VCS-Committer-Name: Ian Delaney X-VCS-Revision: c846729fc6ea0db39ec9ea2496cc55a00bbcfdd7 X-VCS-Branch: master Date: Wed, 9 Dec 2015 08:18:29 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 74cc7dfc-e795-43e4-ac9f-9a0764b0fd13 X-Archives-Hash: 3a18eedc5655af6cda80efd8af2ee3eb commit: c846729fc6ea0db39ec9ea2496cc55a00bbcfdd7 Author: Tomas Mozes sygic com> AuthorDate: Mon Dec 7 12:29:57 2015 +0000 Commit: Ian Delaney gentoo org> CommitDate: Mon Dec 7 12:29:57 2015 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c846729f app-admin/filebeat-bin: new ebuild app-admin/filebeat-bin/Manifest | 2 + app-admin/filebeat-bin/filebeat-bin-1.0.0.ebuild | 53 +++++++++++++++++++++++ app-admin/filebeat-bin/files/filebeat.confd | 5 +++ app-admin/filebeat-bin/files/filebeat.initd | 47 ++++++++++++++++++++ app-admin/filebeat-bin/files/filebeat.yml.example | 14 ++++++ app-admin/filebeat-bin/metadata.xml | 10 +++++ 6 files changed, 131 insertions(+) diff --git a/app-admin/filebeat-bin/Manifest b/app-admin/filebeat-bin/Manifest new file mode 100644 index 0000000..430abbc --- /dev/null +++ b/app-admin/filebeat-bin/Manifest @@ -0,0 +1,2 @@ +DIST filebeat-1.0.0-i686.tar.gz 3069805 SHA256 f184fe7d5cd566bdf1a48f79cd52c0d3ef960782b2076e8df67836e0ed36dc37 SHA512 c4df33524249aef574f923c67be56e22f8eb24a51933178a90b080cc59aec772052c653bf551f198c08e63c7cb03fa9f346dc7c5cee31c586270c532655486df WHIRLPOOL e2be905de1aa0749bfb419bff50fc1952dc7dc5b2d127045709f08e6e6cb38faae1372d64515c4157949138cdbd10888aea0e0fe4e98f57d69a73873eb578483 +DIST filebeat-1.0.0-x86_64.tar.gz 3260387 SHA256 f0bcc2dc9ae720a672fe5f4b22c0d132f7131d4d07484f4100453c7122f0561a SHA512 823450554ec6d7ae43ff064e967ad8d5bef95077404738feac7f7ae5ef74000e051042ea3734423b883bab9102d90a4e707d9c0d03c88abe2f34862f02d01ed4 WHIRLPOOL 5a6b9b532d090a87724f17af3727cca772f48602c39cb9d82593f3c4f4ab722f295db647ba4d0152bf3baa41134b5561c2e9655a02d47c25e228af64122e3609 diff --git a/app-admin/filebeat-bin/filebeat-bin-1.0.0.ebuild b/app-admin/filebeat-bin/filebeat-bin-1.0.0.ebuild new file mode 100644 index 0000000..9d51925 --- /dev/null +++ b/app-admin/filebeat-bin/filebeat-bin-1.0.0.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +MY_PN=${PN/-bin/} +MY_P=${MY_PN}-${PV} + +DESCRIPTION="Lightweight log shipper for Logstash and Elasticsearch" +HOMEPAGE="https://www.elastic.co/products/beats" +SRC_URI="amd64? ( https://download.elastic.co/beats/${MY_PN}/${MY_P}-x86_64.tar.gz ) + x86? ( https://download.elastic.co/beats/${MY_PN}/${MY_P}-i686.tar.gz )" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="" +RDEPEND="${DEPEND}" + +src_unpack() { + if use amd64; then + S="${WORKDIR}/${MY_P}-x86_64" + elif use x86; then + S="${WORKDIR}/${MY_P}-i686" + fi + + default +} + +src_install() { + keepdir /etc/${MY_PN} + keepdir /var/lib/${MY_PN} + + fperms 0750 /var/lib/${MY_PN} + + insinto /etc/${MY_PN} + doins "${FILESDIR}/filebeat.yml.example" + + newconfd "${FILESDIR}/${MY_PN}.confd" ${MY_PN} + newinitd "${FILESDIR}/${MY_PN}.initd" ${MY_PN} + + dobin ${MY_PN} +} + +pkg_postinst() { + if [[ ! -e /etc/${MY_PN}/${MY_PN}.yml ]]; then + elog "Before starting filebeat, you need to create a configuration file at:" + elog "/etc/${MY_PN}/${MY_PN}.yml" + fi +} diff --git a/app-admin/filebeat-bin/files/filebeat.confd b/app-admin/filebeat-bin/files/filebeat.confd new file mode 100644 index 0000000..188f447 --- /dev/null +++ b/app-admin/filebeat-bin/files/filebeat.confd @@ -0,0 +1,5 @@ +#FILEBEAT_USER="" +#FILEBEAT_GROUP="" +#FILEBEAT_CONFIG="" +#FILEBEAT_STATEDIR="" +#FILEBEAT_OPTS="" diff --git a/app-admin/filebeat-bin/files/filebeat.initd b/app-admin/filebeat-bin/files/filebeat.initd new file mode 100644 index 0000000..3ffc340 --- /dev/null +++ b/app-admin/filebeat-bin/files/filebeat.initd @@ -0,0 +1,47 @@ +#!/sbin/openrc-run +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +FILEBEAT_USER="${FILEBEAT_USER:-root}" +FILEBEAT_GROUP="${FILEBEAT_GROUP:-root}" +FILEBEAT_CONFIG="${FILEBEAT_CONFIG:-/etc/filebeat/filebeat.yml}" +FILEBEAT_STATEDIR="${FILEBEAT_STATEDIR:-/var/lib/filebeat}" +FILEBEAT_OPTS="${FILEBEAT_OPTS:-}" + +command="/usr/bin/filebeat" +command_args="${FILEBEAT_OPTS}" +extra_commands="checkconfig" +command_background="true" +start_stop_daemon_args="--user ${FILEBEAT_USER}:${FILEBEAT_GROUP} \ + --chdir ${FILEBEAT_STATEDIR}" +pidfile="/run/filebeat/filebeat.pid" + +depend() { + use net + after elasticsearch +} + +checkconfig() { + if [ ! -e ${FILEBEAT_CONFIG} ]; then + eend "Please create a configuration file at ${FILEBEAT_CONFIG}" + return 1 + fi + + ebegin "Checking your configuration" + ${command} ${command_args} -configtest + eend $? "Configuration error. Please fix your configuration files." +} + +start_pre() { + checkconfig || return 1 + + checkpath -d -o "${FILEBEAT_USER}":"${FILEBEAT_GROUP}" -m750 "$(dirname "${pidfile}")" + checkpath -d -o "${FILEBEAT_USER}":"${FILEBEAT_GROUP}" -m750 "${FILEBEAT_STATEDIR}" +} + +stop() { + ebegin "Stopping filebeat" + start-stop-daemon --stop \ + --pidfile=${pidfile} \ + --retry=TERM/5/KILL/5 +} diff --git a/app-admin/filebeat-bin/files/filebeat.yml.example b/app-admin/filebeat-bin/files/filebeat.yml.example new file mode 100644 index 0000000..06c599c --- /dev/null +++ b/app-admin/filebeat-bin/files/filebeat.yml.example @@ -0,0 +1,14 @@ +filebeat: + prospectors: + - + paths: + - /var/log/*.log + - /var/log/debug + - /var/log/messages + - /var/log/syslog + input_type: log + +output: + elasticsearch: + hosts: ["localhost:9200"] + index: "logstash" diff --git a/app-admin/filebeat-bin/metadata.xml b/app-admin/filebeat-bin/metadata.xml new file mode 100644 index 0000000..fe6f9cc --- /dev/null +++ b/app-admin/filebeat-bin/metadata.xml @@ -0,0 +1,10 @@ + + + + proxy-maintainers + + hydrapolic@gmail.com + Tomas Mozes + Proxy maintainer + +