140abf837915c8f0938d918724c1f29065622b32
[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 "daemon_stats", :description => "Get statistics from the running daemon" do
82     display :always
83
84     output :threads,
85            :description => "List of threads active in the daemon",
86            :display_as => "Threads"
87
88     output :agents,
89            :description => "List of agents loaded",
90            :display_as => "Agents"
91
92     output :pid,
93            :description => "Process ID of the daemon",
94            :display_as => "PID"
95
96     output :times,
97            :description => "Processor time consumed by the daemon",
98            :display_as => "Times"
99
100     output :validated,
101            :description => "Messages that passed security validation",
102            :display_as => "Security Validated"
103
104     output :unvalidated,
105            :description => "Messages that failed security validation",
106            :display_as => "Failed Security"
107
108     output :passed,
109            :description => "Passed filter checks",
110            :display_as => "Passed Filter"
111
112     output :filtered,
113            :description => "Didn't pass filter checks",
114            :display_as => "Failed Filter"
115
116     output :starttime,
117            :description => "Time the server started",
118            :display_as => "Start Time"
119
120     output :total,
121            :description => "Total messages received",
122            :display_as => "Total Messages"
123
124     output :replies,
125            :description => "Replies sent back to clients",
126            :display_as => "Replies"
127
128     output :configfile,
129            :description => "Config file used to start the daemon",
130            :display_as => "Config File"
131
132     output :version,
133            :description => "MCollective Version",
134            :display_as => "Version"
135
136     output :ttlexpired,
137            :description => "Messages that did pass TTL checks",
138            :display_as => "TTL Expired"
139
140     summarize do
141         aggregate summary(:version)
142         aggregate summary(:agents)
143     end
144 end
145
146 action "agent_inventory", :description => "Inventory of all agents on the server" do
147     display :always
148
149     output :agents,
150            :description => "List of agents on the server",
151            :display_as => "Agents"
152 end
153
154 action "get_config_item", :description => "Get the active value of a specific config property" do
155     display :always
156
157     input :item,
158           :prompt      => "Configuration Item",
159           :description => "The item to retrieve from the server",
160           :type        => :string,
161           :validation  => '^.+$',
162           :optional    => false,
163           :maxlength    => 50
164
165     output :item,
166            :description => "The config property being retrieved",
167            :display_as => "Property"
168
169     output :value,
170            :description => "The value that is in use",
171            :display_as => "Value"
172
173     summarize do
174         aggregate summary(:value)
175     end
176 end
177
178 action "get_data", :description => "Get data from a data plugin" do
179     display :always
180
181     input :source,
182           :prompt      => "Data Source",
183           :description => "The data plugin to retrieve information from",
184           :type        => :string,
185           :validation  => '^\w+$',
186           :optional    => false,
187           :maxlength   => 50
188
189     input :query,
190           :prompt      => "Query",
191           :description => "The query argument to supply to the data plugin",
192           :type        => :string,
193           :validation  => '^.+$',
194           :optional    => true,
195           :maxlength   => 200
196 end
197
198 action "ping", :description => "Responds to requests for PING with PONG" do
199     display :always
200
201     output :pong,
202            :description => "The local timestamp",
203            :display_as => "Timestamp"
204 end