File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,7 +63,8 @@ class EC2CpuBalance < Sensu::Plugin::Check::CLI
6363 description : 'List of burstable instance families to check. Default to t2,t3' ,
6464 short : '-f t2,t3' ,
6565 long : '--instance-families t2,t3' ,
66- default : 't2,t3'
66+ proc : proc { |x | x . split ( ',' ) } ,
67+ default : %w( t2 t3 )
6768
6869 def data ( instance )
6970 client = Aws ::CloudWatch ::Client . new
@@ -107,7 +108,7 @@ def run
107108 level = 0
108109 instances . reservations . each do |reservation |
109110 reservation . instances . each do |instance |
110- next unless instance . instance_type . start_with? ( *config [ :instance_families ] . split ( ',' ) )
111+ next unless instance . instance_type . start_with? ( *config [ :instance_families ] )
111112 id = instance . instance_id
112113 result = data id
113114 tag = config [ :tag ] ? " (#{ instance_tag ( instance , config [ :tag ] ) } )" : ''
You can’t perform that action at this time.
0 commit comments