class Fluent::Plugin::FormatreportFilter

Public Instance Methods

configure(conf) click to toggle source
Calls superclass method
# File lib/fluent/plugin/filter_formatreport.rb, line 23
def configure(conf)
  super
  # No config needed rn
end
customfilter(record, time) click to toggle source
# File lib/fluent/plugin/filter_formatreport.rb, line 28
  def customfilter(record, time)
    record.each do |key, val|
      if key != "ip"
        tag = "mdm"
        myRecord = {}
        myRecord["Namespace"] = "ColomanagerFluentdRedfish"
        myRecord["Metric"] = "#{key}"
        myRecord["Dimensions"] = {"Region" => "CentralusEUAP", "IP" => record["ip"]}
        myRecord["Value"] = "#{val}"
        router.emit(tag, time, myRecord)
    end
  end
end
filter(tag, time, record) click to toggle source
# File lib/fluent/plugin/filter_formatreport.rb, line 42
def filter(tag, time, record)
  customfilter(record, time)
end