File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ def metrics
101101 @monitor_info . plugins_info_all . each do |record |
102102 attributes = {
103103 plugin_id : record [ "plugin_id" ] ,
104- plugin : " #{ record [ ' plugin_category' ] } _ #{ record [ ' type' ] } " ,
104+ plugin : plugin_name ( record [ " plugin_category" ] , record [ " type" ] ) ,
105105 plugin_category : record [ "plugin_category" ] ,
106106 plugin_type : record [ "type" ]
107107 } . map { |k , v | string_value_attribute ( k , v ) }
@@ -130,6 +130,20 @@ def metrics
130130 metrics
131131 end
132132
133+ def plugin_name ( category , type )
134+ prefix =
135+ case category
136+ when "input"
137+ "in"
138+ when "output"
139+ "out"
140+ else
141+ category
142+ end
143+
144+ "#{ prefix } _#{ type } "
145+ end
146+
133147 def string_value_attribute ( key , value )
134148 {
135149 "key" => key . to_s ,
You can’t perform that action at this time.
0 commit comments