From 75d2f666fd4e7761d001eaeb67d0507ce789ff7c Mon Sep 17 00:00:00 2001 From: David O'Rourke Date: Sat, 24 Feb 2024 06:53:52 +0800 Subject: [PATCH] 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(-) diff --git a/net-mgmt/prometheus2/Makefile b/net-mgmt/prometheus2/Makefile index e6300c5073b5..4eebe46882f1 100644 --- a/net-mgmt/prometheus2/Makefile +++ b/net-mgmt/prometheus2/Makefile @@ -1,7 +1,6 @@ PORTNAME= prometheus DISTVERSIONPREFIX= v -DISTVERSION= 2.47.1 -PORTREVISION= 2 +DISTVERSION= 2.49.1 CATEGORIES= net-mgmt MASTER_SITES= https://raw.githubusercontent.com/${GH_ACCOUNT}/${GH_PROJECT}/${DISTVERSIONFULL}/:gomod \ https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/releases/download/${DISTVERSIONFULL}/:ui diff --git a/net-mgmt/prometheus2/distinfo b/net-mgmt/prometheus2/distinfo index e2aa7cb3bf90..f3f6a1d8d818 100644 --- a/net-mgmt/prometheus2/distinfo +++ b/net-mgmt/prometheus2/distinfo @@ -1,7 +1,7 @@ -TIMESTAMP = 1696674105 -SHA256 (go/net-mgmt_prometheus2/prometheus-prometheus-v2.47.1_GH0/go.mod) = 7ecfafcca3a934253beb3b928905606dcda5a3bf9385271208b790fe2246f3d7 -SIZE (go/net-mgmt_prometheus2/prometheus-prometheus-v2.47.1_GH0/go.mod) = 9657 -SHA256 (go/net-mgmt_prometheus2/prometheus-prometheus-v2.47.1_GH0/prometheus-web-ui-2.47.1.tar.gz) = 360570c4a85a83f69c139b1d3f7f75d02b8659559f9934a75d24b3b448cba1bb -SIZE (go/net-mgmt_prometheus2/prometheus-prometheus-v2.47.1_GH0/prometheus-web-ui-2.47.1.tar.gz) = 2420839 -SHA256 (go/net-mgmt_prometheus2/prometheus-prometheus-v2.47.1_GH0/prometheus-prometheus-v2.47.1_GH0.tar.gz) = 2fbbdd907453d7448114e55d6074dbdfb046410ee21e03b937ab51287c4384fa -SIZE (go/net-mgmt_prometheus2/prometheus-prometheus-v2.47.1_GH0/prometheus-prometheus-v2.47.1_GH0.tar.gz) = 6335122 +TIMESTAMP = 1708263208 +SHA256 (go/net-mgmt_prometheus2/prometheus-prometheus-v2.49.1_GH0/go.mod) = 6ecc22e2c39aa282a5a4a03f3dab45decaa9232649d10dcdda1dfce513798ce1 +SIZE (go/net-mgmt_prometheus2/prometheus-prometheus-v2.49.1_GH0/go.mod) = 9568 +SHA256 (go/net-mgmt_prometheus2/prometheus-prometheus-v2.49.1_GH0/prometheus-web-ui-2.49.1.tar.gz) = 707333bbbfd6aae46f6c252502ce14e8facb3f83c08a07583b235bbf13687880 +SIZE (go/net-mgmt_prometheus2/prometheus-prometheus-v2.49.1_GH0/prometheus-web-ui-2.49.1.tar.gz) = 2419051 +SHA256 (go/net-mgmt_prometheus2/prometheus-prometheus-v2.49.1_GH0/prometheus-prometheus-v2.49.1_GH0.tar.gz) = 985d7f45ed3d16e23a30eae490c17911518fae96cba0245d493eb07097a10b3b +SIZE (go/net-mgmt_prometheus2/prometheus-prometheus-v2.49.1_GH0/prometheus-prometheus-v2.49.1_GH0.tar.gz) = 6091825 diff --git a/net-mgmt/prometheus2/files/prometheus.in b/net-mgmt/prometheus2/files/prometheus.in index 7171ec94472b..a89342d038e7 100644 --- a/net-mgmt/prometheus2/files/prometheus.in +++ b/net-mgmt/prometheus2/files/prometheus.in @@ -34,6 +34,9 @@ # prometheus_syslog_output_facility (string) # Set syslog facility if syslog enabled # Default is "daemon" +# prometheus_agent_mode (bool) +# Set to "YES" to enable Prometheus Agent Mode +# Default is "NO" # prometheus_consoles (string) # Set dir that contains Prometheus consoles # Default is "%%PROMETHEUS_CONSOLES_DIR%%" @@ -69,6 +72,7 @@ load_rc_config $name : ${prometheus_config:="%%PREFIX%%/etc/prometheus.yml"} : ${prometheus_pidfile:="/var/run/prometheus.pid"} : ${prometheus_syslog_output_enable:="YES"} +: ${prometheus_agent_mode:="NO"} : ${prometheus_consoles_dir:="%%PROMETHEUS_CONSOLES_DIR%%"} : ${prometheus_console_libraries_dir:="%%PROMETHEUS_CONSOLE_LIBRARIES_DIR%%"} : ${prometheus_data_dir:="%%PROMETHEUS_DB_DIR%%"} @@ -89,6 +93,12 @@ if checkyesno prometheus_syslog_output_enable; then fi fi +if checkyesno prometheus_agent_mode; then + prometheus_storage_flags="--enable-feature=agent --storage.agent.path=${prometheus_data_dir}" +else + prometheus_storage_flags="--storage.tsdb.path=${prometheus_data_dir}" +fi + pidfile="${prometheus_pidfile}" required_files="${prometheus_config}" @@ -99,9 +109,9 @@ command_args="-f ${prometheus_syslog_output_flags} -p ${pidfile} -t ${name} \ --config.file=${prometheus_config} \ --web.console.templates=${prometheus_consoles_dir} \ --web.console.libraries=${prometheus_console_libraries_dir} \ - --storage.tsdb.path=${prometheus_data_dir} \ --log.level=${prometheus_loglevel} \ --log.format=${prometheus_logformat} \ + ${prometheus_storage_flags} \ ${prometheus_args}" start_precmd="prometheus_start_precmd"