diff options
-rw-r--r-- | sysutils/Makefile | 1 | ||||
-rw-r--r-- | sysutils/metricbeat/Makefile | 33 | ||||
-rw-r--r-- | sysutils/metricbeat/distinfo | 3 | ||||
-rw-r--r-- | sysutils/metricbeat/files/metricbeat.in | 37 | ||||
-rw-r--r-- | sysutils/metricbeat/files/patch-libbeat_scripts_Makefile | 11 | ||||
-rw-r--r-- | sysutils/metricbeat/pkg-descr | 12 | ||||
-rw-r--r-- | sysutils/metricbeat/pkg-plist | 2 |
7 files changed, 99 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile index 4413b930089b..aed7f7e291f7 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -596,6 +596,7 @@ SUBDIR += memtest86 SUBDIR += memtest86+ SUBDIR += metalog + SUBDIR += metricbeat SUBDIR += mfid SUBDIR += mgeupsd SUBDIR += minimunin diff --git a/sysutils/metricbeat/Makefile b/sysutils/metricbeat/Makefile new file mode 100644 index 000000000000..cde89c3f67dc --- /dev/null +++ b/sysutils/metricbeat/Makefile @@ -0,0 +1,33 @@ +# Created by: Palle Girgensohn <girgen@FreeBSD.org> +# $FreeBSD$ + +PORTNAME= metricbeat +PORTVERSION= 5.0.2 +DISTVERSIONPREFIX=v +CATEGORIES= sysutils + +MAINTAINER= girgen@FreeBSD.org +COMMENT= Collect metrics from your systems and services + +LICENSE= APACHE20 + +USE_GITHUB= yes +GH_ACCOUNT= elastic +GH_PROJECT= beats + +USES= gmake go +GO_PKGNAME= github.com/${GH_ACCOUNT}/${GH_PROJECT} +GO_TARGETS= ${PORTNAME} + +USE_RC_SUBR= ${PORTNAME} + +do-build: + cd ${GO_WRKSRC}; ${SETENV} ${MAKE_ENV} ${GO_ENV} ${GMAKE} -C ${GO_TARGETS} + +do-install: + ${INSTALL_PROGRAM} ${GO_WRKSRC}/${GO_TARGETS}/${GO_TARGETS} \ + ${STAGEDIR}${PREFIX}/sbin + ${INSTALL_DATA} ${WRKSRC}/${GO_TARGETS}/${GO_TARGETS}.yml \ + ${STAGEDIR}${PREFIX}/etc/${GO_TARGETS}.yml.sample + +.include <bsd.port.mk> diff --git a/sysutils/metricbeat/distinfo b/sysutils/metricbeat/distinfo new file mode 100644 index 000000000000..3e411680ea08 --- /dev/null +++ b/sysutils/metricbeat/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1481067807 +SHA256 (elastic-beats-v5.0.2_GH0.tar.gz) = feef1e53b978c12b3b3c552534fd666839df5d7d3b974e16636360ca6c4ab7c0 +SIZE (elastic-beats-v5.0.2_GH0.tar.gz) = 15774694 diff --git a/sysutils/metricbeat/files/metricbeat.in b/sysutils/metricbeat/files/metricbeat.in new file mode 100644 index 000000000000..e089de4280da --- /dev/null +++ b/sysutils/metricbeat/files/metricbeat.in @@ -0,0 +1,37 @@ +#!/bin/sh +# $FreeBSD$ + +# PROVIDE: metricbeat +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable metricbeat: +# +# metricbeat_enable (bool): Set to YES to enable metricbeat +# Default: NO +# metricbeat_flags (str): Extra flags passed to metricbeat +# metricbeat_conf (str): metricbeat configuration file +# Default: ${PREFIX}/etc/metricbeat.yml + +. /etc/rc.subr + +name="metricbeat" +rcvar=${name}_enable +load_rc_config $name + +: ${metricbeat_enable:="NO"} +: ${metricbeat_config:="%%PREFIX%%/etc/${name}.yml"} + +# daemon +start_precmd=metricbeat_prestart +command=/usr/sbin/daemon +pidfile="/var/run/${name}" +command_args="-rP ${pidfile} %%PREFIX%%/sbin/${name} -c ${metricbeat_config}" + +metricbeat_prestart() { +# Have to empty rc_flags so they don't get passed to daemon(8) + rc_flags="" +} + +run_rc_command "$1" diff --git a/sysutils/metricbeat/files/patch-libbeat_scripts_Makefile b/sysutils/metricbeat/files/patch-libbeat_scripts_Makefile new file mode 100644 index 000000000000..2b614a2017ec --- /dev/null +++ b/sysutils/metricbeat/files/patch-libbeat_scripts_Makefile @@ -0,0 +1,11 @@ +--- libbeat/scripts/Makefile.orig 2016-12-08 18:08:06.201040000 +0100 ++++ libbeat/scripts/Makefile 2016-12-08 18:08:14.835100000 +0100 +@@ -30,7 +30,7 @@ + GOFILES = $(shell find . -type f -name '*.go') + GOFILES_NOVENDOR = $(shell find . -type f -name '*.go' -not -path "*/vendor/*") + GOFILES_ALL = $(GOFILES) $(shell find $(ES_BEATS) -type f -name '*.go') +-SHELL=bash ++SHELL=sh + ES_HOST?="elasticsearch" + PWD=$(shell pwd) + BUILD_DIR?=$(shell pwd)/build diff --git a/sysutils/metricbeat/pkg-descr b/sysutils/metricbeat/pkg-descr new file mode 100644 index 000000000000..cbc5f1369ee3 --- /dev/null +++ b/sysutils/metricbeat/pkg-descr @@ -0,0 +1,12 @@ +Beats is the platform for building lightweight, open source data +shippers for many types of operational data you want to enrich with +Logstash, search and analyze in Elasticsearch, and visualize in Kibana. +Whether you're interested in log files, infrastructure metrics, network +packets, or any other type of data, Beats serves as the foundation for +keeping a beat on your data. + +Metricbeat collects metrics from your systems and services. From CPU to +memory, Redis to Nginx, and much more, Metricbeat is a lightweight way to +send system statistics. + +WWW: https://www.elastic.co/products/beats/metricbeat diff --git a/sysutils/metricbeat/pkg-plist b/sysutils/metricbeat/pkg-plist new file mode 100644 index 000000000000..4aeb965f609a --- /dev/null +++ b/sysutils/metricbeat/pkg-plist @@ -0,0 +1,2 @@ +sbin/metricbeat +@sample etc/metricbeat.yml.sample |