Skip to main content

Windows Agent Metrics

The CodeXray Windows Agent exposes Windows host metrics in Prometheus format. Every metric begins with the prefix windows_ and is produced by one of the agent's collectors.

Enable only what you need

Each collector adds CPU and telemetry overhead. Enable collectors via collectors.enabled in config.yaml — only what your environment actually runs. Full list of available collectors: .\codexray_windows_exporter.exe --collectors.print.


System & CPU​

cpu collector (enabled by default)​

MetricTypeDescription
windows_cpu_time_totalCounterCPU time by mode — label mode (user, privileged, idle, interrupt, dpc)
windows_cpu_core_frequency_mhzGaugeCurrent frequency of each CPU core
windows_cpu_processor_performance_totalCounterProcessor performance counter
windows_cpu_processor_utility_totalCounterProcessor utility counter

Common labels: core (logical core identifier)

cpu_info collector​

MetricTypeDescription
windows_cpu_infoGaugeCPU manufacturer, model, architecture — labels manufacturer, name, description, core_count

system collector (enabled by default)​

MetricTypeDescription
windows_system_context_switches_totalCounterContext switches per second across all CPUs
windows_system_exception_dispatches_totalCounterSystem-wide exception dispatches
windows_system_processor_queue_lengthGaugeRunnable threads waiting for a CPU
windows_system_system_calls_totalCounterSystem calls issued
windows_system_up_timeGaugeTime since last boot, in seconds

cs collector​

MetricTypeDescription
windows_cs_hostnameGaugeHostname — label hostname, domain, fqdn
windows_cs_logical_processorsGaugeLogical processor count
windows_cs_physical_memory_bytesGaugeTotal physical memory

Memory​

memory collector (enabled by default)​

MetricTypeDescription
windows_memory_available_bytesGaugeFree memory available to applications
windows_memory_cache_bytesGaugeStandby cache
windows_memory_committed_bytesGaugeTotal committed memory
windows_memory_commit_limit_bytesGaugeCommit limit (physical + pagefile)
windows_memory_page_faults_totalCounterTotal page faults
windows_memory_swap_page_reads_totalCounterPages read from the pagefile
windows_memory_swap_page_writes_totalCounterPages written to the pagefile
windows_memory_standby_cache_core_bytesGaugeStandby cache core
windows_memory_pool_nonpaged_bytesGaugeKernel non-paged pool size
windows_memory_pool_paged_bytesGaugeKernel paged pool size

pagefile collector​

MetricTypeDescription
windows_pagefile_usage_bytesGaugePagefile usage by file
windows_pagefile_usage_peak_bytesGaugePeak pagefile usage

Disk​

logical_disk collector (enabled by default)​

MetricTypeDescription
windows_logical_disk_size_bytesGaugeLogical disk size — label volume
windows_logical_disk_free_bytesGaugeFree space
windows_logical_disk_reads_total / _writes_totalCounterRead/write operation counts
windows_logical_disk_read_bytes_total / _write_bytes_totalCounterBytes read/written
windows_logical_disk_read_seconds_total / _write_seconds_totalCounterTime spent in I/O (for avg-latency derivation)
windows_logical_disk_idle_seconds_totalCounterIdle time
windows_logical_disk_avg_read_requests_queuedGaugeAverage queue depth for reads
windows_logical_disk_avg_write_requests_queuedGaugeAverage queue depth for writes

physical_disk collector (enabled by default)​

Same shape as logical_disk, with label disk instead of volume — metrics at the physical device level.

diskdrive collector​

MetricTypeDescription
windows_diskdrive_infoGaugeDrive metadata — name, model, serial_number, size
windows_diskdrive_partitionsGaugePartition count
windows_diskdrive_statusGaugeDrive status code

Network​

net collector (enabled by default)​

MetricTypeDescription
windows_net_bytes_received_totalCounterBytes received — label nic
windows_net_bytes_sent_totalCounterBytes sent
windows_net_packets_received_total / _sent_totalCounterPacket counts
windows_net_packets_received_errors_total / _outbound_errors_totalCounterError counts
windows_net_packets_received_discarded_total / _outbound_discarded_totalCounterDropped packets
windows_net_current_bandwidth_bytesGaugeCurrent link bandwidth

tcp collector​

MetricTypeDescription
windows_tcp_connections_active_totalCounterActive TCP connections — label af (IPv4/IPv6)
windows_tcp_connections_establishedGaugeCurrently established connections
windows_tcp_connections_passive_totalCounterPassive connections accepted
windows_tcp_connection_failures_totalCounterConnection failures
windows_tcp_segments_retransmitted_totalCounterRetransmitted segments

udp collector​

MetricTypeDescription
windows_udp_datagrams_received_totalCounterDatagrams received
windows_udp_datagrams_sent_totalCounterDatagrams sent
windows_udp_datagrams_no_port_totalCounterNo-port errors
windows_udp_datagrams_received_errors_totalCounterReceive errors

Services & Processes​

service collector (enabled by default)​

MetricTypeDescription
windows_service_infoGaugeService metadata — label name, display_name, process_id
windows_service_stateGaugeCurrent state — label state (running, stopped, start_pending, etc.)
windows_service_start_modeGaugeHow the service starts — label start_mode (auto, manual, disabled)
Filter with include / exclude

The service collector by default reports on every Windows Service — which is a lot. Use collector.service.include (regex) to scope to services you care about. Example: "w3svc|mssqlserver|codexray.*".

process collector​

MetricTypeDescription
windows_process_cpu_time_totalCounterProcess CPU time — label process, pid
windows_process_working_set_bytesGaugeWorking set memory
windows_process_virtual_bytesGaugeVirtual memory size
windows_process_thread_countGaugeCurrent thread count
windows_process_handle_countGaugeHandle count
windows_process_io_bytes_totalCounterI/O bytes
windows_process_io_operations_totalCounterI/O operations

scheduled_task collector​

MetricTypeDescription
windows_scheduled_task_last_resultGaugeLast run result code
windows_scheduled_task_missed_runs_totalCounterMissed scheduled runs
windows_scheduled_task_stateGaugeCurrent state

Windows Applications​

iis collector​

Per-site and per-application-pool metrics for IIS.

MetricDescription
windows_iis_current_connectionsGauge, live connection count per site
windows_iis_requests_totalCounter, request counts by HTTP method
windows_iis_received_bytes_total / _sent_bytes_totalCounter, traffic
windows_iis_anonymous_users_total / _non_anonymous_users_totalCounter, user counts
windows_iis_worker_process_runningGauge, worker process count per pool
windows_iis_server_cache_active_flushed_entriesGauge, kernel cache state

mssql collector​

SQL Server performance objects — windows_mssql_*. Covers the standard DMVs and performance counters: sql_server_statistics_batch_requests_total, sql_server_memory_manager_memory_grants_pending, sql_server_locks_lock_waits_total, and dozens more.

exchange collector​

Exchange Server metrics — transport queues, RPC latencies, OWA active connections, database availability — all prefixed windows_exchange_.

hyperv collector​

Hyper-V host + VM metrics: windows_hyperv_hypervisor_root_virtual_processor_*, windows_hyperv_vm_*, CPU/memory/disk/network per VM.

Active Directory​

  • ad — windows_ad_* — database cache, security context, lookups
  • adfs — windows_adfs_* — ADFS token issuance, proxy requests
  • adcs — windows_adcs_* — certificate requests, template usage

DNS / DHCP​

  • dns — request rates, zone transfer rates, cache state
  • dhcp — scope usage, lease activity

exchange, smtp, smb, smbclient, msmq​

Each exposes its own subsystem's counters. Enable per your environment.


.NET Framework​

netframework collector​

For classic .NET Framework workloads. Metrics include:

MetricDescription
windows_netframework_clrexceptions_exceptions_thrown_totalExceptions thrown
windows_netframework_clrinterop_marshalling_totalMarshalling events
windows_netframework_clrjit_methods_jit_compiled_totalJIT-compiled method count
windows_netframework_clrloading_assemblies_loaded_totalAssembly load events
windows_netframework_clrlocksandthreads_contentions_totalLock contentions
windows_netframework_clrlocksandthreads_queue_length_totalLock queue length
windows_netframework_clrmemory_gc_*GC event counts and times by generation
windows_netframework_clrremoting_remote_calls_total.NET remoting calls
windows_netframework_clrsecurity_link_time_checks_totalSecurity checks

Custom Metrics​

textfile collector​

Reads Prometheus-format .prom files from a directory on disk and publishes them as metrics. Use for app-specific signals that don't justify a dedicated exporter:

collector:
textfile:
directory: "C:\\Program Files\\codexray\\textfile"

performancecounter collector​

Expose any Windows Performance Counter as a Prometheus metric — including from third-party applications that register their own counters (Photon, custom ETW providers, proprietary middleware). Configured in config.yaml:

collector:
performancecounter:
objects: |-
- name: photon_udp
object: "Photon Socket Server: UDP"
instances: ["*"]
counters:
- name: "UDP: Datagrams in"
metric: "photon_udp_datagrams"
labels:
direction: "in"
- name: "UDP: Datagrams out"
metric: "photon_udp_datagrams"
labels:
direction: "out"

Agent Self-Metrics​

MetricDescription
windows_exporter_collector_duration_secondsHow long each collector takes per scrape
windows_exporter_collector_successWhether the collector succeeded (1/0)
windows_exporter_collector_timeoutWhether the collector hit its timeout
go_*, process_*Standard Go-runtime and process metrics

The Full List​

The Windows Agent inherits collectors from the Prometheus community windows_exporter and CodeXray adds tracking back to the collector endpoint. For the exhaustive metric list per collector, see the upstream collector documentation or run:

.\codexray_windows_exporter.exe --collectors.print

Each collector's --help output lists every metric it exposes plus the exact counters it reads from Windows.


Next Steps​