Update version according to OSCI-856
[packages/precise/mcollective.git] / plugins / mcollective / agent / rpcutil.ddl
1 metadata    :name        => "rpcutil",
2             :description => "General helpful actions that expose stats and internals to SimpleRPC clients",
3             :author      => "R.I.Pienaar <rip@devco.net>",
4             :license     => "Apache License, Version 2.0",
5             :version     => "1.0",
6             :url         => "http://marionette-collective.org/",
7             :timeout     => 10
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
24
25 action "inventory", :description => "System Inventory" do
26     display :always
27
28     output :agents,
29            :description => "List of agent names",
30            :display_as => "Agents"
31
32     output :facts,
33            :description => "List of facts and values",
34            :display_as => "Facts"
35
36     output :classes,
37            :description => "List of classes on the system",
38            :display_as => "Classes"
39
40     output :version,
41            :description => "MCollective Version",
42            :display_as => "Version"
43
44     output :main_collective,
45            :description => "The main Collective",
46            :display_as => "Main Collective"
47
48     output :collectives,
49            :description => "All Collectives",
50            :display_as => "All Collectives"
51
52     output :data_plugins,
53            :description => "List of data plugin names",
54            :display_as => "Data Plugins"
55 end
56
57 action "get_fact", :description => "Retrieve a single fact from the fact store" do
58      display :always
59
60      input :fact,
61            :prompt      => "The name of the fact",
62            :description => "The fact to retrieve",
63            :type        => :string,
64            :validation  => '^[\w\-\.]+$',
65            :optional    => false,
66            :maxlength   => 40
67
68      output :fact,
69             :description => "The name of the fact being returned",
70             :display_as => "Fact"
71
72      output :value,
73             :description => "The value of the fact",
74             :display_as => "Value"
75
76     summarize do
77         aggregate summary(:value)
78     end
79 end
80
81 action "get_facts", :description => "Retrieve multiple facts from the fact store" do
82      display :always
83
84      input :facts,
85            :prompt      => "Comma-separated list of facts",
86            :description => "Facts to retrieve",
87            :type        => :string,
88            :validation  => '^\s*[\w\.\-]+(\s*,\s*[\w\.\-]+)*$',
89            :optional    => false,
90            :maxlength   => 200
91
92      output :values,
93             :description => "List of values of the facts",
94             :display_as => "Values"
95 end
96
97 action "daemon_stats", :description => "Get statistics from the running daemon" do
98     display :always
99
100     output :threads,
101            :description => "List of threads active in the daemon",
102            :display_as => "Threads"
103
104     output :agents,
105            :description => "List of agents loaded",
106            :display_as => "Agents"
107
108     output :pid,
109            :description => "Process ID of the daemon",
110            :display_as => "PID"
111
112     output :times,
113            :description => "Processor time consumed by the daemon",
114            :display_as => "Times"
115
116     output :validated,
117            :description => "Messages that passed security validation",
118            :display_as => "Security Validated"
119
120     output :unvalidated,
121            :description => "Messages that failed security validation",
122            :display_as => "Failed Security"
123
124     output :passed,
125            :description => "Passed filter checks",
126            :display_as => "Passed Filter"
127
128     output :filtered,
129            :description => "Didn't pass filter checks",
130            :display_as => "Failed Filter"
131
132     output :starttime,
133            :description => "Time the server started",
134            :display_as => "Start Time"
135
136     output :total,
137            :description => "Total messages received",
138            :display_as => "Total Messages"
139
140     output :replies,
141            :description => "Replies sent back to clients",
142            :display_as => "Replies"
143
144     output :configfile,
145            :description => "Config file used to start the daemon",
146            :display_as => "Config File"
147
148     output :version,
149            :description => "MCollective Version",
150            :display_as => "Version"
151
152     output :ttlexpired,
153            :description => "Messages that did pass TTL checks",
154            :display_as => "TTL Expired"
155
156     summarize do
157         aggregate summary(:version)
158         aggregate summary(:agents)
159     end
160 end
161
162 action "agent_inventory", :description => "Inventory of all agents on the server" do
163     display :always
164
165     output :agents,
166            :description => "List of agents on the server",
167            :display_as => "Agents"
168 end
169
170 action "get_config_item", :description => "Get the active value of a specific config property" do
171     display :always
172
173     input :item,
174           :prompt      => "Configuration Item",
175           :description => "The item to retrieve from the server",
176           :type        => :string,
177           :validation  => '^.+$',
178           :optional    => false,
179           :maxlength    => 50
180
181     output :item,
182            :description => "The config property being retrieved",
183            :display_as => "Property"
184
185     output :value,
186            :description => "The value that is in use",
187            :display_as => "Value"
188
189     summarize do
190         aggregate summary(:value)
191     end
192 end
193
194 action "get_data", :description => "Get data from a data plugin" do
195     display :always
196
197     input :source,
198           :prompt      => "Data Source",
199           :description => "The data plugin to retrieve information from",
200           :type        => :string,
201           :validation  => '^\w+$',
202           :optional    => false,
203           :maxlength   => 50
204
205     input :query,
206           :prompt      => "Query",
207           :description => "The query argument to supply to the data plugin",
208           :type        => :string,
209           :validation  => '^.+$',
210           :optional    => true,
211           :maxlength   => 200
212 end
213
214 action "ping", :description => "Responds to requests for PING with PONG" do
215     display :always
216
217     output :pong,
218            :description => "The local timestamp",
219            :display_as => "Timestamp"
220 end