47 lines
1.6 KiB
Diff
47 lines
1.6 KiB
Diff
From 833a9d721bed5b3e64ea49710a477a52b74c5255 Mon Sep 17 00:00:00 2001
|
|
From: zhangdaolong <dlzhangak@isoftstone.com>
|
|
Date: Thu, 12 Oct 2023 14:28:06 +0800
|
|
Subject: [PATCH 1/1] fix metric proxy init failed error
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
---
|
|
zeus/database/proxy/metric.py | 6 +++---
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/zeus/database/proxy/metric.py b/zeus/database/proxy/metric.py
|
|
index e899e26..5fa75e9 100644
|
|
--- a/zeus/database/proxy/metric.py
|
|
+++ b/zeus/database/proxy/metric.py
|
|
@@ -21,6 +21,7 @@ from prometheus_api_client import PrometheusApiClientException
|
|
from vulcanus.database.proxy import PromDbProxy
|
|
from vulcanus.log.log import LOGGER
|
|
from vulcanus.restful.resp.state import SUCCEED, DATABASE_QUERY_ERROR, NO_DATA, PARAM_ERROR, PARTIAL_SUCCEED
|
|
+from zeus.conf import configuration
|
|
|
|
|
|
class MetricProxy(PromDbProxy):
|
|
@@ -28,16 +29,15 @@ class MetricProxy(PromDbProxy):
|
|
Proxy of prometheus time series database
|
|
"""
|
|
|
|
- def __init__(self, configuration, host=None, port=None):
|
|
+ def __init__(self, host=None, port=None):
|
|
"""
|
|
Init MetricProxy
|
|
|
|
Args:
|
|
- configuration (Config)
|
|
host (str)
|
|
port (int)
|
|
"""
|
|
- PromDbProxy.__init__(self, configuration, host, port)
|
|
+ PromDbProxy.__init__(self, host, port)
|
|
self.default_instance_port = configuration.agent.get('DEFAULT_INSTANCE_PORT') or 9100
|
|
self.query_range_step = configuration.prometheus.get('QUERY_RANGE_STEP') or "15s"
|
|
|
|
--
|
|
2.33.0
|
|
|