Class: Fluent::DockerMetricsInput::BlkioStatsParser

Inherits:
CGroupStatsParser show all
Defined in:
lib/fluent/plugin/in_docker_metrics.rb

Constant Summary collapse

BlkioLineRegexp =
/^(?<major>\d+):(?<minor>\d+) (?<key>[^ ]+) (?<value>\d+)/

Instance Method Summary collapse

Methods inherited from CGroupStatsParser

#initialize, #parse_each_line

Constructor Details

This class inherits a constructor from Fluent::DockerMetricsInput::CGroupStatsParser

Instance Method Details

#parse_line(line) ⇒ Object



139
140
141
142
143
144
145
146
# File 'lib/fluent/plugin/in_docker_metrics.rb', line 139

def parse_line(line)
  m = BlkioLineRegexp.match(line)
  if m
    { 'key' => @metric_type + "_" + m["key"].downcase, 'value' => m["value"].to_i }
  else
    nil
  end
end