Update telegraf to latest version

Fix a problem where a restart sometimes only stopped the daemon, but failed to
restart it again. This happened since the stop command didn't wait for the
process to actually die. Adding a wait_for_pids fixes this.

Release notes:	https://docs.influxdata.com/telegraf/v1.12/about_the_project/release-notes-changelog/
This commit is contained in:
Palle Girgensohn 2019-10-28 12:17:43 +00:00
parent 0169659617
commit 40c1481635
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=515855
3 changed files with 19 additions and 15 deletions

View File

@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= telegraf
DISTVERSION= 1.12.3
DISTVERSION= 1.12.4
CATEGORIES= net-mgmt
MAINTAINER= girgen@FreeBSD.org
@ -25,9 +25,10 @@ GH_TUPLE= GoogleCloudPlatform:google-cloud-go:v0.27.0:go/vendor/cloud.google.com
collectd:go-collectd:v0.3.0:collectd0org/vendor/collectd.org \
census-ecosystem:opencensus-go-exporter-stackdriver:v0.6.0:census_ecosystem/vendor/contrib.go.opencensus.io/exporter/stackdriver \
Azure:go-autorest:v10.12.0:go_autorest/vendor/github.com/Azure/go-autorest \
DataDog:zstd:v1.4.1:zstd/vendor/github.com/DataDog/zstd \
Microsoft:ApplicationInsights-Go:d2df5d4:application_insights/vendor/github.com/Microsoft/ApplicationInsights-Go \
Microsoft:go-winio:v0.4.9:go_winio/vendor/github.com/Microsoft/go-winio \
Shopify:sarama:b12709e:sarama/vendor/github.com/Shopify/sarama \
Shopify:sarama:v1.23.1:sarama/vendor/github.com/Shopify/sarama \
StackExchange:wmi:1.0.0:wmi/vendor/github.com/StackExchange/wmi \
aerospike:aerospike-client-go:v1.27.0:aerospike_client_go/vendor/github.com/aerospike/aerospike-client-go \
alecthomas:units:2efee85:units/vendor/github.com/alecthomas/units \
@ -95,7 +96,7 @@ GH_TUPLE= GoogleCloudPlatform:google-cloud-go:v0.27.0:go/vendor/cloud.google.com
leodido:ragel-machinery:299bdde:ragel_machinery/vendor/github.com/leodido/ragel-machinery \
mailru:easyjson:efc7eb8:easyjson/vendor/github.com/mailru/easyjson \
matttproud:golang_protobuf_extensions:v1.0.1:golang_protobuf_extensions/vendor/github.com/matttproud/golang_protobuf_extensions \
mdlayher:apcupsd:eb3dd99:apcupsd/vendor/github.com/mdlayher/apcupsd \
mdlayher:apcupsd:2fe55d9:apcupsd/vendor/github.com/mdlayher/apcupsd \
miekg:dns:v1.0.8:dns/vendor/github.com/miekg/dns \
mitchellh:go-homedir:3864e76:go_homedir/vendor/github.com/mitchellh/go-homedir \
mitchellh:mapstructure:f15292f:mapstructure/vendor/github.com/mitchellh/mapstructure \
@ -121,7 +122,7 @@ GH_TUPLE= GoogleCloudPlatform:google-cloud-go:v0.27.0:go/vendor/cloud.google.com
rcrowley:go-metrics:e2704e1:go_metrics/vendor/github.com/rcrowley/go-metrics \
samuel:go-zookeeper:c4fab1a:go_zookeeper/vendor/github.com/samuel/go-zookeeper \
satori:go.uuid:v1.2.0:go0uuid/vendor/github.com/satori/go.uuid \
shirou:gopsutil:ccd53e2:gopsutil/vendor/github.com/shirou/gopsutil \
shirou:gopsutil:v2.19.7:gopsutil/vendor/github.com/shirou/gopsutil \
shirou:w32:bb4de01:w32/vendor/github.com/shirou/w32 \
sirupsen:logrus:v1.0.5:logrus/vendor/github.com/sirupsen/logrus \
soniah:gosnmp:96b8622:gosnmp/vendor/github.com/soniah/gosnmp \

View File

@ -1,6 +1,6 @@
TIMESTAMP = 1570527745
SHA256 (influxdata-telegraf-1.12.3_GH0.tar.gz) = 8799b0e2a16a9efb3a85271fedda0b6fd9b5110ce51963688273e60b80bc9aa1
SIZE (influxdata-telegraf-1.12.3_GH0.tar.gz) = 1564065
TIMESTAMP = 1572258168
SHA256 (influxdata-telegraf-1.12.4_GH0.tar.gz) = b0dd8f041dffefd2dd98213abfe57e94979e3814806826208bac6aa2cac5be84
SIZE (influxdata-telegraf-1.12.4_GH0.tar.gz) = 1564442
SHA256 (GoogleCloudPlatform-google-cloud-go-v0.27.0_GH0.tar.gz) = e3a9b4bba987211eeb8afaa9703c9264dc826292a20d71dd1660b94800c05314
SIZE (GoogleCloudPlatform-google-cloud-go-v0.27.0_GH0.tar.gz) = 1793707
SHA256 (cloudfoundry-clock-02e53af_GH0.tar.gz) = ea86a06e72a47954fc71b4698818e50f542de799235cf1ca187d9c1a63f2649a
@ -11,12 +11,14 @@ SHA256 (census-ecosystem-opencensus-go-exporter-stackdriver-v0.6.0_GH0.tar.gz) =
SIZE (census-ecosystem-opencensus-go-exporter-stackdriver-v0.6.0_GH0.tar.gz) = 5184315
SHA256 (Azure-go-autorest-v10.12.0_GH0.tar.gz) = ccde7389b59589a7a39e8185fd91236a152bb531fc99d95c754c25529f531ae4
SIZE (Azure-go-autorest-v10.12.0_GH0.tar.gz) = 118422
SHA256 (DataDog-zstd-v1.4.1_GH0.tar.gz) = 48c0ad82d9bc66d77ca95aa47374bed6b6466510da66a2b2f9215cb239cb8137
SIZE (DataDog-zstd-v1.4.1_GH0.tar.gz) = 498749
SHA256 (Microsoft-ApplicationInsights-Go-d2df5d4_GH0.tar.gz) = f06c3319f47dfa2970cfcb9680df46a77054581107a2d7ce930944cdc3ba88db
SIZE (Microsoft-ApplicationInsights-Go-d2df5d4_GH0.tar.gz) = 51051
SHA256 (Microsoft-go-winio-v0.4.9_GH0.tar.gz) = 6468f5763410cc54fd0ccdd227b9cd93a6487a89b25d383529f21d1ceac78ad1
SIZE (Microsoft-go-winio-v0.4.9_GH0.tar.gz) = 79435
SHA256 (Shopify-sarama-b12709e_GH0.tar.gz) = 729ab6113e67edc26993ed8a2beac3506ca5e2afcd761fff5445f334b0cb0276
SIZE (Shopify-sarama-b12709e_GH0.tar.gz) = 229364
SHA256 (Shopify-sarama-v1.23.1_GH0.tar.gz) = d44603abf9863ab93e76615368450b04da3a11866a4e2645dccdeca0a4566626
SIZE (Shopify-sarama-v1.23.1_GH0.tar.gz) = 229591
SHA256 (StackExchange-wmi-1.0.0_GH0.tar.gz) = fd8172c741c00e51895d65e1b5c2aea8afe44f012f1368d95d6abfd53fea021c
SIZE (StackExchange-wmi-1.0.0_GH0.tar.gz) = 11237
SHA256 (aerospike-aerospike-client-go-v1.27.0_GH0.tar.gz) = c74f10188a326b920d8c0f4281d59f2c4ac3123ef65dfaed03db360c9f657b9d
@ -151,8 +153,8 @@ SHA256 (mailru-easyjson-efc7eb8_GH0.tar.gz) = 6c4a60a5c25a29c307d68da1e4a1028ed4
SIZE (mailru-easyjson-efc7eb8_GH0.tar.gz) = 74205
SHA256 (matttproud-golang_protobuf_extensions-v1.0.1_GH0.tar.gz) = 2def0ee6f6b12b1efc0e3007d89f598608a072610e805c3655ea9d13c3ead49b
SIZE (matttproud-golang_protobuf_extensions-v1.0.1_GH0.tar.gz) = 37184
SHA256 (mdlayher-apcupsd-eb3dd99_GH0.tar.gz) = 8af95620468a782552a1f54345da7986c717afaa13efca0c3563850318cfd5ad
SIZE (mdlayher-apcupsd-eb3dd99_GH0.tar.gz) = 8048
SHA256 (mdlayher-apcupsd-2fe55d9_GH0.tar.gz) = 7edfd5b43e8f85ec0393fe09a0706bf31ca516a072a9adc65b3632dcafa2e847
SIZE (mdlayher-apcupsd-2fe55d9_GH0.tar.gz) = 7765
SHA256 (miekg-dns-v1.0.8_GH0.tar.gz) = 3b4670e842f998262a6395cbbff351de8a193081b40b00a18099c6eb4d09bd01
SIZE (miekg-dns-v1.0.8_GH0.tar.gz) = 2521842
SHA256 (mitchellh-go-homedir-3864e76_GH0.tar.gz) = 8458b4810e3231a6dab327a47c0c6bc0207711cdae401a4124265ec02b13f047
@ -203,8 +205,8 @@ SHA256 (samuel-go-zookeeper-c4fab1a_GH0.tar.gz) = 697f6f4c4582390ca9af11a764764c
SIZE (samuel-go-zookeeper-c4fab1a_GH0.tar.gz) = 37079
SHA256 (satori-go.uuid-v1.2.0_GH0.tar.gz) = 6f9d9549958252d7c5a5ed1cabeedeaab7a600ca0b888a3666cce4c3590aa5a7
SIZE (satori-go.uuid-v1.2.0_GH0.tar.gz) = 8297
SHA256 (shirou-gopsutil-ccd53e2_GH0.tar.gz) = 494793537587a52605cc478a3934ba299a02a61504cb57b6a5e9514ab04d4dfc
SIZE (shirou-gopsutil-ccd53e2_GH0.tar.gz) = 130865
SHA256 (shirou-gopsutil-v2.19.7_GH0.tar.gz) = fec9fa788c22e89b90ebd0991e84beecee716c0bca09f954dd72429c1f5ed33c
SIZE (shirou-gopsutil-v2.19.7_GH0.tar.gz) = 130834
SHA256 (shirou-w32-bb4de01_GH0.tar.gz) = dd6f44bbfaee59b815a2f1699bf8b49c9385c1a926bf25c3a71e18ca129063a1
SIZE (shirou-w32-bb4de01_GH0.tar.gz) = 44331
SHA256 (sirupsen-logrus-v1.0.5_GH0.tar.gz) = 0c422c0f06eb8a67a7c3ce6814d92b866e47b88ad33948c6c009f48ccfbe935f

View File

@ -63,10 +63,11 @@ telegraf_start()
telegraf_stop()
{
if [ -f ${pidfile} ] && procstat $(cat ${pidfile}) >/dev/null 2>&1; then
local pid=$(cat ${pidfile})
pid=$(check_pidfile $pidfile $command)
if [ -n "${pid}" ]; then
echo "Stopping ${name} (pid=${pid})"
kill -- -${pid}
wait_for_pids ${pid}
else
echo "${name} isn't running"
fi