Initial commit

This commit is contained in:
yo 2020-08-30 19:59:04 +02:00
commit 2085453975
5 changed files with 114 additions and 0 deletions

40
Makefile Normal file
View File

@ -0,0 +1,40 @@
# $FreeBSD: head/sysutils/logstash_exporter/Makefile 517745 2019-11-16 12:52:39Z dmgk $
PORTNAME= logstash_exporter
PORTVERSION= 7.3.0.0
PORTREVISION= 1
CATEGORIES= sysutils
MAINTAINER= johan@nosd.in
COMMENT= Export logstash7.3+ metrics in Prometheus format
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= go
USE_GITHUB= yes
GH_ACCOUNT= sequra
GH_PROJECT= logstash_exporter
USERS= prometheus
GROUPS= prometheus
GH_TUPLE= prometheus:client_golang:v0.9.2:client_golang/vendor/github.com/prometheus/client_golang \
prometheus:client_model:v0.2.0:client_model/vendor/github.com/prometheus/client_model \
prometheus:common:v0.2.0:common/vendor/github.com/prometheus/common \
prometheus:procfs:v0.0.11:procfs/vendor/github.com/prometheus/procfs \
sirupsen:logrus:v1.3.0:logrus/vendor/github.com/sirupsen/logrus \
stretchr:testify:v1.3.0:testify/vendor/github.com/stretchr/testify \
golang:crypto:69ecbb4:crypto/vendor/golang.org/x/crypto \
golang:sync:6e8e738:sync/vendor/golang.org/x/sync \
alecthomas:kingpin:v2.2.6:kingpin/vendor/github.com/alecthomas/kingpin
GO_PKGNAME= github.com/${GH_ACCOUNT}/${GH_PROJECT}
GH_TAGNAME= v7.3.0.0
USE_RC_SUBR= logstash_exporter
pre-test:
${SETENV} GOPATH="${WRKDIR}"
.include <bsd.port.mk>

21
distinfo Normal file
View File

@ -0,0 +1,21 @@
TIMESTAMP = 1598808741
SHA256 (sequra-logstash_exporter-7.3.0.0-v7.3.0.0_GH0.tar.gz) = 85a5eb858b059469537d9253b861857f126c37504bdc96dd92e4329614169504
SIZE (sequra-logstash_exporter-7.3.0.0-v7.3.0.0_GH0.tar.gz) = 18644
SHA256 (prometheus-client_golang-v0.9.2_GH0.tar.gz) = 5f6ca8740a08622ae0a19c32b1026b8233bfd943a1f4af34963d326ab5fa94e5
SIZE (prometheus-client_golang-v0.9.2_GH0.tar.gz) = 130109
SHA256 (prometheus-client_model-v0.2.0_GH0.tar.gz) = 4ab1be9cdfa702d7f49beeb09a256bcc6a2aad55e8a0a37e7732a46934264e12
SIZE (prometheus-client_model-v0.2.0_GH0.tar.gz) = 10986
SHA256 (prometheus-common-v0.2.0_GH0.tar.gz) = 3a02a3c8d881ef0be78fc58d63d14979ce0226f91ab52b2d67a11bc120e054dd
SIZE (prometheus-common-v0.2.0_GH0.tar.gz) = 88665
SHA256 (prometheus-procfs-v0.0.11_GH0.tar.gz) = fd84664db471a0d08d721abc383665fe9a61a56001ff2c8b3b3734f8146bf0ae
SIZE (prometheus-procfs-v0.0.11_GH0.tar.gz) = 135114
SHA256 (sirupsen-logrus-v1.3.0_GH0.tar.gz) = f80cfa34148c4e25c4d3030edb1fd9878d666eca7e900f1aaf0d87c67ecabe51
SIZE (sirupsen-logrus-v1.3.0_GH0.tar.gz) = 38452
SHA256 (stretchr-testify-v1.3.0_GH0.tar.gz) = 0cd9c199a72b8d80621624b37c0ed5ac724352d458506a31dfa86710551e7fc5
SIZE (stretchr-testify-v1.3.0_GH0.tar.gz) = 102859
SHA256 (golang-crypto-69ecbb4_GH0.tar.gz) = 5b51e1edb538bba4dba3138e8f466ea6af4bbcf4ccd679e93488e2a614edeab3
SIZE (golang-crypto-69ecbb4_GH0.tar.gz) = 1719921
SHA256 (golang-sync-6e8e738_GH0.tar.gz) = d55babdafd20faf5055d7d227c01b32e60157a96af46f977d98fff744f95a233
SIZE (golang-sync-6e8e738_GH0.tar.gz) = 17291
SHA256 (alecthomas-kingpin-v2.2.6_GH0.tar.gz) = 4624eae43489de8a71ea60efaf6744c581b6bd62909f7514c484c1ea0efaba5a
SIZE (alecthomas-kingpin-v2.2.6_GH0.tar.gz) = 44383

View File

@ -0,0 +1,48 @@
#!/bin/sh
# $FreeBSD: head/sysutils/logstash_exporter/files/logstash_exporter.in 529909 2020-03-30 19:18:03Z decke $
#
# PROVIDE: logstash_exporter
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# logstash_exporter_enable (bool): Set to "YES" to enable logstash_exporter.
# (default: "NO")
#
# logstash_exporter_listen (str): Exporter listening address
# (default: ":9198")
#
# logstash_exporter_endpoint (str): Protocol, host and port on which logstash
# metrics API listen
# (default: "http://localhost:9600")
#
# logstash_exporter_log_level (str): Only log messages with the given severity
# or above. [debug,info,warn,error,fatal]
# (default: "info")
#
# logstash_exporter_log_format (str): Set log target and format. Exemple:
# "logger:syslog?appname=bob&local=7"
# or "logger:stdout?json=true"
# (default: "logger:stderr")
#
. /etc/rc.subr
name=logstash_exporter
rcvar=logstash_exporter_enable
load_rc_config $name
: ${logstash_exporter_enable="NO"}
: ${logstash_exporter_listen=":9198"}
: ${logstash_exporter_endpoint="http://localhost:9600"}
: ${logstash_exporter_log_level="info"}
: ${logstash_exporter_log_format="logger:stderr"}
: ${logstash_exporter_pidfile:="/var/run/logstash_exporter.pid"}
: ${logstash_exporter_user:="prometheus"}
command="/usr/local/bin/logstash_exporter"
command_args="--logstash.endpoint=\${logstash_exporter_endpoint} --web.listen-address=\${logstash_exporter_listen} --log.level=\${logstash_exporter_log_level} --log.format=\${logstash_exporter_log_format}"
start_cmd="/usr/sbin/daemon -u ${logstash_exporter_user} ${command} ${command_args}"
run_rc_command "$1"

3
pkg-descr Normal file
View File

@ -0,0 +1,3 @@
Export logstash 7.3+ metrics in Prometheus format.
WWW: https://github.com/sequra/logstash_exporter

2
pkg-plist Normal file
View File

@ -0,0 +1,2 @@
bin/logstash_exporter
etc/rc.d/logstash_exporter