telegraf: initial commit, version 1.29.5
This commit is contained in:
parent
5438458b4e
commit
8302272720
8
telegraf/.footprint
Normal file
8
telegraf/.footprint
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
drwxr-xr-x root/root etc/
|
||||||
|
drwxr-xr-x root/root etc/rc.d/
|
||||||
|
-rwxr-xr-x root/root etc/rc.d/telegraf
|
||||||
|
drwxr-xr-x root/root etc/telegraf/
|
||||||
|
-rw-r--r-- root/root etc/telegraf/telegraf.conf
|
||||||
|
drwxr-xr-x root/root usr/
|
||||||
|
drwxr-xr-x root/root usr/bin/
|
||||||
|
-rwxr-xr-x root/root usr/bin/telegraf
|
6
telegraf/.signature
Normal file
6
telegraf/.signature
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
untrusted comment: verify with /etc/ports/contrib.pub
|
||||||
|
RWSagIOpLGJF31DnKZYwXxsZN/0u/bAS3FzQgTeU0cXL40VCvQYmREDpfXm1xGa5qSKozoVUshPQilvjniwwClLXnnJeZ6uSQAk=
|
||||||
|
SHA256 (Pkgfile) = b0af9e30ebd218c702470191ca34932c5c93fc5816e3e04e1849f4dc5142a4ae
|
||||||
|
SHA256 (.footprint) = 26601b6d1ad4a15d9c7943381fb32d586894faea27b535335bd35c6754c3c57d
|
||||||
|
SHA256 (telegraf-1.29.5.tar.gz) = ed8ba3117ebf9cc9c96f12d98b1a71fd1c39a7be63fe316391dfffcc3398c30d
|
||||||
|
SHA256 (telegraf.service) = 60efd90957298cca43c15204a636006f597a8768755d0593adbdf1824f0ab706
|
31
telegraf/Pkgfile
Normal file
31
telegraf/Pkgfile
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
# Description: a server-based agent for collecting and sending all metrics
|
||||||
|
# URL: https://www.influxdata.com/time-series-platform/telegraf/
|
||||||
|
# Maintainer: Tim Biermann, tbier at posteo dot de
|
||||||
|
# Depends on: go
|
||||||
|
|
||||||
|
name=telegraf
|
||||||
|
version=1.29.5
|
||||||
|
release=1
|
||||||
|
source=(https://github.com/influxdata/telegraf/archive/refs/tags/v$version.tar.gz
|
||||||
|
telegraf.service)
|
||||||
|
renames=($name-$version.tar.gz SKIP)
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd $name-$version
|
||||||
|
|
||||||
|
export CGO_CPPFLAGS="${CPPFLAGS}"
|
||||||
|
export CGO_CFLAGS="${CFLAGS}"
|
||||||
|
export CGO_CXXFLAGS="${CXXFLAGS}"
|
||||||
|
export CGO_LDFLAGS="${LDFLAGS}"
|
||||||
|
|
||||||
|
mkdir "$PKGMK_SOURCE_DIR/gopath" || true
|
||||||
|
export GOPATH="$PKGMK_SOURCE_DIR/gopath"
|
||||||
|
export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
|
||||||
|
_LDFLAGS="-X main.goos=$(go env GOOS) -X main.goarch=$(go env GOARCH) -X main.version=${version} -X main.branch=tag-${version} -X main.commit=tag-${version} -extldflags ${LDFLAGS}"
|
||||||
|
go build -o build -ldflags="${_LDFLAGS}" "./cmd/telegraf"
|
||||||
|
|
||||||
|
install -Dm755 build $PKG/usr/bin/$name
|
||||||
|
install -d -m 755 $PKG/etc/telegraf
|
||||||
|
$PKG/usr/bin/$name -sample-config > $PKG/etc/telegraf/telegraf.conf
|
||||||
|
install -Dm755 $SRC/telegraf.service $PKG/etc/rc.d/telegraf
|
||||||
|
}
|
32
telegraf/telegraf.service
Executable file
32
telegraf/telegraf.service
Executable file
@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# /etc/rc.d/telegraf: start/stop telegraf daemon
|
||||||
|
#
|
||||||
|
|
||||||
|
SSD=/sbin/start-stop-daemon
|
||||||
|
PROG=/usr/bin/telegraf
|
||||||
|
OPTS=""
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
start)
|
||||||
|
$SSD --start -b --exec $PROG -- $OPTS ;;
|
||||||
|
stop)
|
||||||
|
$SSD --stop --retry 10 --exec $PROG ;;
|
||||||
|
restart)
|
||||||
|
$0 stop
|
||||||
|
$0 start
|
||||||
|
;;
|
||||||
|
status)
|
||||||
|
$SSD --status --exec $PROG
|
||||||
|
case $? in
|
||||||
|
0) echo "$PROG is running with pid $(pidof $PROG)" ;;
|
||||||
|
1) echo "$PROG is not running but the pid file $PID exists" ;;
|
||||||
|
3) echo "$PROG is not running" ;;
|
||||||
|
4) echo "Unable to determine the program status" ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "usage: $0 [start|stop|restart|status]" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# End of file
|
Loading…
Reference in New Issue
Block a user