circonus 1.0.11 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/composite_builder.rb +5 -5
- metadata +1 -1
data/bin/composite_builder.rb
CHANGED
|
@@ -32,6 +32,7 @@ end
|
|
|
32
32
|
|
|
33
33
|
options = {}
|
|
34
34
|
options[:tags] = []
|
|
35
|
+
options[:automation_tags] = ["source:composite-builder"]
|
|
35
36
|
options[:datatype] = 'counter'
|
|
36
37
|
options[:consolidation] = 'sum'
|
|
37
38
|
OptionParser.new { |opts|
|
|
@@ -61,10 +62,9 @@ OptionParser.new { |opts|
|
|
|
61
62
|
opts.on( '-t','--tags TAGLIST',"Use comma separated list of tags for searching (takes the union)" ) do |t|
|
|
62
63
|
options[:tags] += t.split(/,/).sort.uniq
|
|
63
64
|
# these batch of tags provide information for other automation tools to keep the formulas up to date:
|
|
64
|
-
options[:
|
|
65
|
-
options[:
|
|
66
|
-
options[:
|
|
67
|
-
options[:tags] << "consolidation:#{options[:consolidation]}"
|
|
65
|
+
options[:automation_tags] << "type:#{options[:type]}"
|
|
66
|
+
options[:automation_tags] << "datatype:#{options[:datatype]}"
|
|
67
|
+
options[:automation_tags] << "consolidation:#{options[:consolidation]}"
|
|
68
68
|
end
|
|
69
69
|
}.parse!
|
|
70
70
|
|
|
@@ -124,7 +124,7 @@ metrics.each do |metric|
|
|
|
124
124
|
"notes"=>nil,
|
|
125
125
|
"period"=>60,
|
|
126
126
|
"status"=>"active",
|
|
127
|
-
"tags"=>(options[:tags] + ["metric:#{metric}"]),
|
|
127
|
+
"tags"=>(options[:tags] + options[:automation_tags] + ["metric:#{metric}"]),
|
|
128
128
|
"target"=>"composite",
|
|
129
129
|
"timeout"=>10,
|
|
130
130
|
"type"=>"composite"
|