mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-26 22:56:36 +00:00
exchange: fix The specified counter could not be found (#1994)
This commit is contained in:
@@ -43,7 +43,7 @@ Comma-separated list of collectors to use, for example: `--collectors.exchange.e
|
|||||||
| `windows_exchange_transport_queues_messages_submitted_total` | Messages Submitted Total |
|
| `windows_exchange_transport_queues_messages_submitted_total` | Messages Submitted Total |
|
||||||
| `windows_exchange_transport_queues_messages_delayed_total` | Messages Delayed Total |
|
| `windows_exchange_transport_queues_messages_delayed_total` | Messages Delayed Total |
|
||||||
| `windows_exchange_transport_queues_messages_completed_delivery_total` | Messages Completed Delivery Total |
|
| `windows_exchange_transport_queues_messages_completed_delivery_total` | Messages Completed Delivery Total |
|
||||||
| `windows_exchange_transport_queues_shadow_queue_length` | Shadow Queue Length |
|
| `windows_exchange_transport_queues_aggregate_shadow_queue_length` | The current number of messages in shadow queues |
|
||||||
| `windows_exchange_transport_queues_submission_queue_length` | Submission Queue Length |
|
| `windows_exchange_transport_queues_submission_queue_length` | Submission Queue Length |
|
||||||
| `windows_exchange_transport_queues_delay_queue_length` | Delay Queue Length |
|
| `windows_exchange_transport_queues_delay_queue_length` | Delay Queue Length |
|
||||||
| `windows_exchange_transport_queues_items_completed_delivery_total` | Items Completed Delivery Total |
|
| `windows_exchange_transport_queues_items_completed_delivery_total` | Items Completed Delivery Total |
|
||||||
@@ -54,7 +54,7 @@ Comma-separated list of collectors to use, for example: `--collectors.exchange.e
|
|||||||
| `windows_exchange_http_proxy_avg_auth_latency` | Average time spent authenticating CAS requests over the last 200 samples |
|
| `windows_exchange_http_proxy_avg_auth_latency` | Average time spent authenticating CAS requests over the last 200 samples |
|
||||||
| `windows_exchange_http_proxy_outstanding_proxy_requests` | Number of concurrent outstanding proxy requests |
|
| `windows_exchange_http_proxy_outstanding_proxy_requests` | Number of concurrent outstanding proxy requests |
|
||||||
| `windows_exchange_http_proxy_requests_total` | Number of proxy requests processed each second |
|
| `windows_exchange_http_proxy_requests_total` | Number of proxy requests processed each second |
|
||||||
| `windows_exchange_avail_service_requests_per_sec` | Number of requests serviced per second |
|
| `windows_exchange_availability_service_requests_per_sec` | Number of requests serviced per second |
|
||||||
| `windows_exchange_owa_current_unique_users` | Number of unique users currently logged on to Outlook Web App |
|
| `windows_exchange_owa_current_unique_users` | Number of unique users currently logged on to Outlook Web App |
|
||||||
| `windows_exchange_owa_requests_total` | Number of requests handled by Outlook Web App per second |
|
| `windows_exchange_owa_requests_total` | Number of requests handled by Outlook Web App per second |
|
||||||
| `windows_exchange_autodiscover_requests_total` | Number of autodiscover service requests processed each second |
|
| `windows_exchange_autodiscover_requests_total` | Number of autodiscover service requests processed each second |
|
||||||
@@ -77,4 +77,3 @@ _This collector does not yet have any useful queries added, we would appreciate
|
|||||||
|
|
||||||
## Alerting examples
|
## Alerting examples
|
||||||
_This collector does not yet have alerting examples, we would appreciate your help adding them!_
|
_This collector does not yet have alerting examples, we would appreciate your help adding them!_
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ type perfDataCounterValuesAutoDiscover struct {
|
|||||||
func (c *Collector) buildAutoDiscover() error {
|
func (c *Collector) buildAutoDiscover() error {
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
c.perfDataCollectorAutoDiscover, err = pdh.NewCollector[perfDataCounterValuesAutoDiscover](pdh.CounterTypeRaw, "MSExchange Autodiscover", pdh.InstancesAll)
|
c.perfDataCollectorAutoDiscover, err = pdh.NewCollector[perfDataCounterValuesAutoDiscover](pdh.CounterTypeRaw, "MSExchangeAutodiscover", nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to create MSExchange Autodiscover collector: %w", err)
|
return fmt.Errorf("failed to create MSExchange Autodiscover collector: %w", err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ type collectorAvailabilityService struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type perfDataCounterValuesAvailabilityService struct {
|
type perfDataCounterValuesAvailabilityService struct {
|
||||||
RequestsPerSec float64 `perfdata:"Requests/sec"`
|
AvailabilityRequestsPerSec float64 `perfdata:"Availability Requests (sec)"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Collector) buildAvailabilityService() error {
|
func (c *Collector) buildAvailabilityService() error {
|
||||||
@@ -45,7 +45,7 @@ func (c *Collector) buildAvailabilityService() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
c.availabilityRequestsSec = prometheus.NewDesc(
|
c.availabilityRequestsSec = prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(types.Namespace, Name, "avail_service_requests_per_sec"),
|
prometheus.BuildFQName(types.Namespace, Name, "availability_service_requests_per_sec"),
|
||||||
"Number of requests serviced per second",
|
"Number of requests serviced per second",
|
||||||
nil,
|
nil,
|
||||||
nil,
|
nil,
|
||||||
@@ -64,7 +64,7 @@ func (c *Collector) collectAvailabilityService(ch chan<- prometheus.Metric) erro
|
|||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.availabilityRequestsSec,
|
c.availabilityRequestsSec,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
data.RequestsPerSec,
|
data.AvailabilityRequestsPerSec,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ type collectorTransportQueues struct {
|
|||||||
messagesSubmittedTotal *prometheus.Desc
|
messagesSubmittedTotal *prometheus.Desc
|
||||||
messagesDelayedTotal *prometheus.Desc
|
messagesDelayedTotal *prometheus.Desc
|
||||||
messagesCompletedDeliveryTotal *prometheus.Desc
|
messagesCompletedDeliveryTotal *prometheus.Desc
|
||||||
shadowQueueLength *prometheus.Desc
|
aggregateShadowQueueLength *prometheus.Desc
|
||||||
submissionQueueLength *prometheus.Desc
|
submissionQueueLength *prometheus.Desc
|
||||||
delayQueueLength *prometheus.Desc
|
delayQueueLength *prometheus.Desc
|
||||||
itemsCompletedDeliveryTotal *prometheus.Desc
|
itemsCompletedDeliveryTotal *prometheus.Desc
|
||||||
@@ -65,7 +65,7 @@ type perfDataCounterValuesTransportQueues struct {
|
|||||||
MessagesSubmittedTotal float64 `perfdata:"Messages Submitted Total"`
|
MessagesSubmittedTotal float64 `perfdata:"Messages Submitted Total"`
|
||||||
MessagesDelayedTotal float64 `perfdata:"Messages Delayed Total"`
|
MessagesDelayedTotal float64 `perfdata:"Messages Delayed Total"`
|
||||||
MessagesCompletedDeliveryTotal float64 `perfdata:"Messages Completed Delivery Total"`
|
MessagesCompletedDeliveryTotal float64 `perfdata:"Messages Completed Delivery Total"`
|
||||||
ShadowQueueLength float64 `perfdata:"Shadow Queue Length"`
|
AggregateShadowQueueLength float64 `perfdata:"Aggregate Shadow Queue Length"`
|
||||||
SubmissionQueueLength float64 `perfdata:"Submission Queue Length"`
|
SubmissionQueueLength float64 `perfdata:"Submission Queue Length"`
|
||||||
DelayQueueLength float64 `perfdata:"Delay Queue Length"`
|
DelayQueueLength float64 `perfdata:"Delay Queue Length"`
|
||||||
ItemsCompletedDeliveryTotal float64 `perfdata:"Items Completed Delivery Total"`
|
ItemsCompletedDeliveryTotal float64 `perfdata:"Items Completed Delivery Total"`
|
||||||
@@ -154,9 +154,9 @@ func (c *Collector) buildTransportQueues() error {
|
|||||||
[]string{"name"},
|
[]string{"name"},
|
||||||
nil,
|
nil,
|
||||||
)
|
)
|
||||||
c.shadowQueueLength = prometheus.NewDesc(
|
c.aggregateShadowQueueLength = prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(types.Namespace, Name, "transport_queues_shadow_queue_length"),
|
prometheus.BuildFQName(types.Namespace, Name, "transport_queues_aggregate_shadow_queue_length"),
|
||||||
"Shadow Queue Length",
|
"The current number of messages in shadow queues.",
|
||||||
[]string{"name"},
|
[]string{"name"},
|
||||||
nil,
|
nil,
|
||||||
)
|
)
|
||||||
@@ -282,9 +282,9 @@ func (c *Collector) collectTransportQueues(ch chan<- prometheus.Metric) error {
|
|||||||
labelName,
|
labelName,
|
||||||
)
|
)
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.shadowQueueLength,
|
c.aggregateShadowQueueLength,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
data.ShadowQueueLength,
|
data.AggregateShadowQueueLength,
|
||||||
labelName,
|
labelName,
|
||||||
)
|
)
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
|
|||||||
Reference in New Issue
Block a user