process: add collector.process.counter-version CLI parameter (#2064)

This commit is contained in:
Jan-Otto Kröpke
2025-05-31 08:46:30 +02:00
committed by GitHub
parent 298d820bd6
commit e673f192d2
7 changed files with 93 additions and 400 deletions

View File

@@ -63,9 +63,12 @@ func NewCollector[T any](object string, _ []string) (*Collector, error) {
}
for _, f := range reflect.VisibleFields(valueType) {
counterName, ok := f.Tag.Lookup("perfdata")
counterName, ok := f.Tag.Lookup("perfdata_v1")
if !ok {
continue
counterName, ok = f.Tag.Lookup("perfdata")
if !ok {
continue
}
}
var counter Counter