New port: databases/redis_exporter
Prometheus Exporter for Redis Metrics. Supports Redis 2.x, 3.x and 4.x WWW: https://github.com/oliver006/redis_exporter PR: 227750 Submitted by: Volodymyr Kostyrko <arcade@b1t.name>
This commit is contained in:
parent
9d8c38e6f3
commit
c27a7e99f9
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=470804
5 changed files with 95 additions and 0 deletions
|
@ -892,6 +892,7 @@
|
|||
SUBDIR += redigo
|
||||
SUBDIR += redis
|
||||
SUBDIR += redis-devel
|
||||
SUBDIR += redis_exporter
|
||||
SUBDIR += redisdesktopmanager
|
||||
SUBDIR += retcl
|
||||
SUBDIR += riak
|
||||
|
|
29
databases/redis_exporter/Makefile
Normal file
29
databases/redis_exporter/Makefile
Normal file
|
@ -0,0 +1,29 @@
|
|||
# Created by: Jev Björsell <ports@ecadlabs.com>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= redis_exporter
|
||||
PORTVERSION= 0.17.2
|
||||
DISTVERSIONPREFIX=v
|
||||
CATEGORIES= databases
|
||||
|
||||
MAINTAINER= arcade@b1t.name
|
||||
COMMENT= Prometheus exporter for redis stats
|
||||
|
||||
LICENSE= MIT
|
||||
|
||||
USES= go
|
||||
USE_GITHUB= yes
|
||||
|
||||
GH_ACCOUNT= oliver006
|
||||
|
||||
GO_PKGNAME= github.com/${GH_ACCOUNT}/${PORTNAME}
|
||||
GO_TARGET= github.com/${GH_ACCOUNT}/${PORTNAME}
|
||||
|
||||
PLIST_FILES= bin/redis_exporter
|
||||
|
||||
USE_RC_SUBR= redis_exporter
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKDIR}/bin/redis_exporter ${STAGEDIR}${PREFIX}/bin
|
||||
|
||||
.include <bsd.port.mk>
|
3
databases/redis_exporter/distinfo
Normal file
3
databases/redis_exporter/distinfo
Normal file
|
@ -0,0 +1,3 @@
|
|||
TIMESTAMP = 1515361500
|
||||
SHA256 (oliver006-redis_exporter-v0.17.2_GH0.tar.gz) = 6b4b43f3da5aa1c05dc4e7d09e22dec9c2374080cd87e4c2798e67012a1b4f37
|
||||
SIZE (oliver006-redis_exporter-v0.17.2_GH0.tar.gz) = 968613
|
59
databases/redis_exporter/files/redis_exporter.in
Normal file
59
databases/redis_exporter/files/redis_exporter.in
Normal file
|
@ -0,0 +1,59 @@
|
|||
#!/bin/sh
|
||||
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
# PROVIDE: redis_exporter
|
||||
# REQUIRE: LOGIN
|
||||
# KEYWORD: shutdown
|
||||
#
|
||||
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
|
||||
# to enable this service:
|
||||
#
|
||||
# redis_exporter_enable (bool): Set to NO by default.
|
||||
# Set it to YES to enable redis_exporter.
|
||||
# redis_exporter_user (string): Set user that redis_exporter will run under
|
||||
# Default is "nobody".
|
||||
# redis_exporter_group (string): Set group that redis_exporter will run under
|
||||
# Default is "nobody".
|
||||
# redis_exporter_args (string): Set extra arguments to pass to redis_exporter
|
||||
# Default is "".
|
||||
# redis_exporter_listen_address (string):Set ip:port that redis_exporter will listen on
|
||||
# Default is ":9121".
|
||||
# redis_exporter_server (string): Set server address to connect to
|
||||
# Default is "localhost".
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=redis_exporter
|
||||
rcvar=redis_exporter_enable
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
: ${redis_exporter_enable:="NO"}
|
||||
: ${redis_exporter_user:="nobody"}
|
||||
: ${redis_exporter_group:="nobody"}
|
||||
: ${redis_exporter_args:=""}
|
||||
: ${redis_exporter_listen_address:=":9121"}
|
||||
: ${redis_exporter_server:="localhost"}
|
||||
|
||||
pidfile=/var/run/redis_exporter.pid
|
||||
command="/usr/sbin/daemon"
|
||||
procname="%%PREFIX%%/bin/redis_exporter"
|
||||
command_args="-p ${pidfile} /usr/bin/env ${procname} \
|
||||
--redis.addr=${redis_exporter_server} \
|
||||
--web.listen-address=${redis_exporter_listen_address} \
|
||||
${redis_exporter_args}"
|
||||
|
||||
start_precmd=redis_exporter_startprecmd
|
||||
|
||||
redis_exporter_startprecmd()
|
||||
{
|
||||
if [ ! -e ${pidfile} ]; then
|
||||
install -o ${redis_exporter_user} -g ${redis_exporter_group} /dev/null ${pidfile};
|
||||
fi
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
3
databases/redis_exporter/pkg-descr
Normal file
3
databases/redis_exporter/pkg-descr
Normal file
|
@ -0,0 +1,3 @@
|
|||
Prometheus Exporter for Redis Metrics. Supports Redis 2.x, 3.x and 4.x
|
||||
|
||||
WWW: https://github.com/oliver006/redis_exporter
|
Loading…
Reference in a new issue