memory: fix panics if metrics does not exists (#1960)

Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>

(cherry picked from commit ecc805f0fa)
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
Jan-Otto Kröpke
2025-04-04 23:21:26 +02:00
parent b62c724977
commit fe17f5f597
39 changed files with 576 additions and 399 deletions

View File

@@ -1,23 +1,2 @@
# example configuration file for windows_exporter
collectors:
enabled: cpu,cpu_info,exchange,iis,logical_disk,logon,memory,net,os,performancecounter,process,remote_fx,service,system,tcp,time,terminal_services,textfile
collector:
service:
include: "windows_exporter"
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"
log:
level: warn
web:
listen-address: ":9183"