test-in-prod / carbonator

Windows service that collects performance counters and reports metrics to a Graphite server
MIT License
76 stars 13 forks source link

Regex replace for templating? #27

Open blurpiflurp opened 6 years ago

blurpiflurp commented 6 years ago

Hi!

I'm pulling in data from for example

Which works really nicely.

However the %COUNTER_INSTANCE% in this case might be C__ClusterStorage_Volume14_VM_vhd

Is there anyway to get this to be placed in carbonator.vm.cluster.%HOST%.VM.%COUNTER_INSTANCE%.StorageDevice.%COUNTER_NAME% ?

Also what would be a better way for doing the counter regex? Ie I would only like to read the following counters counter="Write Operations/Sec,Read Operations/Sec,Read Bytes/Sec,Write Bytes/Sec,Latency,Throughput"