This is an automated email from the ASF dual-hosted git repository.

zhongxjian pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-kubernetes.git


The following commit(s) were added to refs/heads/master by this push:
     new 4f50200e [horus] Add prom indicator value (#427)
4f50200e is described below

commit 4f50200eb4e054c918657200f6c1cf606451aadb
Author: mfordjody <[email protected]>
AuthorDate: Sat Oct 5 10:11:32 2024 +0800

    [horus] Add prom indicator value (#427)
---
 app/horus/cmd/main.go             | 2 ++
 app/horus/core/horuser/metrics.go | 4 ++--
 manifests/horus/horus.yaml        | 2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/app/horus/cmd/main.go b/app/horus/cmd/main.go
index ede39ffc..effc2ecb 100644
--- a/app/horus/cmd/main.go
+++ b/app/horus/cmd/main.go
@@ -22,6 +22,7 @@ import (
        "github.com/apache/dubbo-kubernetes/app/horus/base/db"
        "github.com/apache/dubbo-kubernetes/app/horus/core/horuser"
        "github.com/apache/dubbo-kubernetes/app/horus/core/ticker"
+       "github.com/prometheus/client_golang/prometheus"
        "github.com/prometheus/client_golang/prometheus/promhttp"
        "k8s.io/klog"
        "net/http"
@@ -58,6 +59,7 @@ func main() {
                klog.Infof("horus db initial success.")
        }
        horus := horuser.NewHoruser(c)
+       prometheus.MustRegister(horus)
        group, stopChan := setupStopChanWithContext()
        ctx, cancel := context.WithCancel(context.Background())
        group.Add(func() error {
diff --git a/app/horus/core/horuser/metrics.go 
b/app/horus/core/horuser/metrics.go
index 3a50b7e4..d9688783 100644
--- a/app/horus/core/horuser/metrics.go
+++ b/app/horus/core/horuser/metrics.go
@@ -26,7 +26,7 @@ var (
                "horus_multiple_info",
                []string{
                        "cluster_name",
-                       "prometheus_address_apiserver",
+                       "prometheus_multiple_address",
                },
                nil)
 )
@@ -55,5 +55,5 @@ func (h *Horuser) Collect(ch chan<- prometheus.Metric) {
 }
 
 func (h *Horuser) Describe(ch chan<- *prometheus.Desc) {
-
+       ch <- MultipleInfo
 }
diff --git a/manifests/horus/horus.yaml b/manifests/horus/horus.yaml
index 14225bbb..cf5f26ee 100644
--- a/manifests/horus/horus.yaml
+++ b/manifests/horus/horus.yaml
@@ -65,7 +65,7 @@ customModular:
     title: "自定义通知"
 
 nodeDownTime:
-  enabled: true
+  enabled: false
   intervalSecond: 5
   promQueryTimeSecond: 60
   abnormalityQL:

Reply via email to