Created attachment 248492 [details] Add prometheus_agent_mode sysrc variable Prometheus fails to start in agent mode when --storage.tsdb.path is set, which is always the case when starting with the rc file. It would be nice to have a sysrc variable which enables agent mode, and sets either --storage.tsdb.path or --storage.agent.path. I've attached a patch file with something that works for me.
Hi, Thanks for this patch. I've included it in the update to 2.49.1 in bug #277131. -David
Awesome, thanks!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=75d2f666fd4e7761d001eaeb67d0507ce789ff7c commit 75d2f666fd4e7761d001eaeb67d0507ce789ff7c Author: David O'Rourke <dor.bsd@xm0.uk> AuthorDate: 2024-02-23 22:53:52 +0000 Commit: Li-Wen Hsu <lwhsu@FreeBSD.org> CommitDate: 2024-02-23 22:56:04 +0000 net-mgmt/prometheus2: Update to 2.49.1 and enable Prometheus Agent mode Changelog between these versions is available at https://github.com/prometheus/prometheus/blob/main/CHANGELOG.md and there are no breaking changes noted between 2.47.1 and 2.49.1. PR: 277131, 277074 net-mgmt/prometheus2/Makefile | 3 +-- net-mgmt/prometheus2/distinfo | 14 +++++++------- net-mgmt/prometheus2/files/prometheus.in | 12 +++++++++++- 3 files changed, 19 insertions(+), 10 deletions(-)