Skip to content

Commit

Permalink
[horus] Customized module monitoring metrics definition (#425)
Browse files Browse the repository at this point in the history
  • Loading branch information
mfordjody authored Oct 4, 2024
1 parent 264321c commit 681f76f
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions app/horus/core/horuser/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,25 @@

package horuser

import "github.com/prometheus/client_golang/prometheus"
import (
"github.com/prometheus/client_golang/prometheus"
"strings"
)

func (h *Horuser) Collect(ch chan<- prometheus.Metric) {}
func (h *Horuser) Collect(ch chan<- prometheus.Metric) {
kFunc := func(m map[string]string) string {
s := []string{}
for k := range m {
s = append(s, k)
}
return strings.Join(s, ",")
}
info := map[string]string{}
buttons := map[bool]string{}
modularKey := buttons[h.cc.CustomModular.Enabled]
info[modularKey] = kFunc(h.cc.CustomModular.KubeMultiple)
}

func (h *Horuser) Describe(ch chan<- *prometheus.Desc) {}
func (h *Horuser) Describe(ch chan<- *prometheus.Desc) {

}

0 comments on commit 681f76f

Please sign in to comment.