3 title: The rpcutil Agent
7 We include an agent with a few utilities and helpers there to assist in retrieving information about the running mcollectived.
9 We aim to add the ability to initiate reloads and so forth in this agent too in future, this
10 will require further internal refactoring though.
14 Retrieves an inventory of the facts, classes and agents and plugins on the system, takes no arguments
15 and returns a hash like this:
18 {:agents => ["rpcutil", "discovery"],
19 :facts => {"mcollective"=>1},
20 :classes => ["common::linux", "motd"],
21 :data_plugins=>["sysctl_data", "fstat_data"],
22 :collectives=>["mcollective"],
23 :main_collective=>"mcollective",
27 ## _daemon`_`stats_ Action
29 Retrieves statistics about the running daemon, how many messages it's handled, passed, dropped etc.
31 See the DDL for the agent for a full reference
34 {:configfile=>"/etc/mcollective/server.cfg",
36 :threads=> ["#<Thread:0xb7dcf480 sleep>",
37 "#<Thread:0xb7fba704 sleep>",
38 "#<Thread:0xb7dcfb88 run>"],
39 :starttime=>1284305683,
40 :agents=>["rpcutil", "discovery"],
43 :times=>{:cutime=>0.0, :utime=>0.15, :cstime=>0.0, :stime=>0.02},
50 Replies will always be less than received since the current message has not been sent yet when the stats are gathered.
52 ## _get`_`fact_ Action
54 Retrieves a single fact from the server
57 {:fact => "mcollective",
61 ## _agent`_`inventory_ Action
63 Returns a list of all agents with their meta data like version, author, license etc
68 :license=>"Apache License, Version 2",
69 :author=>"R.I.Pienaar <rip@devco.net>"},
72 :license=>"Apache License, Version 2.0",
73 :name=>"Utilities and Helpers for SimpleRPC Agents",
74 :url=>"http://marionette-collective.org/",
75 :description=> "General helpful actions that expose stats and internals to SimpleRPC clients",
77 :author=>"R.I.Pienaar <rip@devco.net>",
83 ## _get`_`config`_`item_ Action
85 Retrieves the active value for any configuration item on a server
94 A simple lightweight ping action that just returns each nodes local time
100 ## _collective`_`info_ Action
102 Retrieves the main and sub collectives configured
104 For a server configured with:
107 collectives = mcollectivedev,subdev1
108 main_collective = mcollectivedev
111 The following structure gets returned:
114 {:collectives=>["mcollectivedev", "subdev1"],
115 :main_collective=>"mcollectivedev"}