This commit is contained in:
mwiegand 2022-08-11 11:40:14 +02:00
parent 95dc066ca0
commit 1aa790551c
5 changed files with 11 additions and 2 deletions

View file

@ -1,2 +1,7 @@
# telegraf-pressure-stall
# test
```
PSI_DIR=test crystal telegraf_pressure_stall.cr
```

View file

@ -7,8 +7,7 @@ Dir.children(dir).each do |ressource|
type = parts[0]
metrics = parts[1..-1].map{ |part| part.split('=')}.to_h
puts %(pressure_stall_avg,ressource="#{ressource}",type=#{type} avg10=#{metrics["avg10"]},avg60=#{metrics["avg60"]},avg300=#{metrics["avg300"]} #{time})
puts %(pressure_stall_total,ressource="#{ressource}",type=#{type} total=#{metrics["total"]} #{time})
puts %(pressure_stall,ressource="#{ressource}",type=#{type} avg10=#{metrics["avg10"]},avg60=#{metrics["avg60"]},avg300=#{metrics["avg300"]},total=#{metrics["total"]} #{time})
end
end

1
test/cpu Normal file
View file

@ -0,0 +1 @@
some avg10=0.05 avg60=0.10 avg300=0.03 total=1234

2
test/io Normal file
View file

@ -0,0 +1,2 @@
some avg10=0.00 avg60=0.00 avg300=0.00 total=56789
full avg10=0.00 avg60=0.00 avg300=0.00 total=56789

2
test/memory Normal file
View file

@ -0,0 +1,2 @@
some avg10=0.00 avg60=0.00 avg300=0.00 total=2345
full avg10=0.00 avg60=0.00 avg300=0.00 total=1234