Add new counter
Signed-off-by: Mark Dordoy <mdordoy@palantir.com>
This commit is contained in:
parent
f7426e9fad
commit
d78230f67b
|
@ -59,6 +59,7 @@ type ADCollector struct {
|
|||
LdapSearchesTotal *prometheus.Desc
|
||||
LdapUdpOperationsTotal *prometheus.Desc
|
||||
LdapWritesTotal *prometheus.Desc
|
||||
LdapClientSessions *Prometheus.Desc
|
||||
LinkValuesCleanedTotal *prometheus.Desc
|
||||
PhantomObjectsCleanedTotal *prometheus.Desc
|
||||
PhantomObjectsVisitedTotal *prometheus.Desc
|
||||
|
@ -343,6 +344,12 @@ func newADCollector(logger log.Logger) (Collector, error) {
|
|||
nil,
|
||||
nil,
|
||||
),
|
||||
LdapClientSessions: prometheus.NewDesc(
|
||||
prometheus.BuildFQName(Namespace, subsystem, "client_sessions"),
|
||||
"",
|
||||
nil,
|
||||
nil,
|
||||
),
|
||||
LinkValuesCleanedTotal: prometheus.NewDesc(
|
||||
prometheus.BuildFQName(Namespace, subsystem, "link_values_cleaned_total"),
|
||||
"",
|
||||
|
@ -1190,6 +1197,11 @@ func (c *ADCollector) collect(ch chan<- prometheus.Metric) (*prometheus.Desc, er
|
|||
prometheus.CounterValue,
|
||||
float64(dst[0].LDAPWritesPersec),
|
||||
)
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.LdapClientSessions,
|
||||
prometheus.CounterValue,
|
||||
float64(dst[0].LDAPClientSessions),
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.LinkValuesCleanedTotal,
|
||||
|
|
Loading…
Reference in New Issue