Bug 277074 - net-mgmt/prometheus2 Agent mode is not supported
Summary: net-mgmt/prometheus2 Agent mode is not supported
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Li-Wen Hsu
URL:
Keywords:
Depends on: 277131
Blocks:
  Show dependency treegraph
 
Reported: 2024-02-15 15:51 UTC by janlugt
Modified: 2024-02-23 22:56 UTC (History)
2 users (show)

See Also:
dor.bsd: maintainer-feedback+


Attachments
Add prometheus_agent_mode sysrc variable (1.49 KB, patch)
2024-02-15 15:51 UTC, janlugt
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description janlugt 2024-02-15 15:51:48 UTC
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.
Comment 1 David O'Rourke 2024-02-18 14:26:17 UTC
Hi,

Thanks for this patch. I've included it in the update to 2.49.1 in bug #277131.

-David
Comment 2 janlugt 2024-02-18 15:05:22 UTC
Awesome, thanks!
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-02-23 22:56:16 UTC
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(-)