choria-mcorpc-support 2.23.3 → 2.24.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/mcollective.rb +3 -3
- data/lib/mcollective/agent/choria_provision.ddl +214 -0
- data/lib/mcollective/agent/choria_provision.json +272 -0
- data/lib/mcollective/agent/choria_util.ddl +226 -107
- data/lib/mcollective/agent/choria_util.json +125 -25
- data/lib/mcollective/agent/rpcutil.ddl +242 -183
- data/lib/mcollective/agent/rpcutil.json +53 -57
- data/lib/mcollective/agent/scout.ddl +1 -1
- data/lib/mcollective/agent/scout.json +108 -136
- data/lib/mcollective/application/find.rb +1 -1
- data/lib/mcollective/application/plugin.rb +8 -173
- data/lib/mcollective/client.rb +1 -1
- data/lib/mcollective/config.rb +145 -103
- data/lib/mcollective/ddl.rb +0 -1
- data/lib/mcollective/discovery.rb +11 -63
- data/lib/mcollective/discovery/broadcast.ddl +11 -0
- data/lib/mcollective/discovery/choria.ddl +6 -4
- data/lib/mcollective/discovery/delegate.ddl +13 -0
- data/lib/mcollective/discovery/delegate.rb +72 -0
- data/lib/mcollective/discovery/external.ddl +13 -0
- data/lib/mcollective/discovery/file.ddl +13 -0
- data/lib/mcollective/discovery/flatfile.ddl +7 -5
- data/lib/mcollective/discovery/inventory.ddl +13 -0
- data/lib/mcollective/discovery/mc.ddl +3 -3
- data/lib/mcollective/log.rb +1 -2
- data/lib/mcollective/optionparser.rb +1 -1
- data/lib/mcollective/pluginpackager/forge_packager.rb +1 -1
- data/lib/mcollective/rpc/client.rb +4 -2
- data/lib/mcollective/util.rb +2 -4
- data/lib/mcollective/util/choria.rb +14 -8
- data/lib/mcollective/util/tasks_support.rb +15 -2
- metadata +11 -29
- data/lib/mcollective/data.rb +0 -96
- data/lib/mcollective/data/agent_data.ddl +0 -22
- data/lib/mcollective/data/agent_data.rb +0 -17
- data/lib/mcollective/data/base.rb +0 -68
- data/lib/mcollective/data/bolt_task_data.ddl +0 -90
- data/lib/mcollective/data/bolt_task_data.rb +0 -32
- data/lib/mcollective/data/collective_data.ddl +0 -20
- data/lib/mcollective/data/collective_data.rb +0 -9
- data/lib/mcollective/data/fact_data.ddl +0 -28
- data/lib/mcollective/data/fact_data.rb +0 -55
- data/lib/mcollective/data/fstat_data.ddl +0 -89
- data/lib/mcollective/data/fstat_data.rb +0 -54
- data/lib/mcollective/data/result.rb +0 -50
- data/lib/mcollective/ddl/dataddl.rb +0 -56
- data/lib/mcollective/discovery/choria.rb +0 -223
- data/lib/mcollective/discovery/flatfile.rb +0 -47
- data/lib/mcollective/discovery/stdin.ddl +0 -11
- data/lib/mcollective/discovery/stdin.rb +0 -67
- data/lib/mcollective/generators.rb +0 -7
- data/lib/mcollective/generators/agent_generator.rb +0 -50
- data/lib/mcollective/generators/base.rb +0 -45
- data/lib/mcollective/generators/data_generator.rb +0 -50
- data/lib/mcollective/generators/templates/action_snippet.erb +0 -13
- data/lib/mcollective/generators/templates/data_input_snippet.erb +0 -7
- data/lib/mcollective/generators/templates/ddl.erb +0 -8
- data/lib/mcollective/generators/templates/plugin.erb +0 -7
@@ -1,224 +1,283 @@
|
|
1
|
-
metadata
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
action "collective_info", :description => "Info about the main and sub collectives" do
|
10
|
-
display :always
|
11
|
-
|
12
|
-
output :main_collective,
|
13
|
-
:description => "The main Collective",
|
14
|
-
:display_as => "Main Collective"
|
15
|
-
|
16
|
-
output :collectives,
|
17
|
-
:description => "All Collectives",
|
18
|
-
:display_as => "All Collectives"
|
19
|
-
|
20
|
-
summarize do
|
21
|
-
aggregate summary(:collectives)
|
22
|
-
end
|
23
|
-
end
|
1
|
+
metadata :name => "rpcutil",
|
2
|
+
:description => "Utility actions that expose information about the state of the running Server",
|
3
|
+
:author => "R.I.Pienaar <rip@devco.net>",
|
4
|
+
:license => "Apache-2.0",
|
5
|
+
:version => "0.22.0",
|
6
|
+
:url => "https://choria.io/",
|
7
|
+
:timeout => 2
|
24
8
|
|
25
|
-
action "inventory", :description => "System Inventory" do
|
26
|
-
display :always
|
27
9
|
|
28
|
-
|
29
|
-
|
30
|
-
:display_as => "Agents"
|
10
|
+
action "agent_inventory", :description => "Inventory of all agents on the server including versions, licenses and more" do
|
11
|
+
display :always
|
31
12
|
|
32
|
-
output :facts,
|
33
|
-
:description => "List of facts and values",
|
34
|
-
:display_as => "Facts"
|
35
13
|
|
36
|
-
output :classes,
|
37
|
-
:description => "List of classes on the system",
|
38
|
-
:display_as => "Classes"
|
39
14
|
|
40
|
-
|
41
|
-
|
42
|
-
|
15
|
+
output :agents,
|
16
|
+
:description => "List of agents on the server",
|
17
|
+
:type => "array",
|
18
|
+
:display_as => "Agents"
|
43
19
|
|
44
|
-
|
45
|
-
:description => "The main Collective",
|
46
|
-
:display_as => "Main Collective"
|
20
|
+
end
|
47
21
|
|
48
|
-
|
49
|
-
|
50
|
-
:display_as => "All Collectives"
|
22
|
+
action "collective_info", :description => "Info about the main and sub collectives that the server belongs to" do
|
23
|
+
display :always
|
51
24
|
|
52
|
-
output :data_plugins,
|
53
|
-
:description => "List of data plugin names",
|
54
|
-
:display_as => "Data Plugins"
|
55
25
|
|
56
|
-
output :machines,
|
57
|
-
:description => "Autonomous Agents",
|
58
|
-
:display_as => "Machines"
|
59
|
-
end
|
60
26
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
:prompt => "The name of the fact",
|
66
|
-
:description => "The fact to retrieve",
|
67
|
-
:type => :string,
|
68
|
-
:validation => '.+',
|
69
|
-
:optional => false,
|
70
|
-
:maxlength => 512
|
71
|
-
|
72
|
-
output :fact,
|
73
|
-
:description => "The name of the fact being returned",
|
74
|
-
:display_as => "Fact"
|
75
|
-
|
76
|
-
output :value,
|
77
|
-
:description => "The value of the fact",
|
78
|
-
:display_as => "Value"
|
79
|
-
|
80
|
-
summarize do
|
81
|
-
aggregate summary(:value)
|
82
|
-
end
|
83
|
-
end
|
27
|
+
output :collectives,
|
28
|
+
:description => "All Collectives",
|
29
|
+
:type => "array",
|
30
|
+
:display_as => "All Collectives"
|
84
31
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
:optional => false,
|
94
|
-
:maxlength => 200
|
95
|
-
|
96
|
-
output :values,
|
97
|
-
:description => "List of values of the facts",
|
98
|
-
:display_as => "Values"
|
32
|
+
output :main_collective,
|
33
|
+
:description => "The main Collective",
|
34
|
+
:type => "string",
|
35
|
+
:display_as => "Main Collective"
|
36
|
+
|
37
|
+
summarize do
|
38
|
+
aggregate summary(:collectives)
|
39
|
+
end
|
99
40
|
end
|
100
41
|
|
101
42
|
action "daemon_stats", :description => "Get statistics from the running daemon" do
|
102
|
-
|
43
|
+
display :always
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
output :agents,
|
48
|
+
:description => "List of agents loaded",
|
49
|
+
:type => "array",
|
50
|
+
:display_as => "Agents"
|
51
|
+
|
52
|
+
output :configfile,
|
53
|
+
:description => "Config file used to start the daemon",
|
54
|
+
:type => "string",
|
55
|
+
:display_as => "Config File"
|
56
|
+
|
57
|
+
output :filtered,
|
58
|
+
:description => "Count of message that didn't pass filter checks",
|
59
|
+
:type => "integer",
|
60
|
+
:display_as => "Failed Filter"
|
61
|
+
|
62
|
+
output :passed,
|
63
|
+
:description => "Count of messages that passed filter checks",
|
64
|
+
:type => "integer",
|
65
|
+
:display_as => "Passed Filter"
|
66
|
+
|
67
|
+
output :pid,
|
68
|
+
:description => "Process ID of the Choria Server",
|
69
|
+
:type => "integer",
|
70
|
+
:display_as => "PID"
|
71
|
+
|
72
|
+
output :replies,
|
73
|
+
:description => "Count of replies sent back to clients",
|
74
|
+
:type => "integer",
|
75
|
+
:display_as => "Replies"
|
76
|
+
|
77
|
+
output :starttime,
|
78
|
+
:description => "Time the Choria Server started in unix seconds",
|
79
|
+
:type => "integer",
|
80
|
+
:display_as => "Start Time"
|
81
|
+
|
82
|
+
output :threads,
|
83
|
+
:description => "List of threads active in the Choria Server",
|
84
|
+
:type => "array",
|
85
|
+
:display_as => "Threads"
|
86
|
+
|
87
|
+
output :times,
|
88
|
+
:description => "Processor time consumed by the Choria Server",
|
89
|
+
:type => "hash",
|
90
|
+
:display_as => "Times"
|
91
|
+
|
92
|
+
output :total,
|
93
|
+
:description => "Count of messages received by the Choria Server",
|
94
|
+
:type => "integer",
|
95
|
+
:display_as => "Total Messages"
|
96
|
+
|
97
|
+
output :ttlexpired,
|
98
|
+
:description => "Count of messages that did pass TTL checks",
|
99
|
+
:type => "integer",
|
100
|
+
:display_as => "TTL Expired"
|
101
|
+
|
102
|
+
output :unvalidated,
|
103
|
+
:description => "Count of messages that failed security validation",
|
104
|
+
:type => "integer",
|
105
|
+
:display_as => "Failed Security"
|
106
|
+
|
107
|
+
output :validated,
|
108
|
+
:description => "Count of messages that passed security validation",
|
109
|
+
:type => "integer",
|
110
|
+
:display_as => "Security Validated"
|
111
|
+
|
112
|
+
output :version,
|
113
|
+
:description => "Choria Server Version",
|
114
|
+
:type => "string",
|
115
|
+
:display_as => "Version"
|
116
|
+
|
117
|
+
summarize do
|
118
|
+
aggregate summary(:version)
|
119
|
+
aggregate summary(:agents)
|
120
|
+
end
|
121
|
+
end
|
103
122
|
|
104
|
-
|
105
|
-
|
106
|
-
:display_as => "Threads"
|
123
|
+
action "get_config_item", :description => "Get the active value of a specific config property" do
|
124
|
+
display :always
|
107
125
|
|
108
|
-
|
109
|
-
|
110
|
-
|
126
|
+
input :item,
|
127
|
+
:prompt => "Configuration Item",
|
128
|
+
:description => "The item to retrieve from the server",
|
129
|
+
:type => :string,
|
130
|
+
:validation => '^.+$',
|
131
|
+
:maxlength => 120,
|
132
|
+
:optional => false
|
111
133
|
|
112
|
-
output :pid,
|
113
|
-
:description => "Process ID of the daemon",
|
114
|
-
:display_as => "PID"
|
115
134
|
|
116
|
-
output :times,
|
117
|
-
:description => "Processor time consumed by the daemon",
|
118
|
-
:display_as => "Times"
|
119
135
|
|
120
|
-
output :validated,
|
121
|
-
:description => "Messages that passed security validation",
|
122
|
-
:display_as => "Security Validated"
|
123
136
|
|
124
|
-
|
125
|
-
|
126
|
-
|
137
|
+
output :item,
|
138
|
+
:description => "The config property being retrieved",
|
139
|
+
:type => "string",
|
140
|
+
:display_as => "Property"
|
127
141
|
|
128
|
-
|
129
|
-
|
130
|
-
|
142
|
+
output :value,
|
143
|
+
:description => "The value that is in use",
|
144
|
+
:display_as => "Value"
|
131
145
|
|
132
|
-
|
133
|
-
|
134
|
-
|
146
|
+
summarize do
|
147
|
+
aggregate summary(:value)
|
148
|
+
end
|
149
|
+
end
|
135
150
|
|
136
|
-
|
137
|
-
|
138
|
-
:display_as => "Start Time"
|
151
|
+
action "get_data", :description => "Get data from a data plugin" do
|
152
|
+
display :always
|
139
153
|
|
140
|
-
|
141
|
-
|
142
|
-
|
154
|
+
input :query,
|
155
|
+
:prompt => "Query",
|
156
|
+
:description => "The query argument to supply to the data plugin",
|
157
|
+
:type => :string,
|
158
|
+
:validation => '^.+$',
|
159
|
+
:maxlength => 200,
|
160
|
+
:optional => true
|
143
161
|
|
144
|
-
output :replies,
|
145
|
-
:description => "Replies sent back to clients",
|
146
|
-
:display_as => "Replies"
|
147
162
|
|
148
|
-
|
149
|
-
|
150
|
-
|
163
|
+
input :source,
|
164
|
+
:prompt => "Data Source",
|
165
|
+
:description => "The data plugin to retrieve information from",
|
166
|
+
:type => :string,
|
167
|
+
:validation => '^\w+$',
|
168
|
+
:maxlength => 50,
|
169
|
+
:optional => false
|
170
|
+
|
151
171
|
|
152
|
-
output :version,
|
153
|
-
:description => "MCollective Version",
|
154
|
-
:display_as => "Version"
|
155
172
|
|
156
|
-
output :ttlexpired,
|
157
|
-
:description => "Messages that did pass TTL checks",
|
158
|
-
:display_as => "TTL Expired"
|
159
173
|
|
160
|
-
summarize do
|
161
|
-
aggregate summary(:version)
|
162
|
-
aggregate summary(:agents)
|
163
|
-
end
|
164
174
|
end
|
165
175
|
|
166
|
-
action "
|
167
|
-
|
176
|
+
action "get_fact", :description => "Retrieve a single fact from the fact store" do
|
177
|
+
display :always
|
178
|
+
|
179
|
+
input :fact,
|
180
|
+
:prompt => "The name of the fact",
|
181
|
+
:description => "The fact to retrieve",
|
182
|
+
:type => :string,
|
183
|
+
:validation => '.+',
|
184
|
+
:maxlength => 512,
|
185
|
+
:optional => false
|
186
|
+
|
187
|
+
|
188
|
+
|
168
189
|
|
169
|
-
|
170
|
-
|
171
|
-
|
190
|
+
output :fact,
|
191
|
+
:description => "The name of the fact being returned",
|
192
|
+
:type => "string",
|
193
|
+
:display_as => "Fact"
|
194
|
+
|
195
|
+
output :value,
|
196
|
+
:description => "The value of the fact",
|
197
|
+
:display_as => "Value"
|
198
|
+
|
199
|
+
summarize do
|
200
|
+
aggregate summary(:value)
|
201
|
+
end
|
172
202
|
end
|
173
203
|
|
174
|
-
action "
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
summarize do
|
194
|
-
aggregate summary(:value)
|
195
|
-
end
|
204
|
+
action "get_facts", :description => "Retrieve multiple facts from the fact store" do
|
205
|
+
display :always
|
206
|
+
|
207
|
+
input :facts,
|
208
|
+
:prompt => "Comma-separated list of facts to retrieve",
|
209
|
+
:description => "Facts to retrieve",
|
210
|
+
:type => :string,
|
211
|
+
:validation => '^\s*[\w\.\-]+(\s*,\s*[\w\.\-]+)*$',
|
212
|
+
:maxlength => 200,
|
213
|
+
:optional => false
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
output :values,
|
219
|
+
:description => "List of values of the facts",
|
220
|
+
:type => "hash",
|
221
|
+
:display_as => "Values"
|
222
|
+
|
196
223
|
end
|
197
224
|
|
198
|
-
action "
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
225
|
+
action "inventory", :description => "System Inventory" do
|
226
|
+
display :always
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
output :agents,
|
231
|
+
:description => "List of agent names",
|
232
|
+
:type => "array",
|
233
|
+
:display_as => "Agents"
|
234
|
+
|
235
|
+
output :classes,
|
236
|
+
:description => "List of classes on the system",
|
237
|
+
:type => "array",
|
238
|
+
:display_as => "Classes"
|
239
|
+
|
240
|
+
output :collectives,
|
241
|
+
:description => "All Collectives",
|
242
|
+
:type => "array",
|
243
|
+
:display_as => "All Collectives"
|
244
|
+
|
245
|
+
output :data_plugins,
|
246
|
+
:description => "List of data plugin names",
|
247
|
+
:type => "array",
|
248
|
+
:display_as => "Data Plugins"
|
249
|
+
|
250
|
+
output :facts,
|
251
|
+
:description => "List of facts and values",
|
252
|
+
:type => "hash",
|
253
|
+
:display_as => "Facts"
|
254
|
+
|
255
|
+
output :machines,
|
256
|
+
:description => "Autonomous Agents",
|
257
|
+
:type => "hash",
|
258
|
+
:display_as => "Machines"
|
259
|
+
|
260
|
+
output :main_collective,
|
261
|
+
:description => "The main Collective",
|
262
|
+
:type => "string",
|
263
|
+
:display_as => "Main Collective"
|
264
|
+
|
265
|
+
output :version,
|
266
|
+
:description => "Choria Server Version",
|
267
|
+
:type => "string",
|
268
|
+
:display_as => "Version"
|
269
|
+
|
216
270
|
end
|
217
271
|
|
218
272
|
action "ping", :description => "Responds to requests for PING with PONG" do
|
219
|
-
|
273
|
+
display :always
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
output :pong,
|
278
|
+
:description => "The local Unix timestamp",
|
279
|
+
:type => "string",
|
280
|
+
:display_as => "Timestamp"
|
220
281
|
|
221
|
-
output :pong,
|
222
|
-
:description => "The local timestamp",
|
223
|
-
:display_as => "Timestamp"
|
224
282
|
end
|
283
|
+
|