Merge pull request #1278 from MarkDordoy/md/add-new-counter

Add new counter LDAP Client Sessions
This commit is contained in:
Ben Reedy
2023-09-05 06:13:58 +10:00
committed by GitHub
2 changed files with 13 additions and 0 deletions

View File

@@ -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, "ldap_client_sessions"),
"This is the number of sessions opened by LDAP clients at the time the data is taken. This is helpful in determining LDAP client activity and if the DC is able to handle the load. Of course, spikes during normal periods of authentication — such as first thing in the morning — are not necessarily a problem, but long sustained periods of high values indicate an overworked DC.",
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.GaugeValue,
float64(dst[0].LDAPClientSessions),
)
ch <- prometheus.MustNewConstMetric(
c.LinkValuesCleanedTotal,

View File

@@ -59,6 +59,7 @@ Name | Description | Type | Labels
`windows_ad_ldap_searches_total` | _Not yet documented_ | counter | None
`windows_ad_ldap_udp_operations_total` | _Not yet documented_ | counter | None
`windows_ad_ldap_writes_total` | _Not yet documented_ | counter | None
`windows_ad_ldap_client_sessions` | This is the number of sessions opened by LDAP clients at the time the data is taken. This is helpful in determining LDAP client activity and if the DC is able to handle the load. Of course, spikes during normal periods of authentication — such as first thing in the morning — are not necessarily a problem, but long sustained periods of high values indicate an overworked DC | gauge | None
`windows_ad_link_values_cleaned_total` | _Not yet documented_ | counter | None
`windows_ad_phantom_objects_cleaned_total` | _Not yet documented_ | counter | None
`windows_ad_phantom_objects_visited_total` | _Not yet documented_ | counter | None