diff --git a/modules/wmi/README.md b/modules/wmi/README.md
index f91359fb3..bfa7965a3 100644
--- a/modules/wmi/README.md
+++ b/modules/wmi/README.md
@@ -13,6 +13,7 @@ the [windows_exporter](https://github.com/prometheus-community/windows_exporter)
The module collects metrics from the following collectors:
- [cpu](https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.cpu.md)
+- [iis](https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.iis.md)
- [memory](https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.memory.md)
- [net](https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.net.md)
- [logical_disk](https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.logical_disk.md)
@@ -27,7 +28,7 @@ The module collects metrics from the following collectors:
## Requirements
There are two ways to monitor Windows with Netdata. Install Netdata over WSL on each host, or remotely collect
-data from one or more centralized agents, running on dedicated Linux machines.
+data from one or more centralized agents, running on dedicated Linux machines.
### Netdata on each Windows machine
@@ -35,65 +36,78 @@ Use the [Netdata MSI installer](https://github.com/netdata/msi-installer#instruc
### Remote data collection
-- Install the latest [Prometheus exporter for Windows](https://github.com/prometheus-community/windows_exporter/releases)
+- Install the
+ latest [Prometheus exporter for Windows](https://github.com/prometheus-community/windows_exporter/releases)
on every Windows host you want to monitor.
- Install Netdata on one or more Linux servers.
-- Configure each Netdata instance to collect data remotely, from several Windows hosts. Just add one job
+- Configure each Netdata instance to collect data remotely, from several Windows hosts. Just add one job
for each host to `wmi.conf`, as shown in the [configuration section](#configuration).
## Metrics
All metrics have "wmi." prefix.
-| Metric | Scope | Dimensions | Units |
-|----------------------------|:--------------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-------------:|
-| cpu_utilization_total | global | dpc, user, privileged, interrupt | percentage |
-| cpu_core_utilization | cpu core | dpc, user, privileged, interrupt | percentage |
-| cpu_core_interrupts | cpu core | interrupts | interrupts/s |
-| cpu_core_dpcs | cpu core | dpcs | dpcs/s |
-| cpu_core_cstate | cpu core | c1, c2, c3 | percentage |
-| memory_utilization | global | available, used | bytes |
-| memory_page_faults | global | page_faults | events/s |
-| memory_swap_utilization | global | available, used | bytes |
-| memory_swap_operations | global | read, write | operations/s |
-| memory_swap_pages | global | read, written | pages/s |
-| memory_cached | global | cached | KiB |
-| memory_cache_faults | global | cache_faults | events/s |
-| memory_system_pool | global | paged, non-paged | bytes |
-| logical_disk_utilization | logical disk | free, used | bytes |
-| logical_disk_bandwidth | logical disk | read, write | bytes/s |
-| logical_disk_operations | logical disk | reads, writes | operations/s |
-| logical_disk_latency | logical disk | read, write | seconds |
-| net_nic_bandwidth | network device | received, sent | kilobits/s |
-| net_nic_packets | network device | received, sent | packets/s |
-| net_nic_errors | network device | inbound, outbound | errors/s |
-| net_nic_discarded | network device | inbound, outbound | discards/s |
-| tcp_conns_established | global | ipv4, ipv6 | connections |
-| tcp_conns_active | global | ipv4, ipv6 | connections/s |
-| tcp_conns_passive | global | ipv4, ipv6 | connections/s |
-| tcp_conns_failures | global | ipv4, ipv6 | failures/s |
-| tcp_conns_resets | global | ipv4, ipv6 | resets/s |
-| tcp_segments_received | global | ipv4, ipv6 | segments/s |
-| tcp_segments_sent | global | ipv4, ipv6 | segments/s |
-| tcp_segments_retransmitted | global | ipv4, ipv6 | segments/s |
-| os_processes | global | processes | number |
-| os_users | global | users | users |
-| os_visible_memory_usage | global | free, used | bytes |
-| os_paging_files_usage | global | free, used | bytes |
-| system_threads | global | threads | number |
-| system_uptime | global | time | seconds |
-| logon_type_sessions | global | system, interactive, network, batch, service, proxy, unlock, network_clear_text, new_credentials, remote_interactive, cached_interactive, cached_remote_interactive, cached_unlock | seconds |
-| thermalzone_temperature | global | a dimension per thermalzone | celsius |
-| processes_cpu_utilization | global | a dimension per process | percentage |
-| processes_handles | global | a dimension per process | handles |
-| processes_io_bytes | global | a dimension per process | bytes/s |
-| processes_io_operations | global | a dimension per process | operations/s |
-| processes_page_faults | global | a dimension per process | pgfaults/s |
-| processes_page_file_bytes | global | a dimension per process | bytes |
-| processes_pool_bytes | global | a dimension per process | bytes |
-| processes_threads | global | a dimension per process | threads |
-| service_state | service | running, stopped, start_pending, stop_pending, continue_pending, pause_pending, paused, unknown | state |
-| service_status | service | ok, error, unknown, pred_fail, starting, stopping, service, stressed, nonrecover, no_contact, lost_comm | status |
+| Metric | Scope | Dimensions | Units |
+|--------------------------------------------|:--------------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-------------:|
+| cpu_utilization_total | global | dpc, user, privileged, interrupt | percentage |
+| cpu_core_utilization | cpu core | dpc, user, privileged, interrupt | percentage |
+| cpu_core_interrupts | cpu core | interrupts | interrupts/s |
+| cpu_core_dpcs | cpu core | dpcs | dpcs/s |
+| cpu_core_cstate | cpu core | c1, c2, c3 | percentage |
+| memory_utilization | global | available, used | bytes |
+| memory_utilization | global | available, used | KiB |
+| memory_page_faults | global | page_faults | events/s |
+| memory_swap_utilization | global | available, used | bytes |
+| memory_swap_operations | global | read, write | operations/s |
+| memory_swap_pages | global | read, written | pages/s |
+| memory_cached | global | cached | KiB |
+| memory_cache_faults | global | cache_faults | events/s |
+| memory_system_pool | global | paged, non-paged | bytes |
+| logical_disk_utilization | logical disk | free, used | bytes |
+| logical_disk_bandwidth | logical disk | read, write | bytes/s |
+| logical_disk_operations | logical disk | reads, writes | operations/s |
+| logical_disk_latency | logical disk | read, write | seconds |
+| net_nic_bandwidth | network device | received, sent | kilobits/s |
+| net_nic_packets | network device | received, sent | packets/s |
+| net_nic_errors | network device | inbound, outbound | errors/s |
+| net_nic_discarded | network device | inbound, outbound | discards/s |
+| tcp_conns_established | global | ipv4, ipv6 | connections |
+| tcp_conns_active | global | ipv4, ipv6 | connections/s |
+| tcp_conns_passive | global | ipv4, ipv6 | connections/s |
+| tcp_conns_failures | global | ipv4, ipv6 | failures/s |
+| tcp_conns_resets | global | ipv4, ipv6 | resets/s |
+| tcp_segments_received | global | ipv4, ipv6 | segments/s |
+| tcp_segments_sent | global | ipv4, ipv6 | segments/s |
+| tcp_segments_retransmitted | global | ipv4, ipv6 | segments/s |
+| os_processes | global | processes | number |
+| os_users | global | users | users |
+| os_visible_memory_usage | global | free, used | bytes |
+| os_paging_files_usage | global | free, used | bytes |
+| system_threads | global | threads | number |
+| system_uptime | global | time | seconds |
+| logon_type_sessions | global | system, interactive, network, batch, service, proxy, unlock, network_clear_text, new_credentials, remote_interactive, cached_interactive, cached_remote_interactive, cached_unlock | seconds |
+| thermalzone_temperature | global | a dimension per thermalzone | celsius |
+| processes_cpu_utilization | global | a dimension per process | percentage |
+| processes_handles | global | a dimension per process | handles |
+| processes_io_bytes | global | a dimension per process | bytes/s |
+| processes_io_operations | global | a dimension per process | operations/s |
+| processes_page_faults | global | a dimension per process | pgfaults/s |
+| processes_page_file_bytes | global | a dimension per process | bytes |
+| processes_pool_bytes | global | a dimension per process | bytes |
+| processes_threads | global | a dimension per process | threads |
+| service_state | service | running, stopped, start_pending, stop_pending, continue_pending, pause_pending, paused, unknown | state |
+| service_status | service | ok, error, unknown, pred_fail, starting, stopping, service, stressed, nonrecover, no_contact, lost_comm | status |
+| iis_website_traffic | website | received, sent | bytes/s |
+| iis_website_requests_rate | website | requests | requests/s |
+| iis_website_active_connections_count | website | active | connections |
+| iis_website_users_count | website | anonymous, non_anonymous | users |
+| iis_website_connection_attempts_rate | website | connection | attempts/s |
+| iis_website_isapi_extension_requests_count | website | isapi | requests |
+| iis_website_isapi_extension_requests_rate | website | isapi | requests/s |
+| iis_website_ftp_file_transfer_rate | website | received, sent | files/s |
+| iis_website_logon_attempts_rate | website | logon | attempts/s |
+| iis_website_errors_rate | website | document_locked, document_not_found | errors/s |
+| iis_website_uptime | website | document_locked, document_not_found | seconds |
## Configuration
diff --git a/modules/wmi/charts.go b/modules/wmi/charts.go
index dda561082..3ba754733 100644
--- a/modules/wmi/charts.go
+++ b/modules/wmi/charts.go
@@ -65,6 +65,18 @@ const (
prioProcessesThreads
prioProcessesHandles
+ prioIISWebsiteTraffic
+ prioIISWebsiteRequestsRate
+ prioIISWebsiteActiveConnectionsCount
+ prioIISWebsiteUsersCount
+ prioIISWebsiteConnectionAttemptsRate
+ prioIISWebsiteISAPIExtRequestsCount
+ prioIISWebsiteISAPIExtRequestsRate
+ prioIISWebsiteFTPFileTransferRate
+ prioIISWebsiteLogonAttemptsRate
+ prioIISWebsiteErrorsRate
+ prioIISWebsiteUptime
+
prioServiceState
prioServiceStatus
@@ -598,6 +610,151 @@ var (
}
)
+// IIS
+var (
+ iisWebsiteChartsTmpl = module.Charts{
+ iisWebsiteTrafficChartTempl.Copy(),
+ iisWebsiteRequestsRateChartTmpl.Copy(),
+ iisWebsiteActiveConnectionsCountChartTmpl.Copy(),
+ iisWebsiteUsersCountChartTmpl.Copy(),
+ iisWebsiteConnectionAttemptsRate.Copy(),
+ iisWebsiteISAPIExtRequestsCountChartTmpl.Copy(),
+ iisWebsiteISAPIExtRequestsRateChartTmpl.Copy(),
+ iisWebsiteFTPFileTransferRateChartTempl.Copy(),
+ iisWebsiteLogonAttemptsRateChartTmpl.Copy(),
+ iisWebsiteErrorsRateChart.Copy(),
+ iisWebsiteUptimeChartTmpl.Copy(),
+ }
+ iisWebsiteTrafficChartTempl = module.Chart{
+ ID: "iis_website_%s_traffic",
+ Title: "Website traffic",
+ Units: "bytes/s",
+ Fam: "iis",
+ Ctx: "wmi.iis_website_traffic",
+ Type: module.Area,
+ Priority: prioIISWebsiteTraffic,
+ Dims: module.Dims{
+ {ID: "iis_website_%s_received_bytes_total", Name: "received", Algo: module.Incremental},
+ {ID: "iis_website_%s_sent_bytes_total", Name: "sent", Algo: module.Incremental, Mul: -1},
+ },
+ }
+ iisWebsiteRequestsRateChartTmpl = module.Chart{
+ ID: "iis_website_%s_requests_rate",
+ Title: "Website requests rate",
+ Units: "requests/s",
+ Fam: "iis",
+ Ctx: "wmi.iis_website_requests_rate",
+ Priority: prioIISWebsiteRequestsRate,
+ Dims: module.Dims{
+ {ID: "iis_website_%s_requests_total", Name: "requests", Algo: module.Incremental},
+ },
+ }
+ iisWebsiteActiveConnectionsCountChartTmpl = module.Chart{
+ ID: "iis_website_%s_active_connections_count",
+ Title: "Website active connections",
+ Units: "connections",
+ Fam: "iis",
+ Ctx: "wmi.iis_website_active_connections_count",
+ Priority: prioIISWebsiteActiveConnectionsCount,
+ Dims: module.Dims{
+ {ID: "iis_website_%s_current_connections", Name: "active"},
+ },
+ }
+ iisWebsiteUsersCountChartTmpl = module.Chart{
+ ID: "iis_website_%s_users_count",
+ Title: "Website users with pending requests",
+ Units: "users",
+ Fam: "iis",
+ Ctx: "wmi.iis_website_users_count",
+ Type: module.Stacked,
+ Priority: prioIISWebsiteUsersCount,
+ Dims: module.Dims{
+ {ID: "iis_website_%s_current_anonymous_users", Name: "anonymous"},
+ {ID: "iis_website_%s_current_non_anonymous_users", Name: "non_anonymous"},
+ },
+ }
+ iisWebsiteConnectionAttemptsRate = module.Chart{
+ ID: "iis_website_%s_connection_attempts_rate",
+ Title: "Website connections attempts",
+ Units: "attempts/s",
+ Fam: "iis",
+ Ctx: "wmi.iis_website_connection_attempts_rate",
+ Priority: prioIISWebsiteConnectionAttemptsRate,
+ Dims: module.Dims{
+ {ID: "iis_website_%s_connection_attempts_all_instances_total", Name: "connection", Algo: module.Incremental},
+ },
+ }
+ iisWebsiteISAPIExtRequestsCountChartTmpl = module.Chart{
+ ID: "iis_website_%s_isapi_extension_requests_count",
+ Title: "ISAPI extension requests",
+ Units: "requests",
+ Fam: "iis",
+ Ctx: "wmi.iis_website_isapi_extension_requests_count",
+ Priority: prioIISWebsiteISAPIExtRequestsCount,
+ Dims: module.Dims{
+ {ID: "iis_website_%s_current_isapi_extension_requests", Name: "isapi"},
+ },
+ }
+ iisWebsiteISAPIExtRequestsRateChartTmpl = module.Chart{
+ ID: "iis_website_%s_isapi_extension_requests_rate",
+ Title: "Website extensions request",
+ Units: "requests/s",
+ Fam: "iis",
+ Ctx: "wmi.iis_website_isapi_extension_requests_rate",
+ Priority: prioIISWebsiteISAPIExtRequestsRate,
+ Dims: module.Dims{
+ {ID: "iis_website_%s_isapi_extension_requests_total", Name: "isapi", Algo: module.Incremental},
+ },
+ }
+ iisWebsiteFTPFileTransferRateChartTempl = module.Chart{
+ ID: "iis_website_%s_ftp_file_transfer_rate",
+ Title: "Website FTP file transfer rate",
+ Units: "files/s",
+ Fam: "iis",
+ Ctx: "wmi.iis_website_ftp_file_transfer_rate",
+ Priority: prioIISWebsiteFTPFileTransferRate,
+ Dims: module.Dims{
+ {ID: "iis_website_%s_files_received_total", Name: "received", Algo: module.Incremental},
+ {ID: "iis_website_%s_files_sent_total", Name: "sent", Algo: module.Incremental},
+ },
+ }
+ iisWebsiteLogonAttemptsRateChartTmpl = module.Chart{
+ ID: "iis_website_%s_logon_attempts_rate",
+ Title: "Website logon attempts",
+ Units: "attempts/s",
+ Fam: "iis",
+ Ctx: "wmi.iis_website_logon_attempts_rate",
+ Priority: prioIISWebsiteLogonAttemptsRate,
+ Dims: module.Dims{
+ {ID: "iis_website_%s_logon_attempts_total", Name: "logon", Algo: module.Incremental},
+ },
+ }
+ iisWebsiteErrorsRateChart = module.Chart{
+ ID: "iis_website_%s_errors_rate",
+ Title: "Website errors",
+ Units: "errors/s",
+ Fam: "iis",
+ Ctx: "wmi.iis_website_errors_rate",
+ Type: module.Stacked,
+ Priority: prioIISWebsiteErrorsRate,
+ Dims: module.Dims{
+ {ID: "iis_website_%s_locked_errors_total", Name: "document_locked", Algo: module.Incremental},
+ {ID: "iis_website_%s_not_found_errors_total", Name: "document_not_found", Algo: module.Incremental},
+ },
+ }
+ iisWebsiteUptimeChartTmpl = module.Chart{
+ ID: "iis_website_%s_uptime",
+ Title: "Website uptime",
+ Units: "seconds",
+ Fam: "iis",
+ Ctx: "wmi.iis_website_uptime",
+ Priority: prioIISWebsiteUptime,
+ Dims: module.Dims{
+ {ID: "iis_website_%s_service_uptime", Name: "uptime"},
+ },
+ }
+)
+
// Logon
var (
logonCharts = module.Charts{
@@ -971,6 +1128,34 @@ func (w *WMI) removeThermalZoneCharts(zone string) {
}
}
+func (w *WMI) addIISWebsiteCharts(website string) {
+ charts := iisWebsiteChartsTmpl.Copy()
+
+ for _, chart := range *charts {
+ chart.ID = fmt.Sprintf(chart.ID, website)
+ chart.Labels = []module.Label{
+ {Key: "website", Value: website},
+ }
+ for _, dim := range chart.Dims {
+ dim.ID = fmt.Sprintf(dim.ID, website)
+ }
+ }
+
+ if err := w.Charts().Add(*charts...); err != nil {
+ w.Warning(err)
+ }
+}
+
+func (w *WMI) removeIIWebsiteSCharts(website string) {
+ px := fmt.Sprintf("iis_website_%s", website)
+ for _, chart := range *w.Charts() {
+ if strings.HasPrefix(chart.ID, px) {
+ chart.MarkRemove()
+ chart.MarkNotCreated()
+ }
+ }
+}
+
func (w *WMI) addProcessesCharts() {
charts := processesCharts.Copy()
diff --git a/modules/wmi/collect.go b/modules/wmi/collect.go
index 2aa09d2e6..255636a60 100644
--- a/modules/wmi/collect.go
+++ b/modules/wmi/collect.go
@@ -23,6 +23,7 @@ const (
collectorLogon = "logon"
collectorThermalZone = "thermalzone"
collectorTCP = "tcp"
+ collectorIIS = "iis"
collectorProcess = "process"
collectorService = "service"
)
@@ -41,6 +42,7 @@ var fastCollectors = map[string]bool{
// slow collectors with gauge (absolute) metrics only
var slowCollectors = map[string]bool{
collectorLogon: true,
+ collectorIIS: true,
collectorThermalZone: true,
collectorService: true,
}
@@ -155,6 +157,8 @@ func (w *WMI) collectMetrics(mx map[string]int64, prom prometheus.Prometheus) er
w.collectProcess(mx, pms)
case collectorService:
w.collectService(mx, pms)
+ case collectorIIS:
+ w.collectIIS(mx, pms)
}
}
diff --git a/modules/wmi/collect_iis.go b/modules/wmi/collect_iis.go
new file mode 100644
index 000000000..876efcd08
--- /dev/null
+++ b/modules/wmi/collect_iis.go
@@ -0,0 +1,140 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+package wmi
+
+import (
+ "strings"
+
+ "github.com/netdata/go.d.plugin/pkg/prometheus"
+)
+
+const (
+ metricIISCurrentAnonymousUsers = "windows_iis_current_anonymous_users"
+ metricIISCurrentNonAnonymousUsers = "windows_iis_current_non_anonymous_users"
+ metricIISCurrentConnections = "windows_iis_current_connections"
+ metricIICurrentISAPIExtRequests = "windows_iis_current_isapi_extension_requests"
+ metricIISUptime = "windows_iis_service_uptime"
+
+ metricIISReceivedBytesTotal = "windows_iis_received_bytes_total"
+ metricIISSentBytesTotal = "windows_iis_sent_bytes_total"
+ metricIISRequestsTotal = "windows_iis_requests_total"
+ metricIISIPAPIExtRequestsTotal = "windows_iis_ipapi_extension_requests_total"
+ metricIISConnAttemptsAllInstancesTotal = "windows_iis_connection_attempts_all_instances_total"
+ metricIISFilesReceivedTotal = "windows_iis_files_received_total"
+ metricIISFilesSentTotal = "windows_iis_files_sent_total"
+ metricIISLogonAttemptsTotal = "windows_iis_logon_attempts_total"
+ metricIISLockedErrorsTotal = "windows_iis_locked_errors_total"
+ metricIISNotFoundErrorsTotal = "windows_iis_not_found_errors_total"
+)
+
+func (w *WMI) collectIIS(mx map[string]int64, pms prometheus.Metrics) {
+ seen := make(map[string]bool)
+ px := "iis_website_"
+ for _, pm := range pms.FindByName(metricIISCurrentAnonymousUsers) {
+ if name := cleanWebsiteName(pm.Labels.Get("site")); name != "" {
+ seen[name] = true
+ mx[px+name+"_current_anonymous_users"] += int64(pm.Value)
+ }
+ }
+ for _, pm := range pms.FindByName(metricIISCurrentNonAnonymousUsers) {
+ if name := cleanWebsiteName(pm.Labels.Get("site")); name != "" {
+ seen[name] = true
+ mx[px+name+"_current_non_anonymous_users"] += int64(pm.Value)
+ }
+ }
+ for _, pm := range pms.FindByName(metricIISCurrentConnections) {
+ if name := cleanWebsiteName(pm.Labels.Get("site")); name != "" {
+ seen[name] = true
+ mx[px+name+"_current_connections"] += int64(pm.Value)
+ }
+ }
+ for _, pm := range pms.FindByName(metricIICurrentISAPIExtRequests) {
+ if name := cleanWebsiteName(pm.Labels.Get("site")); name != "" {
+ seen[name] = true
+ mx[px+name+"_current_isapi_extension_requests"] += int64(pm.Value)
+ }
+ }
+ for _, pm := range pms.FindByName(metricIISUptime) {
+ if name := cleanWebsiteName(pm.Labels.Get("site")); name != "" {
+ seen[name] = true
+ mx[px+name+"_service_uptime"] += int64(pm.Value)
+ }
+ }
+ for _, pm := range pms.FindByName(metricIISReceivedBytesTotal) {
+ if name := cleanWebsiteName(pm.Labels.Get("site")); name != "" {
+ seen[name] = true
+ mx[px+name+"_received_bytes_total"] += int64(pm.Value)
+ }
+ }
+ for _, pm := range pms.FindByName(metricIISSentBytesTotal) {
+ if name := cleanWebsiteName(pm.Labels.Get("site")); name != "" {
+ seen[name] = true
+ mx[px+name+"_sent_bytes_total"] += int64(pm.Value)
+ }
+ }
+ for _, pm := range pms.FindByName(metricIISRequestsTotal) {
+ if name := cleanWebsiteName(pm.Labels.Get("site")); name != "" {
+ seen[name] = true
+ mx[px+name+"_requests_total"] += int64(pm.Value)
+ }
+ }
+ for _, pm := range pms.FindByName(metricIISConnAttemptsAllInstancesTotal) {
+ if name := cleanWebsiteName(pm.Labels.Get("site")); name != "" {
+ seen[name] = true
+ mx[px+name+"_connection_attempts_all_instances_total"] += int64(pm.Value)
+ }
+ }
+ for _, pm := range pms.FindByName(metricIISFilesReceivedTotal) {
+ if name := cleanWebsiteName(pm.Labels.Get("site")); name != "" {
+ seen[name] = true
+ mx[px+name+"_files_received_total"] += int64(pm.Value)
+ }
+ }
+ for _, pm := range pms.FindByName(metricIISFilesSentTotal) {
+ if name := cleanWebsiteName(pm.Labels.Get("site")); name != "" {
+ seen[name] = true
+ mx[px+name+"_files_sent_total"] += int64(pm.Value)
+ }
+ }
+ for _, pm := range pms.FindByName(metricIISIPAPIExtRequestsTotal) {
+ if name := cleanWebsiteName(pm.Labels.Get("site")); name != "" {
+ seen[name] = true
+ mx[px+name+"_isapi_extension_requests_total"] += int64(pm.Value)
+ }
+ }
+ for _, pm := range pms.FindByName(metricIISLogonAttemptsTotal) {
+ if name := cleanWebsiteName(pm.Labels.Get("site")); name != "" {
+ seen[name] = true
+ mx[px+name+"_logon_attempts_total"] += int64(pm.Value)
+ }
+ }
+ for _, pm := range pms.FindByName(metricIISLockedErrorsTotal) {
+ if name := cleanWebsiteName(pm.Labels.Get("site")); name != "" {
+ seen[name] = true
+ mx[px+name+"_locked_errors_total"] += int64(pm.Value)
+ }
+ }
+ for _, pm := range pms.FindByName(metricIISNotFoundErrorsTotal) {
+ if name := cleanWebsiteName(pm.Labels.Get("site")); name != "" {
+ seen[name] = true
+ mx[px+name+"_not_found_errors_total"] += int64(pm.Value)
+ }
+ }
+
+ for site := range seen {
+ if !w.cache.iis[site] {
+ w.cache.iis[site] = true
+ w.addIISWebsiteCharts(site)
+ }
+ }
+ for site := range w.cache.iis {
+ if !seen[site] {
+ delete(w.cache.iis, site)
+ w.removeIIWebsiteSCharts(site)
+ }
+ }
+}
+
+func cleanWebsiteName(name string) string {
+ return strings.ReplaceAll(name, " ", "_")
+}
diff --git a/modules/wmi/testdata/v0.20.0/metrics.txt b/modules/wmi/testdata/v0.20.0/metrics.txt
index 4b8ded326..4bd7427b3 100644
--- a/modules/wmi/testdata/v0.20.0/metrics.txt
+++ b/modules/wmi/testdata/v0.20.0/metrics.txt
@@ -187,6 +187,7 @@ windows_exporter_build_info{branch="heads/tags/v0.20.0",goversion="go1.19.1",rev
# HELP windows_exporter_collector_duration_seconds windows_exporter: Duration of a collection.
# TYPE windows_exporter_collector_duration_seconds gauge
windows_exporter_collector_duration_seconds{collector="cpu"} 0.00052
+windows_exporter_collector_duration_seconds{collector="iis"} 0
windows_exporter_collector_duration_seconds{collector="logical_disk"} 0
windows_exporter_collector_duration_seconds{collector="logon"} 0.1139134
windows_exporter_collector_duration_seconds{collector="memory"} 0.00052
@@ -199,6 +200,7 @@ windows_exporter_collector_duration_seconds{collector="tcp"} 0
# HELP windows_exporter_collector_success windows_exporter: Whether the collector was successful.
# TYPE windows_exporter_collector_success gauge
windows_exporter_collector_success{collector="cpu"} 1
+windows_exporter_collector_success{collector="iis"} 1
windows_exporter_collector_success{collector="logical_disk"} 1
windows_exporter_collector_success{collector="logon"} 1
windows_exporter_collector_success{collector="memory"} 1
@@ -211,6 +213,7 @@ windows_exporter_collector_success{collector="tcp"} 1
# HELP windows_exporter_collector_timeout windows_exporter: Whether the collector timed out.
# TYPE windows_exporter_collector_timeout gauge
windows_exporter_collector_timeout{collector="cpu"} 0
+windows_exporter_collector_timeout{collector="iis"} 0
windows_exporter_collector_timeout{collector="logical_disk"} 0
windows_exporter_collector_timeout{collector="logon"} 0
windows_exporter_collector_timeout{collector="memory"} 0
@@ -223,6 +226,337 @@ windows_exporter_collector_timeout{collector="tcp"} 0
# HELP windows_exporter_perflib_snapshot_duration_seconds Duration of perflib snapshot capture
# TYPE windows_exporter_perflib_snapshot_duration_seconds gauge
windows_exporter_perflib_snapshot_duration_seconds 0.0054258
+# HELP windows_iis_anonymous_users_total Total number of users who established an anonymous connection with the Web service (WebService.TotalAnonymousUsers)
+# TYPE windows_iis_anonymous_users_total counter
+windows_iis_anonymous_users_total{site="Default Web Site"} 3
+# HELP windows_iis_blocked_async_io_requests_total Total requests temporarily blocked due to bandwidth throttling settings (WebService.TotalBlockedAsyncIORequests)
+# TYPE windows_iis_blocked_async_io_requests_total counter
+windows_iis_blocked_async_io_requests_total{site="Default Web Site"} 0
+# HELP windows_iis_cgi_requests_total Total CGI requests is the total number of CGI requests (WebService.TotalCGIRequests)
+# TYPE windows_iis_cgi_requests_total counter
+windows_iis_cgi_requests_total{site="Default Web Site"} 0
+# HELP windows_iis_connection_attempts_all_instances_total Number of connections that have been attempted using the Web service (WebService.TotalConnectionAttemptsAllInstances)
+# TYPE windows_iis_connection_attempts_all_instances_total counter
+windows_iis_connection_attempts_all_instances_total{site="Default Web Site"} 1
+# HELP windows_iis_current_anonymous_users Number of users who currently have an anonymous connection using the Web service (WebService.CurrentAnonymousUsers)
+# TYPE windows_iis_current_anonymous_users gauge
+windows_iis_current_anonymous_users{site="Default Web Site"} 0
+# HELP windows_iis_current_application_pool_start_time The unix timestamp for the application pool start time (CurrentApplicationPoolUptime)
+# TYPE windows_iis_current_application_pool_start_time gauge
+windows_iis_current_application_pool_start_time{app="DefaultAppPool"} 1.6672399883854828e+09
+# HELP windows_iis_current_application_pool_state The current status of the application pool (1 - Uninitialized, 2 - Initialized, 3 - Running, 4 - Disabling, 5 - Disabled, 6 - Shutdown Pending, 7 - Delete Pending) (CurrentApplicationPoolState)
+# TYPE windows_iis_current_application_pool_state gauge
+windows_iis_current_application_pool_state{app="DefaultAppPool",state="Delete Pending"} 0
+windows_iis_current_application_pool_state{app="DefaultAppPool",state="Disabled"} 0
+windows_iis_current_application_pool_state{app="DefaultAppPool",state="Disabling"} 0
+windows_iis_current_application_pool_state{app="DefaultAppPool",state="Initialized"} 0
+windows_iis_current_application_pool_state{app="DefaultAppPool",state="Running"} 1
+windows_iis_current_application_pool_state{app="DefaultAppPool",state="Shutdown Pending"} 0
+windows_iis_current_application_pool_state{app="DefaultAppPool",state="Uninitialized"} 0
+# HELP windows_iis_current_blocked_async_io_requests Current requests temporarily blocked due to bandwidth throttling settings (WebService.CurrentBlockedAsyncIORequests)
+# TYPE windows_iis_current_blocked_async_io_requests gauge
+windows_iis_current_blocked_async_io_requests{site="Default Web Site"} 0
+# HELP windows_iis_current_cgi_requests Current number of CGI requests being simultaneously processed by the Web service (WebService.CurrentCGIRequests)
+# TYPE windows_iis_current_cgi_requests gauge
+windows_iis_current_cgi_requests{site="Default Web Site"} 0
+# HELP windows_iis_current_connections Current number of connections established with the Web service (WebService.CurrentConnections)
+# TYPE windows_iis_current_connections gauge
+windows_iis_current_connections{site="Default Web Site"} 0
+# HELP windows_iis_current_isapi_extension_requests Current number of ISAPI requests being simultaneously processed by the Web service (WebService.CurrentISAPIExtensionRequests)
+# TYPE windows_iis_current_isapi_extension_requests gauge
+windows_iis_current_isapi_extension_requests{site="Default Web Site"} 0
+# HELP windows_iis_current_non_anonymous_users Number of users who currently have a non-anonymous connection using the Web service (WebService.CurrentNonAnonymousUsers)
+# TYPE windows_iis_current_non_anonymous_users gauge
+windows_iis_current_non_anonymous_users{site="Default Web Site"} 0
+# HELP windows_iis_current_worker_processes The current number of worker processes that are running in the application pool (CurrentWorkerProcesses)
+# TYPE windows_iis_current_worker_processes gauge
+windows_iis_current_worker_processes{app="DefaultAppPool"} 1
+# HELP windows_iis_files_received_total Number of files received by the Web service (WebService.TotalFilesReceived)
+# TYPE windows_iis_files_received_total counter
+windows_iis_files_received_total{site="Default Web Site"} 0
+# HELP windows_iis_files_sent_total Number of files sent by the Web service (WebService.TotalFilesSent)
+# TYPE windows_iis_files_sent_total counter
+windows_iis_files_sent_total{site="Default Web Site"} 2
+# HELP windows_iis_ipapi_extension_requests_total ISAPI Extension Requests received (WebService.TotalISAPIExtensionRequests)
+# TYPE windows_iis_ipapi_extension_requests_total counter
+windows_iis_ipapi_extension_requests_total{site="Default Web Site"} 0
+# HELP windows_iis_locked_errors_total Number of requests that couldn't be satisfied by the server because the requested resource was locked (WebService.TotalLockedErrors)
+# TYPE windows_iis_locked_errors_total counter
+windows_iis_locked_errors_total{site="Default Web Site"} 0
+# HELP windows_iis_logon_attempts_total Number of logons attempts to the Web Service (WebService.TotalLogonAttempts)
+# TYPE windows_iis_logon_attempts_total counter
+windows_iis_logon_attempts_total{site="Default Web Site"} 4
+# HELP windows_iis_maximum_worker_processes The maximum number of worker processes that have been created for the application pool since Windows Process Activation Service (WAS) started (MaximumWorkerProcesses)
+# TYPE windows_iis_maximum_worker_processes gauge
+windows_iis_maximum_worker_processes{app="DefaultAppPool"} 1
+# HELP windows_iis_non_anonymous_users_total Number of users who established a non-anonymous connection with the Web service (WebService.TotalNonAnonymousUsers)
+# TYPE windows_iis_non_anonymous_users_total counter
+windows_iis_non_anonymous_users_total{site="Default Web Site"} 0
+# HELP windows_iis_not_found_errors_total Number of requests that couldn't be satisfied by the server because the requested document could not be found (WebService.TotalNotFoundErrors)
+# TYPE windows_iis_not_found_errors_total counter
+windows_iis_not_found_errors_total{site="Default Web Site"} 1
+# HELP windows_iis_received_bytes_total Number of data bytes that have been received by the Web service (WebService.TotalBytesReceived)
+# TYPE windows_iis_received_bytes_total counter
+windows_iis_received_bytes_total{site="Default Web Site"} 10289
+# HELP windows_iis_recent_worker_process_failures The number of times that worker processes for the application pool failed during the rapid-fail protection interval (RecentWorkerProcessFailures)
+# TYPE windows_iis_recent_worker_process_failures gauge
+windows_iis_recent_worker_process_failures{app="DefaultAppPool"} 0
+# HELP windows_iis_rejected_async_io_requests_total Requests rejected due to bandwidth throttling settings (WebService.TotalRejectedAsyncIORequests)
+# TYPE windows_iis_rejected_async_io_requests_total counter
+windows_iis_rejected_async_io_requests_total{site="Default Web Site"} 0
+# HELP windows_iis_requests_total Number of HTTP requests (WebService.TotalRequests)
+# TYPE windows_iis_requests_total counter
+windows_iis_requests_total{method="COPY",site="Default Web Site"} 0
+windows_iis_requests_total{method="DELETE",site="Default Web Site"} 0
+windows_iis_requests_total{method="GET",site="Default Web Site"} 3
+windows_iis_requests_total{method="HEAD",site="Default Web Site"} 0
+windows_iis_requests_total{method="LOCK",site="Default Web Site"} 0
+windows_iis_requests_total{method="MKCOL",site="Default Web Site"} 0
+windows_iis_requests_total{method="MOVE",site="Default Web Site"} 0
+windows_iis_requests_total{method="OPTIONS",site="Default Web Site"} 0
+windows_iis_requests_total{method="POST",site="Default Web Site"} 0
+windows_iis_requests_total{method="PROPFIND",site="Default Web Site"} 0
+windows_iis_requests_total{method="PROPPATCH",site="Default Web Site"} 0
+windows_iis_requests_total{method="PUT",site="Default Web Site"} 0
+windows_iis_requests_total{method="SEARCH",site="Default Web Site"} 0
+windows_iis_requests_total{method="TRACE",site="Default Web Site"} 0
+windows_iis_requests_total{method="UNLOCK",site="Default Web Site"} 0
+windows_iis_requests_total{method="other",site="Default Web Site"} 0
+# HELP windows_iis_sent_bytes_total Number of data bytes that have been sent by the Web service (WebService.TotalBytesSent)
+# TYPE windows_iis_sent_bytes_total counter
+windows_iis_sent_bytes_total{site="Default Web Site"} 105882
+# HELP windows_iis_server_cache_active_flushed_entries Number of file handles cached that will be closed when all current transfers complete.
+# TYPE windows_iis_server_cache_active_flushed_entries gauge
+windows_iis_server_cache_active_flushed_entries 0
+# HELP windows_iis_server_file_cache_flushes_total Total number of file cache flushes (since service startup)
+# TYPE windows_iis_server_file_cache_flushes_total counter
+windows_iis_server_file_cache_flushes_total 7
+# HELP windows_iis_server_file_cache_hits_total Total number of successful lookups in the user-mode file cache
+# TYPE windows_iis_server_file_cache_hits_total counter
+windows_iis_server_file_cache_hits_total 1
+# HELP windows_iis_server_file_cache_items Current number of files whose contents are present in cache
+# TYPE windows_iis_server_file_cache_items gauge
+windows_iis_server_file_cache_items 1
+# HELP windows_iis_server_file_cache_items_flushed_total Total number of file handles that have been removed from the cache (since service startup)
+# TYPE windows_iis_server_file_cache_items_flushed_total counter
+windows_iis_server_file_cache_items_flushed_total 0
+# HELP windows_iis_server_file_cache_items_total Total number of files whose contents were ever added to the cache (since service startup)
+# TYPE windows_iis_server_file_cache_items_total counter
+windows_iis_server_file_cache_items_total 1
+# HELP windows_iis_server_file_cache_max_memory_bytes Maximum number of bytes used by file cache
+# TYPE windows_iis_server_file_cache_max_memory_bytes counter
+windows_iis_server_file_cache_max_memory_bytes 703
+# HELP windows_iis_server_file_cache_memory_bytes Current number of bytes used by file cache
+# TYPE windows_iis_server_file_cache_memory_bytes gauge
+windows_iis_server_file_cache_memory_bytes 703
+# HELP windows_iis_server_file_cache_queries_total Total number of file cache queries (hits + misses)
+# TYPE windows_iis_server_file_cache_queries_total counter
+windows_iis_server_file_cache_queries_total 9
+# HELP windows_iis_server_metadata_cache_flushes_total Total number of metadata cache flushes (since service startup)
+# TYPE windows_iis_server_metadata_cache_flushes_total counter
+windows_iis_server_metadata_cache_flushes_total 0
+# HELP windows_iis_server_metadata_cache_hits_total Total number of successful lookups in the metadata cache (since service startup)
+# TYPE windows_iis_server_metadata_cache_hits_total counter
+windows_iis_server_metadata_cache_hits_total 3
+# HELP windows_iis_server_metadata_cache_items Number of metadata information blocks currently present in cache
+# TYPE windows_iis_server_metadata_cache_items gauge
+windows_iis_server_metadata_cache_items 1
+# HELP windows_iis_server_metadata_cache_items_cached_total Total number of metadata information blocks added to the cache (since service startup)
+# TYPE windows_iis_server_metadata_cache_items_cached_total counter
+windows_iis_server_metadata_cache_items_cached_total 1
+# HELP windows_iis_server_metadata_cache_items_flushed_total Total number of metadata information blocks removed from the cache (since service startup)
+# TYPE windows_iis_server_metadata_cache_items_flushed_total counter
+windows_iis_server_metadata_cache_items_flushed_total 0
+# HELP windows_iis_server_metadata_cache_queries_total Total metadata cache queries (hits + misses)
+# TYPE windows_iis_server_metadata_cache_queries_total counter
+windows_iis_server_metadata_cache_queries_total 4
+# HELP windows_iis_server_output_cache_active_flushed_items
+# TYPE windows_iis_server_output_cache_active_flushed_items counter
+windows_iis_server_output_cache_active_flushed_items 0
+# HELP windows_iis_server_output_cache_flushes_total Total number of flushes of output cache (since service startup)
+# TYPE windows_iis_server_output_cache_flushes_total counter
+windows_iis_server_output_cache_flushes_total 0
+# HELP windows_iis_server_output_cache_hits_total Total number of successful lookups in output cache (since service startup)
+# TYPE windows_iis_server_output_cache_hits_total counter
+windows_iis_server_output_cache_hits_total 0
+# HELP windows_iis_server_output_cache_items Number of items current present in output cache
+# TYPE windows_iis_server_output_cache_items counter
+windows_iis_server_output_cache_items 0
+# HELP windows_iis_server_output_cache_items_flushed_total Total number of items flushed from output cache (since service startup)
+# TYPE windows_iis_server_output_cache_items_flushed_total counter
+windows_iis_server_output_cache_items_flushed_total 0
+# HELP windows_iis_server_output_cache_memory_bytes Current number of bytes used by output cache
+# TYPE windows_iis_server_output_cache_memory_bytes counter
+windows_iis_server_output_cache_memory_bytes 0
+# HELP windows_iis_server_output_cache_queries_total Total output cache queries (hits + misses)
+# TYPE windows_iis_server_output_cache_queries_total counter
+windows_iis_server_output_cache_queries_total 4
+# HELP windows_iis_server_uri_cache_flushes_total Total number of URI cache flushes (since service startup)
+# TYPE windows_iis_server_uri_cache_flushes_total counter
+windows_iis_server_uri_cache_flushes_total{mode="kernel"} 0
+windows_iis_server_uri_cache_flushes_total{mode="user"} 0
+# HELP windows_iis_server_uri_cache_hits_total Total number of successful lookups in the URI cache (since service startup)
+# TYPE windows_iis_server_uri_cache_hits_total counter
+windows_iis_server_uri_cache_hits_total{mode="kernel"} 0
+windows_iis_server_uri_cache_hits_total{mode="user"} 0
+# HELP windows_iis_server_uri_cache_items Number of URI information blocks currently in the cache
+# TYPE windows_iis_server_uri_cache_items gauge
+windows_iis_server_uri_cache_items{mode="kernel"} 0
+windows_iis_server_uri_cache_items{mode="user"} 0
+# HELP windows_iis_server_uri_cache_items_flushed_total The number of URI information blocks that have been removed from the cache (since service startup)
+# TYPE windows_iis_server_uri_cache_items_flushed_total counter
+windows_iis_server_uri_cache_items_flushed_total{mode="kernel"} 0
+windows_iis_server_uri_cache_items_flushed_total{mode="user"} 0
+# HELP windows_iis_server_uri_cache_items_total Total number of URI information blocks added to the cache (since service startup)
+# TYPE windows_iis_server_uri_cache_items_total counter
+windows_iis_server_uri_cache_items_total{mode="kernel"} 0
+windows_iis_server_uri_cache_items_total{mode="user"} 0
+# HELP windows_iis_server_uri_cache_queries_total Total number of uri cache queries (hits + misses)
+# TYPE windows_iis_server_uri_cache_queries_total counter
+windows_iis_server_uri_cache_queries_total{mode="kernel"} 47
+windows_iis_server_uri_cache_queries_total{mode="user"} 4
+# HELP windows_iis_service_uptime Number of seconds the WebService is up (WebService.ServiceUptime)
+# TYPE windows_iis_service_uptime gauge
+windows_iis_service_uptime{site="Default Web Site"} 258633
+# HELP windows_iis_time_since_last_worker_process_failure The length of time, in seconds, since the last worker process failure occurred for the application pool (TimeSinceLastWorkerProcessFailure)
+# TYPE windows_iis_time_since_last_worker_process_failure gauge
+windows_iis_time_since_last_worker_process_failure{app="DefaultAppPool"} 1.6672399883854828e+09
+# HELP windows_iis_total_application_pool_recycles The number of times that the application pool has been recycled since Windows Process Activation Service (WAS) started (TotalApplicationPoolRecycles)
+# TYPE windows_iis_total_application_pool_recycles counter
+windows_iis_total_application_pool_recycles{app="DefaultAppPool"} 0
+# HELP windows_iis_total_application_pool_start_time The unix timestamp for the application pool of when the Windows Process Activation Service (WAS) started (TotalApplicationPoolUptime)
+# TYPE windows_iis_total_application_pool_start_time counter
+windows_iis_total_application_pool_start_time{app="DefaultAppPool"} 1.6672399883854828e+09
+# HELP windows_iis_total_worker_process_failures The number of times that worker processes have crashed since the application pool was started (TotalWorkerProcessFailures)
+# TYPE windows_iis_total_worker_process_failures counter
+windows_iis_total_worker_process_failures{app="DefaultAppPool"} 0
+# HELP windows_iis_total_worker_process_ping_failures The number of times that Windows Process Activation Service (WAS) did not receive a response to ping messages sent to a worker process (TotalWorkerProcessPingFailures)
+# TYPE windows_iis_total_worker_process_ping_failures counter
+windows_iis_total_worker_process_ping_failures{app="DefaultAppPool"} 0
+# HELP windows_iis_total_worker_process_shutdown_failures The number of times that Windows Process Activation Service (WAS) failed to shut down a worker process (TotalWorkerProcessShutdownFailures)
+# TYPE windows_iis_total_worker_process_shutdown_failures counter
+windows_iis_total_worker_process_shutdown_failures{app="DefaultAppPool"} 0
+# HELP windows_iis_total_worker_process_startup_failures The number of times that Windows Process Activation Service (WAS) failed to start a worker process (TotalWorkerProcessStartupFailures)
+# TYPE windows_iis_total_worker_process_startup_failures counter
+windows_iis_total_worker_process_startup_failures{app="DefaultAppPool"} 0
+# HELP windows_iis_total_worker_processes_created The number of worker processes created for the application pool since Windows Process Activation Service (WAS) started (TotalWorkerProcessesCreated)
+# TYPE windows_iis_total_worker_processes_created counter
+windows_iis_total_worker_processes_created{app="DefaultAppPool"} 1
+# HELP windows_iis_worker_cache_active_flushed_entries Number of file handles cached in user-mode that will be closed when all current transfers complete.
+# TYPE windows_iis_worker_cache_active_flushed_entries gauge
+windows_iis_worker_cache_active_flushed_entries{app="DefaultAppPool",pid="880"} 0
+# HELP windows_iis_worker_current_requests Current number of requests being processed by the worker process
+# TYPE windows_iis_worker_current_requests counter
+windows_iis_worker_current_requests{app="DefaultAppPool",pid="880"} 0
+# HELP windows_iis_worker_current_websocket_requests
+# TYPE windows_iis_worker_current_websocket_requests counter
+windows_iis_worker_current_websocket_requests{app="DefaultAppPool",pid="880"} 0
+# HELP windows_iis_worker_file_cache_flushes_total Total number of files removed from the user-mode cache
+# TYPE windows_iis_worker_file_cache_flushes_total counter
+windows_iis_worker_file_cache_flushes_total{app="DefaultAppPool",pid="880"} 7
+# HELP windows_iis_worker_file_cache_hits_total Total number of successful lookups in the user-mode file cache
+# TYPE windows_iis_worker_file_cache_hits_total counter
+windows_iis_worker_file_cache_hits_total{app="DefaultAppPool",pid="880"} 1
+# HELP windows_iis_worker_file_cache_items Current number of files whose contents are present in user-mode cache
+# TYPE windows_iis_worker_file_cache_items gauge
+windows_iis_worker_file_cache_items{app="DefaultAppPool",pid="880"} 1
+# HELP windows_iis_worker_file_cache_items_flushed_total Total number of file handles that have been removed from the user-mode cache (since service startup)
+# TYPE windows_iis_worker_file_cache_items_flushed_total counter
+windows_iis_worker_file_cache_items_flushed_total{app="DefaultAppPool",pid="880"} 0
+# HELP windows_iis_worker_file_cache_items_total Total number of files whose contents were ever added to the user-mode cache (since service startup)
+# TYPE windows_iis_worker_file_cache_items_total counter
+windows_iis_worker_file_cache_items_total{app="DefaultAppPool",pid="880"} 1
+# HELP windows_iis_worker_file_cache_max_memory_bytes Maximum number of bytes used by user-mode file cache
+# TYPE windows_iis_worker_file_cache_max_memory_bytes counter
+windows_iis_worker_file_cache_max_memory_bytes{app="DefaultAppPool",pid="880"} 703
+# HELP windows_iis_worker_file_cache_memory_bytes Current number of bytes used by user-mode file cache
+# TYPE windows_iis_worker_file_cache_memory_bytes gauge
+windows_iis_worker_file_cache_memory_bytes{app="DefaultAppPool",pid="880"} 703
+# HELP windows_iis_worker_file_cache_queries_total Total file cache queries (hits + misses)
+# TYPE windows_iis_worker_file_cache_queries_total counter
+windows_iis_worker_file_cache_queries_total{app="DefaultAppPool",pid="880"} 9
+# HELP windows_iis_worker_max_threads Maximum number of threads to which the thread pool can grow as needed
+# TYPE windows_iis_worker_max_threads counter
+windows_iis_worker_max_threads{app="DefaultAppPool",pid="880"} 256
+# HELP windows_iis_worker_metadata_cache_flushes_total Total number of user-mode metadata cache flushes (since service startup)
+# TYPE windows_iis_worker_metadata_cache_flushes_total counter
+windows_iis_worker_metadata_cache_flushes_total{app="DefaultAppPool",pid="880"} 0
+# HELP windows_iis_worker_metadata_cache_hits_total Total number of successful lookups in the user-mode metadata cache (since service startup)
+# TYPE windows_iis_worker_metadata_cache_hits_total counter
+windows_iis_worker_metadata_cache_hits_total{app="DefaultAppPool",pid="880"} 3
+# HELP windows_iis_worker_metadata_cache_items Number of metadata information blocks currently present in user-mode cache
+# TYPE windows_iis_worker_metadata_cache_items gauge
+windows_iis_worker_metadata_cache_items{app="DefaultAppPool",pid="880"} 1
+# HELP windows_iis_worker_metadata_cache_items_cached_total Total number of metadata information blocks added to the user-mode cache (since service startup)
+# TYPE windows_iis_worker_metadata_cache_items_cached_total counter
+windows_iis_worker_metadata_cache_items_cached_total{app="DefaultAppPool",pid="880"} 1
+# HELP windows_iis_worker_metadata_cache_items_flushed_total Total number of metadata information blocks removed from the user-mode cache (since service startup)
+# TYPE windows_iis_worker_metadata_cache_items_flushed_total counter
+windows_iis_worker_metadata_cache_items_flushed_total{app="DefaultAppPool",pid="880"} 0
+# HELP windows_iis_worker_metadata_cache_queries_total Total metadata cache queries (hits + misses)
+# TYPE windows_iis_worker_metadata_cache_queries_total counter
+windows_iis_worker_metadata_cache_queries_total{app="DefaultAppPool",pid="880"} 4
+# HELP windows_iis_worker_output_cache_active_flushed_items
+# TYPE windows_iis_worker_output_cache_active_flushed_items counter
+windows_iis_worker_output_cache_active_flushed_items{app="DefaultAppPool",pid="880"} 0
+# HELP windows_iis_worker_output_cache_flushes_total Total number of flushes of output cache (since service startup)
+# TYPE windows_iis_worker_output_cache_flushes_total counter
+windows_iis_worker_output_cache_flushes_total{app="DefaultAppPool",pid="880"} 0
+# HELP windows_iis_worker_output_cache_hits_total Total number of successful lookups in output cache (since service startup)
+# TYPE windows_iis_worker_output_cache_hits_total counter
+windows_iis_worker_output_cache_hits_total{app="DefaultAppPool",pid="880"} 0
+# HELP windows_iis_worker_output_cache_items Number of items current present in output cache
+# TYPE windows_iis_worker_output_cache_items counter
+windows_iis_worker_output_cache_items{app="DefaultAppPool",pid="880"} 0
+# HELP windows_iis_worker_output_cache_items_flushed_total Total number of items flushed from output cache (since service startup)
+# TYPE windows_iis_worker_output_cache_items_flushed_total counter
+windows_iis_worker_output_cache_items_flushed_total{app="DefaultAppPool",pid="880"} 0
+# HELP windows_iis_worker_output_cache_memory_bytes Current number of bytes used by output cache
+# TYPE windows_iis_worker_output_cache_memory_bytes counter
+windows_iis_worker_output_cache_memory_bytes{app="DefaultAppPool",pid="880"} 0
+# HELP windows_iis_worker_output_queries_total Total number of output cache queries (hits + misses)
+# TYPE windows_iis_worker_output_queries_total counter
+windows_iis_worker_output_queries_total{app="DefaultAppPool",pid="880"} 4
+# HELP windows_iis_worker_request_errors_total Total number of requests that returned an error
+# TYPE windows_iis_worker_request_errors_total counter
+windows_iis_worker_request_errors_total{app="DefaultAppPool",pid="880",status_code="401"} 0
+windows_iis_worker_request_errors_total{app="DefaultAppPool",pid="880",status_code="403"} 0
+windows_iis_worker_request_errors_total{app="DefaultAppPool",pid="880",status_code="404"} 1
+windows_iis_worker_request_errors_total{app="DefaultAppPool",pid="880",status_code="500"} 0
+# HELP windows_iis_worker_requests_total Total number of HTTP requests served by the worker process
+# TYPE windows_iis_worker_requests_total counter
+windows_iis_worker_requests_total{app="DefaultAppPool",pid="880"} 3
+# HELP windows_iis_worker_threads Number of threads actively processing requests in the worker process
+# TYPE windows_iis_worker_threads gauge
+windows_iis_worker_threads{app="DefaultAppPool",pid="880",state="busy"} 0
+windows_iis_worker_threads{app="DefaultAppPool",pid="880",state="idle"} 0
+# HELP windows_iis_worker_uri_cache_flushes_total Total number of URI cache flushes (since service startup)
+# TYPE windows_iis_worker_uri_cache_flushes_total counter
+windows_iis_worker_uri_cache_flushes_total{app="DefaultAppPool",pid="880"} 0
+# HELP windows_iis_worker_uri_cache_hits_total Total number of successful lookups in the user-mode URI cache (since service startup)
+# TYPE windows_iis_worker_uri_cache_hits_total counter
+windows_iis_worker_uri_cache_hits_total{app="DefaultAppPool",pid="880"} 0
+# HELP windows_iis_worker_uri_cache_items Number of URI information blocks currently in the user-mode cache
+# TYPE windows_iis_worker_uri_cache_items gauge
+windows_iis_worker_uri_cache_items{app="DefaultAppPool",pid="880"} 0
+# HELP windows_iis_worker_uri_cache_items_flushed_total The number of URI information blocks that have been removed from the user-mode cache (since service startup)
+# TYPE windows_iis_worker_uri_cache_items_flushed_total counter
+windows_iis_worker_uri_cache_items_flushed_total{app="DefaultAppPool",pid="880"} 0
+# HELP windows_iis_worker_uri_cache_items_total Total number of URI information blocks added to the user-mode cache (since service startup)
+# TYPE windows_iis_worker_uri_cache_items_total counter
+windows_iis_worker_uri_cache_items_total{app="DefaultAppPool",pid="880"} 0
+# HELP windows_iis_worker_uri_cache_queries_total Total number of uri cache queries (hits + misses)
+# TYPE windows_iis_worker_uri_cache_queries_total counter
+windows_iis_worker_uri_cache_queries_total{app="DefaultAppPool",pid="880"} 4
+# HELP windows_iis_worker_websocket_connection_accepted_total
+# TYPE windows_iis_worker_websocket_connection_accepted_total counter
+windows_iis_worker_websocket_connection_accepted_total{app="DefaultAppPool",pid="880"} 0
+# HELP windows_iis_worker_websocket_connection_attempts_total
+# TYPE windows_iis_worker_websocket_connection_attempts_total counter
+windows_iis_worker_websocket_connection_attempts_total{app="DefaultAppPool",pid="880"} 0
+# HELP windows_iis_worker_websocket_connection_rejected_total
+# TYPE windows_iis_worker_websocket_connection_rejected_total counter
+windows_iis_worker_websocket_connection_rejected_total{app="DefaultAppPool",pid="880"} 0
# HELP windows_logical_disk_free_bytes Free space in bytes, updates every 10-15 min (LogicalDisk.PercentFreeSpace)
# TYPE windows_logical_disk_free_bytes gauge
windows_logical_disk_free_bytes{volume="C:"} 4.363649024e+10
@@ -876,4 +1210,4 @@ windows_tcp_segments_sent_total{af="ipv6"} 856
# HELP windows_tcp_segments_total (TCP.SegmentsTotal)
# TYPE windows_tcp_segments_total counter
windows_tcp_segments_total{af="ipv4"} 1.547767e+06
-windows_tcp_segments_total{af="ipv6"} 2140
\ No newline at end of file
+windows_tcp_segments_total{af="ipv6"} 2140
diff --git a/modules/wmi/wmi.go b/modules/wmi/wmi.go
index f3351322d..576dbeb6b 100644
--- a/modules/wmi/wmi.go
+++ b/modules/wmi/wmi.go
@@ -37,6 +37,7 @@ func New() *WMI {
volumes: make(map[string]bool),
thermalZones: make(map[string]bool),
processes: make(map[string]bool),
+ iis: make(map[string]bool),
services: make(map[string]bool),
},
charts: &module.Charts{},
@@ -76,6 +77,7 @@ type (
nics map[string]bool
thermalZones map[string]bool
processes map[string]bool
+ iis map[string]bool
services map[string]bool
collectors map[string]bool
collection map[string]bool
diff --git a/modules/wmi/wmi_test.go b/modules/wmi/wmi_test.go
index 010e697d1..1a05720ff 100644
--- a/modules/wmi/wmi_test.go
+++ b/modules/wmi/wmi_test.go
@@ -119,185 +119,203 @@ func TestWMI_Collect(t *testing.T) {
"success on valid response v0.20.0": {
prepare: prepareWMIv0200,
wantCollected: map[string]int64{
- "collector_cpu_duration": 0,
- "collector_cpu_status_fail": 0,
- "collector_cpu_status_success": 1,
- "collector_logical_disk_duration": 0,
- "collector_logical_disk_status_fail": 0,
- "collector_logical_disk_status_success": 1,
- "collector_logon_duration": 113,
- "collector_logon_status_fail": 0,
- "collector_logon_status_success": 1,
- "collector_memory_duration": 0,
- "collector_memory_status_fail": 0,
- "collector_memory_status_success": 1,
- "collector_net_duration": 0,
- "collector_net_status_fail": 0,
- "collector_net_status_success": 1,
- "collector_os_duration": 2,
- "collector_os_status_fail": 0,
- "collector_os_status_success": 1,
- "collector_process_duration": 115,
- "collector_process_status_fail": 0,
- "collector_process_status_success": 1,
- "collector_service_duration": 101,
- "collector_service_status_fail": 0,
- "collector_service_status_success": 1,
- "collector_system_duration": 0,
- "collector_system_status_fail": 0,
- "collector_system_status_success": 1,
- "collector_tcp_duration": 0,
- "collector_tcp_status_fail": 0,
- "collector_tcp_status_success": 1,
- "cpu_core_0,0_cstate_c1": 160233427,
- "cpu_core_0,0_cstate_c2": 0,
- "cpu_core_0,0_cstate_c3": 0,
- "cpu_core_0,0_dpc_time": 67109,
- "cpu_core_0,0_dpcs": 4871900,
- "cpu_core_0,0_idle_time": 162455593,
- "cpu_core_0,0_interrupt_time": 77281,
- "cpu_core_0,0_interrupts": 155194331,
- "cpu_core_0,0_privileged_time": 1182109,
- "cpu_core_0,0_user_time": 1073671,
- "cpu_core_0,1_cstate_c1": 159528054,
- "cpu_core_0,1_cstate_c2": 0,
- "cpu_core_0,1_cstate_c3": 0,
- "cpu_core_0,1_dpc_time": 11093,
- "cpu_core_0,1_dpcs": 1650552,
- "cpu_core_0,1_idle_time": 159478125,
- "cpu_core_0,1_interrupt_time": 58093,
- "cpu_core_0,1_interrupts": 79325847,
- "cpu_core_0,1_privileged_time": 1801234,
- "cpu_core_0,1_user_time": 3432000,
- "cpu_core_0,2_cstate_c1": 159891723,
- "cpu_core_0,2_cstate_c2": 0,
- "cpu_core_0,2_cstate_c3": 0,
- "cpu_core_0,2_dpc_time": 16062,
- "cpu_core_0,2_dpcs": 2236469,
- "cpu_core_0,2_idle_time": 159848437,
- "cpu_core_0,2_interrupt_time": 53515,
- "cpu_core_0,2_interrupts": 67305419,
- "cpu_core_0,2_privileged_time": 1812546,
- "cpu_core_0,2_user_time": 3050250,
- "cpu_core_0,3_cstate_c1": 159544117,
- "cpu_core_0,3_cstate_c2": 0,
- "cpu_core_0,3_cstate_c3": 0,
- "cpu_core_0,3_dpc_time": 8140,
- "cpu_core_0,3_dpcs": 1185046,
- "cpu_core_0,3_idle_time": 159527546,
- "cpu_core_0,3_interrupt_time": 44484,
- "cpu_core_0,3_interrupts": 60766938,
- "cpu_core_0,3_privileged_time": 1760828,
- "cpu_core_0,3_user_time": 3422875,
- "cpu_dpc_time": 102404,
- "cpu_idle_time": 641309701,
- "cpu_interrupt_time": 233373,
- "cpu_privileged_time": 6556717,
- "cpu_user_time": 10978796,
- "logical_disk_C:_free_space": 43636490240,
- "logical_disk_C:_read_bytes_total": 17676328448,
- "logical_disk_C:_read_latency": 97420,
- "logical_disk_C:_reads_total": 350593,
- "logical_disk_C:_total_space": 67938287616,
- "logical_disk_C:_used_space": 24301797376,
- "logical_disk_C:_write_bytes_total": 9135282688,
- "logical_disk_C:_write_latency": 123912,
- "logical_disk_C:_writes_total": 450705,
- "logon_type_batch_sessions": 0,
- "logon_type_cached_interactive_sessions": 0,
- "logon_type_cached_remote_interactive_sessions": 0,
- "logon_type_cached_unlock_sessions": 0,
- "logon_type_interactive_sessions": 2,
- "logon_type_network_clear_text_sessions": 0,
- "logon_type_network_sessions": 0,
- "logon_type_new_credentials_sessions": 0,
- "logon_type_proxy_sessions": 0,
- "logon_type_remote_interactive_sessions": 0,
- "logon_type_service_sessions": 0,
- "logon_type_system_sessions": 0,
- "logon_type_unlock_sessions": 0,
- "memory_available_bytes": 1379942400,
- "memory_cache_faults_total": 8009603,
- "memory_cache_total": 1392185344,
- "memory_commit_limit": 5733113856,
- "memory_committed_bytes": 3447439360,
- "memory_modified_page_list_bytes": 32653312,
- "memory_not_committed_bytes": 2285674496,
- "memory_page_faults_total": 119093924,
- "memory_pool_nonpaged_bytes_total": 126865408,
- "memory_pool_paged_bytes": 303906816,
- "memory_standby_cache_core_bytes": 107376640,
- "memory_standby_cache_normal_priority_bytes": 1019121664,
- "memory_standby_cache_reserve_bytes": 233033728,
- "memory_standby_cache_total": 1359532032,
- "memory_swap_page_reads_total": 402087,
- "memory_swap_page_writes_total": 7012,
- "memory_swap_pages_read_total": 4643279,
- "memory_swap_pages_written_total": 312896,
- "memory_used_bytes": 2876776448,
- "net_nic_Intel_R_PRO_1000_MT_Network_Connection_bytes_received": 38290755856,
- "net_nic_Intel_R_PRO_1000_MT_Network_Connection_bytes_sent": 8211165504,
+ "collector_cpu_duration": 0,
+ "collector_cpu_status_fail": 0,
+ "collector_cpu_status_success": 1,
+ "collector_iis_duration": 0,
+ "collector_iis_status_fail": 0,
+ "collector_iis_status_success": 1,
+ "collector_logical_disk_duration": 0,
+ "collector_logical_disk_status_fail": 0,
+ "collector_logical_disk_status_success": 1,
+ "collector_logon_duration": 113,
+ "collector_logon_status_fail": 0,
+ "collector_logon_status_success": 1,
+ "collector_memory_duration": 0,
+ "collector_memory_status_fail": 0,
+ "collector_memory_status_success": 1,
+ "collector_net_duration": 0,
+ "collector_net_status_fail": 0,
+ "collector_net_status_success": 1,
+ "collector_os_duration": 2,
+ "collector_os_status_fail": 0,
+ "collector_os_status_success": 1,
+ "collector_process_duration": 115,
+ "collector_process_status_fail": 0,
+ "collector_process_status_success": 1,
+ "collector_service_duration": 101,
+ "collector_service_status_fail": 0,
+ "collector_service_status_success": 1,
+ "collector_system_duration": 0,
+ "collector_system_status_fail": 0,
+ "collector_system_status_success": 1,
+ "collector_tcp_duration": 0,
+ "collector_tcp_status_fail": 0,
+ "collector_tcp_status_success": 1,
+ "cpu_core_0,0_cstate_c1": 160233427,
+ "cpu_core_0,0_cstate_c2": 0,
+ "cpu_core_0,0_cstate_c3": 0,
+ "cpu_core_0,0_dpc_time": 67109,
+ "cpu_core_0,0_dpcs": 4871900,
+ "cpu_core_0,0_idle_time": 162455593,
+ "cpu_core_0,0_interrupt_time": 77281,
+ "cpu_core_0,0_interrupts": 155194331,
+ "cpu_core_0,0_privileged_time": 1182109,
+ "cpu_core_0,0_user_time": 1073671,
+ "cpu_core_0,1_cstate_c1": 159528054,
+ "cpu_core_0,1_cstate_c2": 0,
+ "cpu_core_0,1_cstate_c3": 0,
+ "cpu_core_0,1_dpc_time": 11093,
+ "cpu_core_0,1_dpcs": 1650552,
+ "cpu_core_0,1_idle_time": 159478125,
+ "cpu_core_0,1_interrupt_time": 58093,
+ "cpu_core_0,1_interrupts": 79325847,
+ "cpu_core_0,1_privileged_time": 1801234,
+ "cpu_core_0,1_user_time": 3432000,
+ "cpu_core_0,2_cstate_c1": 159891723,
+ "cpu_core_0,2_cstate_c2": 0,
+ "cpu_core_0,2_cstate_c3": 0,
+ "cpu_core_0,2_dpc_time": 16062,
+ "cpu_core_0,2_dpcs": 2236469,
+ "cpu_core_0,2_idle_time": 159848437,
+ "cpu_core_0,2_interrupt_time": 53515,
+ "cpu_core_0,2_interrupts": 67305419,
+ "cpu_core_0,2_privileged_time": 1812546,
+ "cpu_core_0,2_user_time": 3050250,
+ "cpu_core_0,3_cstate_c1": 159544117,
+ "cpu_core_0,3_cstate_c2": 0,
+ "cpu_core_0,3_cstate_c3": 0,
+ "cpu_core_0,3_dpc_time": 8140,
+ "cpu_core_0,3_dpcs": 1185046,
+ "cpu_core_0,3_idle_time": 159527546,
+ "cpu_core_0,3_interrupt_time": 44484,
+ "cpu_core_0,3_interrupts": 60766938,
+ "cpu_core_0,3_privileged_time": 1760828,
+ "cpu_core_0,3_user_time": 3422875,
+ "cpu_dpc_time": 102404,
+ "cpu_idle_time": 641309701,
+ "cpu_interrupt_time": 233373,
+ "cpu_privileged_time": 6556717,
+ "cpu_user_time": 10978796,
+ "iis_website_Default_Web_Site_connection_attempts_all_instances_total": 1,
+ "iis_website_Default_Web_Site_current_anonymous_users": 0,
+ "iis_website_Default_Web_Site_current_connections": 0,
+ "iis_website_Default_Web_Site_current_isapi_extension_requests": 0,
+ "iis_website_Default_Web_Site_current_non_anonymous_users": 0,
+ "iis_website_Default_Web_Site_files_received_total": 0,
+ "iis_website_Default_Web_Site_files_sent_total": 2,
+ "iis_website_Default_Web_Site_isapi_extension_requests_total": 0,
+ "iis_website_Default_Web_Site_locked_errors_total": 0,
+ "iis_website_Default_Web_Site_logon_attempts_total": 4,
+ "iis_website_Default_Web_Site_not_found_errors_total": 1,
+ "iis_website_Default_Web_Site_received_bytes_total": 10289,
+ "iis_website_Default_Web_Site_requests_total": 3,
+ "iis_website_Default_Web_Site_sent_bytes_total": 105882,
+ "iis_website_Default_Web_Site_service_uptime": 258633,
+ "logical_disk_C:_free_space": 43636490240,
+ "logical_disk_C:_read_bytes_total": 17676328448,
+ "logical_disk_C:_read_latency": 97420,
+ "logical_disk_C:_reads_total": 350593,
+ "logical_disk_C:_total_space": 67938287616,
+ "logical_disk_C:_used_space": 24301797376,
+ "logical_disk_C:_write_bytes_total": 9135282688,
+ "logical_disk_C:_write_latency": 123912,
+ "logical_disk_C:_writes_total": 450705,
+ "logon_type_batch_sessions": 0,
+ "logon_type_cached_interactive_sessions": 0,
+ "logon_type_cached_remote_interactive_sessions": 0,
+ "logon_type_cached_unlock_sessions": 0,
+ "logon_type_interactive_sessions": 2,
+ "logon_type_network_clear_text_sessions": 0,
+ "logon_type_network_sessions": 0,
+ "logon_type_new_credentials_sessions": 0,
+ "logon_type_proxy_sessions": 0,
+ "logon_type_remote_interactive_sessions": 0,
+ "logon_type_service_sessions": 0,
+ "logon_type_system_sessions": 0,
+ "logon_type_unlock_sessions": 0,
+ "memory_available_bytes": 1379942400,
+ "memory_cache_faults_total": 8009603,
+ "memory_cache_total": 1392185344,
+ "memory_commit_limit": 5733113856,
+ "memory_committed_bytes": 3447439360,
+ "memory_modified_page_list_bytes": 32653312,
+ "memory_not_committed_bytes": 2285674496,
+ "memory_page_faults_total": 119093924,
+ "memory_pool_nonpaged_bytes_total": 126865408,
+ "memory_pool_paged_bytes": 303906816,
+ "memory_standby_cache_core_bytes": 107376640,
+ "memory_standby_cache_normal_priority_bytes": 1019121664,
+ "memory_standby_cache_reserve_bytes": 233033728,
+ "memory_standby_cache_total": 1359532032,
+ "memory_swap_page_reads_total": 402087,
+ "memory_swap_page_writes_total": 7012,
+ "memory_swap_pages_read_total": 4643279,
+ "memory_swap_pages_written_total": 312896,
+ "memory_used_bytes": 2876776448,
+ "net_nic_Intel_R_PRO_1000_MT_Network_Connection_bytes_received": 38290755856,
+ "net_nic_Intel_R_PRO_1000_MT_Network_Connection_bytes_sent": 8211165504,
"net_nic_Intel_R_PRO_1000_MT_Network_Connection_packets_outbound_discarded": 0,
"net_nic_Intel_R_PRO_1000_MT_Network_Connection_packets_outbound_errors": 0,
"net_nic_Intel_R_PRO_1000_MT_Network_Connection_packets_received_discarded": 0,
"net_nic_Intel_R_PRO_1000_MT_Network_Connection_packets_received_errors": 0,
"net_nic_Intel_R_PRO_1000_MT_Network_Connection_packets_received_total": 4120869,
"net_nic_Intel_R_PRO_1000_MT_Network_Connection_packets_sent_total": 1332466,
- "os_paging_free_bytes": 1414107136,
- "os_paging_limit_bytes": 1476395008,
- "os_paging_used_bytes": 62287872,
- "os_physical_memory_free_bytes": 1379946496,
- "os_processes": 152,
- "os_processes_limit": 4294967295,
- "os_users": 2,
- "os_visible_memory_bytes": 4256718848,
- "os_visible_memory_used_bytes": 2876772352,
- "process_msedge_cpu_time": 1919893,
- "process_msedge_handles": 5779,
- "process_msedge_io_bytes": 3978227378,
- "process_msedge_io_operations": 16738642,
- "process_msedge_page_faults": 5355941,
- "process_msedge_page_file_bytes": 681603072,
- "process_msedge_threads": 213,
- "process_msedge_working_set_private_bytes": 461344768,
- "service_dhcp_state_continue_pending": 0,
- "service_dhcp_state_pause_pending": 0,
- "service_dhcp_state_paused": 0,
- "service_dhcp_state_running": 1,
- "service_dhcp_state_start_pending": 0,
- "service_dhcp_state_stop_pending": 0,
- "service_dhcp_state_stopped": 0,
- "service_dhcp_state_unknown": 0,
- "service_dhcp_status_degraded": 0,
- "service_dhcp_status_error": 0,
- "service_dhcp_status_lost_comm": 0,
- "service_dhcp_status_no_contact": 0,
- "service_dhcp_status_nonrecover": 0,
- "service_dhcp_status_ok": 1,
- "service_dhcp_status_pred_fail": 0,
- "service_dhcp_status_service": 0,
- "service_dhcp_status_starting": 0,
- "service_dhcp_status_stopping": 0,
- "service_dhcp_status_stressed": 0,
- "service_dhcp_status_unknown": 0,
- "system_threads": 1559,
- "system_up_time": 221423,
- "tcp_ipv4_conns_active": 4301,
- "tcp_ipv4_conns_established": 7,
- "tcp_ipv4_conns_failures": 137,
- "tcp_ipv4_conns_passive": 501,
- "tcp_ipv4_conns_resets": 1282,
- "tcp_ipv4_segments_received": 676388,
- "tcp_ipv4_segments_retransmitted": 2120,
- "tcp_ipv4_segments_sent": 871379,
- "tcp_ipv6_conns_active": 214,
- "tcp_ipv6_conns_established": 0,
- "tcp_ipv6_conns_failures": 214,
- "tcp_ipv6_conns_passive": 0,
- "tcp_ipv6_conns_resets": 0,
- "tcp_ipv6_segments_received": 1284,
- "tcp_ipv6_segments_retransmitted": 428,
- "tcp_ipv6_segments_sent": 856,
+ "os_paging_free_bytes": 1414107136,
+ "os_paging_limit_bytes": 1476395008,
+ "os_paging_used_bytes": 62287872,
+ "os_physical_memory_free_bytes": 1379946496,
+ "os_processes": 152,
+ "os_processes_limit": 4294967295,
+ "os_users": 2,
+ "os_visible_memory_bytes": 4256718848,
+ "os_visible_memory_used_bytes": 2876772352,
+ "process_msedge_cpu_time": 1919893,
+ "process_msedge_handles": 5779,
+ "process_msedge_io_bytes": 3978227378,
+ "process_msedge_io_operations": 16738642,
+ "process_msedge_page_faults": 5355941,
+ "process_msedge_page_file_bytes": 681603072,
+ "process_msedge_threads": 213,
+ "process_msedge_working_set_private_bytes": 461344768,
+ "service_dhcp_state_continue_pending": 0,
+ "service_dhcp_state_pause_pending": 0,
+ "service_dhcp_state_paused": 0,
+ "service_dhcp_state_running": 1,
+ "service_dhcp_state_start_pending": 0,
+ "service_dhcp_state_stop_pending": 0,
+ "service_dhcp_state_stopped": 0,
+ "service_dhcp_state_unknown": 0,
+ "service_dhcp_status_degraded": 0,
+ "service_dhcp_status_error": 0,
+ "service_dhcp_status_lost_comm": 0,
+ "service_dhcp_status_no_contact": 0,
+ "service_dhcp_status_nonrecover": 0,
+ "service_dhcp_status_ok": 1,
+ "service_dhcp_status_pred_fail": 0,
+ "service_dhcp_status_service": 0,
+ "service_dhcp_status_starting": 0,
+ "service_dhcp_status_stopping": 0,
+ "service_dhcp_status_stressed": 0,
+ "service_dhcp_status_unknown": 0,
+ "system_threads": 1559,
+ "system_up_time": 563137,
+ "tcp_ipv4_conns_active": 4301,
+ "tcp_ipv4_conns_established": 7,
+ "tcp_ipv4_conns_failures": 137,
+ "tcp_ipv4_conns_passive": 501,
+ "tcp_ipv4_conns_resets": 1282,
+ "tcp_ipv4_segments_received": 676388,
+ "tcp_ipv4_segments_retransmitted": 2120,
+ "tcp_ipv4_segments_sent": 871379,
+ "tcp_ipv6_conns_active": 214,
+ "tcp_ipv6_conns_established": 0,
+ "tcp_ipv6_conns_failures": 214,
+ "tcp_ipv6_conns_passive": 0,
+ "tcp_ipv6_conns_resets": 0,
+ "tcp_ipv6_segments_received": 1284,
+ "tcp_ipv6_segments_retransmitted": 428,
+ "tcp_ipv6_segments_sent": 856,
},
},
"fails if endpoint returns invalid data": {
@@ -331,6 +349,7 @@ func TestWMI_Collect(t *testing.T) {
})
}
}
+
func testCharts(t *testing.T, wmi *WMI, mx map[string]int64) {
ensureChartsDimsCreated(t, wmi)
ensureCollectedHasAllChartsDimsVarsIDs(t, wmi, mx)
@@ -417,6 +436,12 @@ func ensureChartsDimsCreated(t *testing.T, w *WMI) {
assert.Truef(t, w.Charts().Has(id), "charts has no '%s' chart for '%s' service", id, svc)
}
}
+ for website := range w.cache.iis {
+ for _, chart := range iisWebsiteChartsTmpl {
+ id := fmt.Sprintf(chart.ID, website)
+ assert.Truef(t, w.Charts().Has(id), "charts has no '%s' chart for '%s' website", id, website)
+ }
+ }
for name := range w.cache.collectors {
for _, chart := range collectorChartsTmpl {
id := fmt.Sprintf(chart.ID, name)