Class: Opstat::Parsers::OracleTablespacesSizes
- Inherits:
-
Object
- Object
- Opstat::Parsers::OracleTablespacesSizes
- Includes:
- Logging
- Defined in:
- lib/parsers/oracle_tablespaces_sizes.rb
Instance Method Summary collapse
-
#parse_data(data:, time:) ⇒ Object
TODO - somehow check plugins version.
Methods included from Logging
#log_level, #oplogger, #preconfig_logger
Instance Method Details
#parse_data(data:, time:) ⇒ Object
TODO - somehow check plugins version
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/parsers/oracle_tablespaces_sizes.rb', line 7 def parse_data(data:, time:) reports = [] data.split("\n")[3..-3].each do |line| tablespace = line.split(/\s+/).delete_if{|t| t.empty?} reports << { :OPSTAT_TAG_tablespace => tablespace[0], :total => tablespace[1].to_i, :used => tablespace[2].to_i, :free => tablespace[3].to_i } end return reports end |