mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-09-01 03:31:25 +02:00
exchange: export LDAP average-timer denominator counters for ADAccess metrics (#2474)
Co-authored-by: jkroepke <1560587+jkroepke@users.noreply.github.com> Co-authored-by: Jan-Otto Kröpke <mail@jkroepke.de> Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
@@ -27,8 +27,11 @@ Comma-separated list of collectors to use, for example: `--collectors.exchange.e
|
||||
| `windows_exchange_rpc_operations_total` | The rate at which RPC operations occur |
|
||||
| `windows_exchange_rpc_user_count` | Number of users |
|
||||
| `windows_exchange_ldap_read_time_sec` | Time (sec) to send an LDAP read request and receive a response |
|
||||
| `windows_exchange_ldap_read_operations_total` | Total number of LDAP read operations |
|
||||
| `windows_exchange_ldap_search_time_sec` | Time (sec) to send an LDAP search request and receive a response |
|
||||
| `windows_exchange_ldap_search_operations_total` | Total number of LDAP search operations |
|
||||
| `windows_exchange_ldap_write_time_sec` | Time (sec) to send an LDAP Add/Modify/Delete request and receive a response |
|
||||
| `windows_exchange_ldap_write_operations_total` | Total number of LDAP Add/Modify/Delete operations |
|
||||
| `windows_exchange_ldap_timeout_errors_total` | Total number of LDAP timeout errors |
|
||||
| `windows_exchange_ldap_long_running_ops_per_sec` | Long Running LDAP operations per second |
|
||||
| `windows_exchange_transport_queues_external_active_remote_delivery` | External Active Remote Delivery Queue length |
|
||||
|
||||
@@ -30,9 +30,12 @@ type collectorADAccessProcesses struct {
|
||||
perfDataCollectorADAccessProcesses *pdh.Collector
|
||||
perfDataObjectADAccessProcesses []perfDataCounterValuesADAccessProcesses
|
||||
|
||||
ldapReadOperations *prometheus.Desc
|
||||
ldapReadTime *prometheus.Desc
|
||||
ldapSearchOperations *prometheus.Desc
|
||||
ldapSearchTime *prometheus.Desc
|
||||
ldapTimeoutErrorsPerSec *prometheus.Desc
|
||||
ldapWriteOperations *prometheus.Desc
|
||||
ldapWriteTime *prometheus.Desc
|
||||
longRunningLDAPOperationsPerMin *prometheus.Desc
|
||||
}
|
||||
@@ -41,8 +44,11 @@ type perfDataCounterValuesADAccessProcesses struct {
|
||||
Name string
|
||||
|
||||
LdapReadTime float64 `perfdata:"LDAP Read Time"`
|
||||
LdapReadOperationsTotal float64 `perfdata:"LDAP Read Time,secondvalue"`
|
||||
LdapSearchTime float64 `perfdata:"LDAP Search Time"`
|
||||
LdapSearchOperationsTotal float64 `perfdata:"LDAP Search Time,secondvalue"`
|
||||
LdapWriteTime float64 `perfdata:"LDAP Write Time"`
|
||||
LdapWriteOperationsTotal float64 `perfdata:"LDAP Write Time,secondvalue"`
|
||||
LdapTimeoutErrorsPerSec float64 `perfdata:"LDAP Timeout Errors/sec"`
|
||||
LongRunningLDAPOperationsPerMin float64 `perfdata:"Long Running LDAP Operations/min"`
|
||||
}
|
||||
@@ -61,18 +67,36 @@ func (c *Collector) buildADAccessProcesses() error {
|
||||
[]string{"name"},
|
||||
nil,
|
||||
)
|
||||
c.ldapReadOperations = prometheus.NewDesc(
|
||||
prometheus.BuildFQName(types.Namespace, Name, "ldap_read_operations_total"),
|
||||
"Total number of LDAP read operations",
|
||||
[]string{"name"},
|
||||
nil,
|
||||
)
|
||||
c.ldapSearchTime = prometheus.NewDesc(
|
||||
prometheus.BuildFQName(types.Namespace, Name, "ldap_search_time_sec"),
|
||||
"Time (sec) to send an LDAP search request and receive a response",
|
||||
[]string{"name"},
|
||||
nil,
|
||||
)
|
||||
c.ldapSearchOperations = prometheus.NewDesc(
|
||||
prometheus.BuildFQName(types.Namespace, Name, "ldap_search_operations_total"),
|
||||
"Total number of LDAP search operations",
|
||||
[]string{"name"},
|
||||
nil,
|
||||
)
|
||||
c.ldapWriteTime = prometheus.NewDesc(
|
||||
prometheus.BuildFQName(types.Namespace, Name, "ldap_write_time_sec"),
|
||||
"Time (sec) to send an LDAP Add/Modify/Delete request and receive a response",
|
||||
[]string{"name"},
|
||||
nil,
|
||||
)
|
||||
c.ldapWriteOperations = prometheus.NewDesc(
|
||||
prometheus.BuildFQName(types.Namespace, Name, "ldap_write_operations_total"),
|
||||
"Total number of LDAP Add/Modify/Delete operations",
|
||||
[]string{"name"},
|
||||
nil,
|
||||
)
|
||||
c.ldapTimeoutErrorsPerSec = prometheus.NewDesc(
|
||||
prometheus.BuildFQName(types.Namespace, Name, "ldap_timeout_errors_total"),
|
||||
"Total number of LDAP timeout errors",
|
||||
@@ -114,6 +138,13 @@ func (c *Collector) collectADAccessProcesses(ch chan<- prometheus.Metric) error
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.ldapReadOperations,
|
||||
prometheus.CounterValue,
|
||||
data.LdapReadOperationsTotal,
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.ldapSearchTime,
|
||||
prometheus.CounterValue,
|
||||
@@ -121,6 +152,13 @@ func (c *Collector) collectADAccessProcesses(ch chan<- prometheus.Metric) error
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.ldapSearchOperations,
|
||||
prometheus.CounterValue,
|
||||
data.LdapSearchOperationsTotal,
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.ldapWriteTime,
|
||||
prometheus.CounterValue,
|
||||
@@ -128,6 +166,13 @@ func (c *Collector) collectADAccessProcesses(ch chan<- prometheus.Metric) error
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.ldapWriteOperations,
|
||||
prometheus.CounterValue,
|
||||
data.LdapWriteOperationsTotal,
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.ldapTimeoutErrorsPerSec,
|
||||
prometheus.CounterValue,
|
||||
|
||||
Reference in New Issue
Block a user