Registration is a process where an agent on the server sends out a message on to the collective.
registration.agent Topic every
registerinterval period. The default registration agent
AgentList sends out a list of the mcollective agents installed and running in
In a default installation every server publishes these registration messages, but nothing subscribes to them. I believe the original use was intended to simply keep the TCP connection alive in the presence of connection-tracking firewalls. Now that this is handled by the
heartbeat support in STOMP 1.1 protocol, registration … well, it has found its own reason to live.
Many people have started doing useful things with the registration agent. Let’s show you how to build your own agent, and your own collector to grab that data and do something with it.
If you were to look at the default registration agent in your libdir directory you’d be amazed at how simple it is.
# A registration plugin that simply sends in the list of agents we have
Yeah, it is simple. The module should subclass
MCollective::Registration::Base. Define a
body method which returns anything you want, and that data is sent out to the collective.
registration.agent topic for you. You can make the data as complex or as simple as meets your needs. ...