Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Mar 2026 10:35:27 +0000
From:      Palle Girgensohn <girgen@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: ce7c868fd6ea - main - net-mgmt/telegraf: fix startup problems when probes time out
Message-ID:  <69c50bef.36684.5d796d2b@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by girgen:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ce7c868fd6eae6bb1c56939278aaa478240527bb

commit ce7c868fd6eae6bb1c56939278aaa478240527bb
Author:     Palle Girgensohn <girgen@FreeBSD.org>
AuthorDate: 2026-03-26 10:15:39 +0000
Commit:     Palle Girgensohn <girgen@FreeBSD.org>
CommitDate: 2026-03-26 10:35:22 +0000

    net-mgmt/telegraf: fix startup problems when probes time out
    
    Use check config instead of --test, as suggested in the discussion at [1].
    
    [1]:    https://github.com/influxdata/telegraf/issues/18566
    PR:     294052
---
 net-mgmt/telegraf/Makefile          | 1 +
 net-mgmt/telegraf/files/telegraf.in | 6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/net-mgmt/telegraf/Makefile b/net-mgmt/telegraf/Makefile
index 91b9314cc456..14cfbcba702c 100644
--- a/net-mgmt/telegraf/Makefile
+++ b/net-mgmt/telegraf/Makefile
@@ -1,6 +1,7 @@
 PORTNAME=	telegraf
 DISTVERSIONPREFIX=v
 DISTVERSION=	1.38.1
+PORTREVISION=	1
 CATEGORIES=	net-mgmt
 
 MAINTAINER=	girgen@FreeBSD.org
diff --git a/net-mgmt/telegraf/files/telegraf.in b/net-mgmt/telegraf/files/telegraf.in
index 2a76706af639..c8c1a42a8d07 100644
--- a/net-mgmt/telegraf/files/telegraf.in
+++ b/net-mgmt/telegraf/files/telegraf.in
@@ -54,7 +54,11 @@ telegraf_prestart()
         exit 1
     fi
     install -d -o ${telegraf_user} -g ${telegraf_group} -m 750 %%TELEGRAF_LOGDIR%%
-    if ! %%PREFIX%%/bin/${name} --test ${telegraf_options} > /dev/null 2>&1; then
+    _check_args="--config=${telegraf_conf}"
+    if [ -n "${telegraf_confdir}" ]; then
+        _check_args="${_check_args} --config-directory=${telegraf_confdir}"
+    fi
+    if ! %%PREFIX%%/bin/${name} config check ${_check_args} > /dev/null 2>&1; then
         echo WARNING: failing to start ${name} ${telegraf_options}
         echo Try running ${name} --test ${telegraf_options}
         exit 1


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69c50bef.36684.5d796d2b>