mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-23 04:23:08 +00:00
A network daemon that runs on the Node.js platform and listens for statistics,
like counters and timers, sent over UDP and sends aggregates to one or more pluggable backend services (e.g., Graphite). WWW: https://github.com/etsy/statsd PR: ports/171855 Submitted by: kimor79@yahoo.com
This commit is contained in:
parent
3f80fdea42
commit
ccb3a11c4c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=337198
1
GIDs
1
GIDs
@ -199,6 +199,7 @@ jenkins:*:818:
|
||||
openacs:*:820:
|
||||
dotlrn:*:821:
|
||||
polw:*:825:
|
||||
statsd:*:826:
|
||||
netdisco:*:840:
|
||||
munin:*:842:
|
||||
dahdi:*:843:asterisk
|
||||
|
1
UIDs
1
UIDs
@ -206,6 +206,7 @@ jenkins:*:818:818::0:0:Jenkins CI:/usr/local/jenkins:/bin/sh
|
||||
openacs:*:820:820::0:0:OpenACS Daemon User:/nonexistent:/usr/sbin/nologin
|
||||
dotlrn:*:821:821::0:0:.LRN Daemon User:/nonexistent:/usr/sbin/nologin
|
||||
polw:*:825:825::0:0:Policyd-weight Cache Owner:/nonexistent:/sbin/nologin
|
||||
statsd:*:826:826::0:0:Statsd Daemon:/nonexistent:/sbin/nologin
|
||||
netdisco:*:840:840::0:0:netdisco daemon:/nonexistent:/usr/sbin/nologin
|
||||
munin:*:842:842::0:0:Munin:/var/munin:/usr/sbin/nologin
|
||||
fossy:*:901:901::0:0:FOSSology user:/usr/local/share/fossology:/usr/local/bin/bash
|
||||
|
@ -307,6 +307,7 @@
|
||||
SUBDIR += softflowd
|
||||
SUBDIR += spectools
|
||||
SUBDIR += ssgless
|
||||
SUBDIR += statsd
|
||||
SUBDIR += subcalc
|
||||
SUBDIR += sysmon
|
||||
SUBDIR += tcpreplay
|
||||
|
40
net-mgmt/statsd/Makefile
Normal file
40
net-mgmt/statsd/Makefile
Normal file
@ -0,0 +1,40 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= statsd
|
||||
PORTVERSION= 0.7.0
|
||||
CATEGORIES= net-mgmt
|
||||
MASTER_SITES= https://github.com/etsy/${PORTNAME}/archive/v${PORTVERSION}.tar.gz?dummy=/
|
||||
|
||||
MAINTAINER= kimor79@yahoo.com
|
||||
COMMENT= Simple daemon for easy stats aggregation
|
||||
|
||||
RUN_DEPENDS= node:${PORTSDIR}/www/node
|
||||
|
||||
NO_BUILD= yes
|
||||
FETCH_ARGS= -Fpr
|
||||
|
||||
USERS= statsd
|
||||
GROUPS= statsd
|
||||
USE_RC_SUBR= statsd
|
||||
SUB_FILES+= statsd
|
||||
SUB_LIST+= USERS=${USERS} GROUPS=${GROUPS}
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} \
|
||||
-e 's;\./;${DATADIR}/;' \
|
||||
${WRKSRC}/stats.js
|
||||
|
||||
do-install:
|
||||
${MKDIR} ${STAGEDIR}${DATADIR}/backends
|
||||
(cd ${WRKSRC}/backends/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${DATADIR}/backends)
|
||||
${MKDIR} ${STAGEDIR}${DATADIR}/lib
|
||||
(cd ${WRKSRC}/lib/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${DATADIR}/lib)
|
||||
${CP} ${WRKSRC}/exampleConfig.js ${STAGEDIR}${DATADIR}/exampleConfig.js
|
||||
${CP} ${WRKSRC}/exampleProxyConfig.js ${STAGEDIR}${DATADIR}/exampleProxyConfig.js
|
||||
${CP} ${WRKSRC}/stats.js ${STAGEDIR}${DATADIR}/stats.js
|
||||
|
||||
post-install:
|
||||
@${INSTALL_DATA} ${WRKSRC}/exampleConfig.js \
|
||||
${STAGEDIR}${PREFIX}/etc/statsd.js.sample
|
||||
|
||||
.include <bsd.port.mk>
|
2
net-mgmt/statsd/distinfo
Normal file
2
net-mgmt/statsd/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (statsd-0.7.0.tar.gz) = a398f08eac233e5d58b11d22febd2afee7d27f89112d97fe0035eda77aee065e
|
||||
SIZE (statsd-0.7.0.tar.gz) = 51073
|
40
net-mgmt/statsd/files/statsd.in
Normal file
40
net-mgmt/statsd/files/statsd.in
Normal file
@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
# PROVIDE: statsd
|
||||
# REQUIRE: NETWORK
|
||||
# KEYWORD: shutdown
|
||||
|
||||
#
|
||||
# Add the following line to /etc/rc.conf to enable mysql:
|
||||
# statsd_enable (bool): Set to "NO" by default.
|
||||
# Set it to "YES" to enable statsd.
|
||||
# statsd_config (str): Default to "%%PREFIX%%/etc/statsd.js"
|
||||
# Statsd configuration file.
|
||||
# statsd_user (str): Default to "statsd".
|
||||
# User to run as.
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=statsd
|
||||
rcvar=statsd_enable
|
||||
load_rc_config $name
|
||||
|
||||
# set defaults
|
||||
: ${statsd_enable:=NO}
|
||||
: ${statsd_config="%%PREFIX%%/etc/statsd.js"}
|
||||
: ${statsd_user="%%USERS%%"}
|
||||
|
||||
pidfile="/var/run/statsd/${name}.pid"
|
||||
|
||||
required_files="${statsd_config}"
|
||||
|
||||
command=/usr/sbin/daemon
|
||||
command_args="-cf -p ${pidfile} %%PREFIX%%/bin/node %%DATADIR%%/stats.js ${statsd_config}"
|
||||
procname="${name}"
|
||||
stop_postcmd="rm -f $pidfile"
|
||||
start_precmd="install -d -o statsd -g statsd ${pidfile%/*}"
|
||||
|
||||
run_rc_command "$1"
|
5
net-mgmt/statsd/pkg-descr
Normal file
5
net-mgmt/statsd/pkg-descr
Normal file
@ -0,0 +1,5 @@
|
||||
A network daemon that runs on the Node.js platform and listens for statistics,
|
||||
like counters and timers, sent over UDP and sends aggregates to one or more
|
||||
pluggable backend services (e.g., Graphite).
|
||||
|
||||
WWW: https://github.com/etsy/statsd
|
19
net-mgmt/statsd/pkg-plist
Normal file
19
net-mgmt/statsd/pkg-plist
Normal file
@ -0,0 +1,19 @@
|
||||
%%DATADIR%%/backends/console.js
|
||||
%%DATADIR%%/backends/graphite.js
|
||||
%%DATADIR%%/backends/repeater.js
|
||||
%%DATADIR%%/exampleConfig.js
|
||||
%%DATADIR%%/exampleProxyConfig.js
|
||||
%%DATADIR%%/lib/config.js
|
||||
%%DATADIR%%/lib/helpers.js
|
||||
%%DATADIR%%/lib/logger.js
|
||||
%%DATADIR%%/lib/mgmt_console.js
|
||||
%%DATADIR%%/lib/process_metrics.js
|
||||
%%DATADIR%%/lib/process_mgmt.js
|
||||
%%DATADIR%%/lib/set.js
|
||||
%%DATADIR%%/stats.js
|
||||
@unexec if cmp -s %D/etc/statsd.js.sample %D/etc/statsd.js; then rm -f %D/etc/statsd.js; fi
|
||||
etc/statsd.js.sample
|
||||
@exec [ -f %B/statsd.js ] || cp %B/%f %B/statsd.js
|
||||
@dirrmtry %%DATADIR%%/lib
|
||||
@dirrmtry %%DATADIR%%/backends
|
||||
@dirrmtry %%DATADIR%%
|
Loading…
Reference in New Issue
Block a user