From owner-svn-ports-head@freebsd.org Thu Dec 8 18:14:56 2016 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80336C6D400; Thu, 8 Dec 2016 18:14:56 +0000 (UTC) (envelope-from girgen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 40F4B141; Thu, 8 Dec 2016 18:14:56 +0000 (UTC) (envelope-from girgen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uB8IEtZR091291; Thu, 8 Dec 2016 18:14:55 GMT (envelope-from girgen@FreeBSD.org) Received: (from girgen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uB8IEsZC091284; Thu, 8 Dec 2016 18:14:54 GMT (envelope-from girgen@FreeBSD.org) Message-Id: <201612081814.uB8IEsZC091284@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: girgen set sender to girgen@FreeBSD.org using -f From: Palle Girgensohn Date: Thu, 8 Dec 2016 18:14:54 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r428147 - in head/sysutils: . metricbeat metricbeat/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Dec 2016 18:14:56 -0000 Author: girgen Date: Thu Dec 8 18:14:54 2016 New Revision: 428147 URL: https://svnweb.freebsd.org/changeset/ports/428147 Log: Add metricbeat. Collect 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. Added: head/sysutils/metricbeat/ head/sysutils/metricbeat/Makefile (contents, props changed) head/sysutils/metricbeat/distinfo (contents, props changed) head/sysutils/metricbeat/files/ head/sysutils/metricbeat/files/metricbeat.in (contents, props changed) head/sysutils/metricbeat/files/patch-libbeat_scripts_Makefile (contents, props changed) head/sysutils/metricbeat/pkg-descr (contents, props changed) head/sysutils/metricbeat/pkg-plist (contents, props changed) Modified: head/sysutils/Makefile Modified: head/sysutils/Makefile ============================================================================== --- head/sysutils/Makefile Thu Dec 8 17:46:28 2016 (r428146) +++ head/sysutils/Makefile Thu Dec 8 18:14:54 2016 (r428147) @@ -596,6 +596,7 @@ SUBDIR += memtest86 SUBDIR += memtest86+ SUBDIR += metalog + SUBDIR += metricbeat SUBDIR += mfid SUBDIR += mgeupsd SUBDIR += minimunin Added: head/sysutils/metricbeat/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/metricbeat/Makefile Thu Dec 8 18:14:54 2016 (r428147) @@ -0,0 +1,33 @@ +# Created by: Palle Girgensohn +# $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 Added: head/sysutils/metricbeat/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/metricbeat/distinfo Thu Dec 8 18:14:54 2016 (r428147) @@ -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 Added: head/sysutils/metricbeat/files/metricbeat.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/metricbeat/files/metricbeat.in Thu Dec 8 18:14:54 2016 (r428147) @@ -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" Added: head/sysutils/metricbeat/files/patch-libbeat_scripts_Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/metricbeat/files/patch-libbeat_scripts_Makefile Thu Dec 8 18:14:54 2016 (r428147) @@ -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 Added: head/sysutils/metricbeat/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/metricbeat/pkg-descr Thu Dec 8 18:14:54 2016 (r428147) @@ -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 Added: head/sysutils/metricbeat/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/metricbeat/pkg-plist Thu Dec 8 18:14:54 2016 (r428147) @@ -0,0 +1,2 @@ +sbin/metricbeat +@sample etc/metricbeat.yml.sample