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)
Metric Type Description windows_cpu_time_totalCounter CPU time by mode — label mode (user, privileged, idle, interrupt, dpc) windows_cpu_core_frequency_mhzGauge Current frequency of each CPU core windows_cpu_processor_performance_totalCounter Processor performance counter windows_cpu_processor_utility_totalCounter Processor utility counter
Common labels: core (logical core identifier)
cpu_info collector
Metric Type Description windows_cpu_infoGauge CPU manufacturer, model, architecture — labels manufacturer, name, description, core_count
system collector (enabled by default)
Metric Type Description windows_system_context_switches_totalCounter Context switches per second across all CPUs windows_system_exception_dispatches_totalCounter System-wide exception dispatches windows_system_processor_queue_lengthGauge Runnable threads waiting for a CPU windows_system_system_calls_totalCounter System calls issued windows_system_up_timeGauge Time since last boot, in seconds
cs collector
Metric Type Description windows_cs_hostnameGauge Hostname — label hostname, domain, fqdn windows_cs_logical_processorsGauge Logical processor count windows_cs_physical_memory_bytesGauge Total physical memory
Memory
memory collector (enabled by default)
Metric Type Description windows_memory_available_bytesGauge Free memory available to applications windows_memory_cache_bytesGauge Standby cache windows_memory_committed_bytesGauge Total committed memory windows_memory_commit_limit_bytesGauge Commit limit (physical + pagefile) windows_memory_page_faults_totalCounter Total page faults windows_memory_swap_page_reads_totalCounter Pages read from the pagefile windows_memory_swap_page_writes_totalCounter Pages written to the pagefile windows_memory_standby_cache_core_bytesGauge Standby cache core windows_memory_pool_nonpaged_bytesGauge Kernel non-paged pool size windows_memory_pool_paged_bytesGauge Kernel paged pool size
pagefile collector
Metric Type Description windows_pagefile_usage_bytesGauge Pagefile usage by file windows_pagefile_usage_peak_bytesGauge Peak pagefile usage
Disk
logical_disk collector (enabled by default)
Metric Type Description windows_logical_disk_size_bytesGauge Logical disk size — label volume windows_logical_disk_free_bytesGauge Free space windows_logical_disk_reads_total / _writes_totalCounter Read/write operation counts windows_logical_disk_read_bytes_total / _write_bytes_totalCounter Bytes read/written windows_logical_disk_read_seconds_total / _write_seconds_totalCounter Time spent in I/O (for avg-latency derivation) windows_logical_disk_idle_seconds_totalCounter Idle time windows_logical_disk_avg_read_requests_queuedGauge Average queue depth for reads windows_logical_disk_avg_write_requests_queuedGauge Average 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
Metric Type Description windows_diskdrive_infoGauge Drive metadata — name, model, serial_number, size windows_diskdrive_partitionsGauge Partition count windows_diskdrive_statusGauge Drive status code
Network
net collector (enabled by default)
Metric Type Description windows_net_bytes_received_totalCounter Bytes received — label nic windows_net_bytes_sent_totalCounter Bytes sent windows_net_packets_received_total / _sent_totalCounter Packet counts windows_net_packets_received_errors_total / _outbound_errors_totalCounter Error counts windows_net_packets_received_discarded_total / _outbound_discarded_totalCounter Dropped packets windows_net_current_bandwidth_bytesGauge Current link bandwidth
tcp collector
Metric Type Description windows_tcp_connections_active_totalCounter Active TCP connections — label af (IPv4/IPv6) windows_tcp_connections_establishedGauge Currently established connections windows_tcp_connections_passive_totalCounter Passive connections accepted windows_tcp_connection_failures_totalCounter Connection failures windows_tcp_segments_retransmitted_totalCounter Retransmitted segments
udp collector
Metric Type Description windows_udp_datagrams_received_totalCounter Datagrams received windows_udp_datagrams_sent_totalCounter Datagrams sent windows_udp_datagrams_no_port_totalCounter No-port errors windows_udp_datagrams_received_errors_totalCounter Receive errors
Services & Processes
service collector (enabled by default)
Metric Type Description windows_service_infoGauge Service metadata — label name, display_name, process_id windows_service_stateGauge Current state — label state (running, stopped, start_pending, etc.) windows_service_start_modeGauge How the service starts — label start_mode (auto, manual, disabled)
Filter with
include /
excludeThe 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
Metric Type Description windows_process_cpu_time_totalCounter Process CPU time — label process, pid windows_process_working_set_bytesGauge Working set memory windows_process_virtual_bytesGauge Virtual memory size windows_process_thread_countGauge Current thread count windows_process_handle_countGauge Handle count windows_process_io_bytes_totalCounter I/O bytes windows_process_io_operations_totalCounter I/O operations
scheduled_task collector
Metric Type Description windows_scheduled_task_last_resultGauge Last run result code windows_scheduled_task_missed_runs_totalCounter Missed scheduled runs windows_scheduled_task_stateGauge Current state
Windows Applications
iis collector
Per-site and per-application-pool metrics for IIS.
Metric Description 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:
Metric Description 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"
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
Metric Description 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