pull main (#320)

* fix IPv6 masking

* Prometheus support (#316)

* Add prometheus support

* Add prometheus support

* Add prometheus support

* Add prometheus support

* Add prometheus support

---------

Co-authored-by: avigailo <avigailo@checkpoint.com>

* Fix Watchdog restarts  (#319)

* don't exit

* fix restarting agent

* fix watchdog restarts

* Waf tag (#317)

* add waf-tag to openappsec

* fix waf tag to openappsec

---------

Co-authored-by: wiaamm <wiaamm@checkpoint.com>

---------

Co-authored-by: Wills Ward <wward@warddevelopment.com>
Co-authored-by: orianelou <126462046+orianelou@users.noreply.github.com>
Co-authored-by: avigailo <avigailo@checkpoint.com>
Co-authored-by: wiaam96 <142393189+wiaam96@users.noreply.github.com>
Co-authored-by: wiaamm <wiaamm@checkpoint.com>
This commit is contained in:
Daniel-Eisenberg
2025-06-11 15:18:17 +03:00
committed by GitHub
parent 6847c1faba
commit b02eb3d2e1
21 changed files with 771 additions and 19 deletions

View File

@@ -332,7 +332,17 @@ vector<PrometheusData>
GenericMetric::getPromMetricsData()
{
vector<PrometheusData> all_metrics;
if (!getProfileAgentSettingWithDefault(false, "prometheus")) return all_metrics;
bool enable_prometheus = false;
auto prometheus_settings = getProfileAgentSetting<bool>("prometheus");
if (prometheus_settings.ok()) {
enable_prometheus = prometheus_settings.unpack();
} else {
const char *prometheus_env = getenv("PROMETHEUS");
if (prometheus_env != nullptr) {
enable_prometheus = string(prometheus_env) == "true";
}
}
if (!enable_prometheus) return all_metrics;
dbgTrace(D_METRICS) << "Get prometheus metrics";
for (auto &calc : prometheus_calcs) {