Ask Your Question

How can I access mcollective applications via redis?

asked 2013-11-26 02:03:24 -0600

Eleazar gravatar image

I can access mcollective agents via redis like so:

irb> @redis.keys("mcollective::agent::*")
=> ["mcollective::agent::nrpe", "mcollective::agent::backup", "mcollective::agent::discovery", "mcollective::agent::registration", "mcollective::agent::puppet", "mcollective::agent::rpcutil", "mcollective::agent::filemgr", "mcollective::agent::package", "mcollective::agent::service", "mcollective::agent::nettest"]

Is there a similar way to access mcollective applications via redis? In particular, how do I access a single mcollective application, and the list of applications as well, if possible?

I tried this, but got nothing:

irb> @redis.keys("mcollective::application::*")
=> []
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-12-03 00:42:39 -0600

Eleazar gravatar image

Apparently, to include applications, I will need to customize the registration agent used by the nodes. So far, only the following can be seen via the registration agent (at least the one I'm using):

# /usr/libexec/mcollective/mcollective/agent/registration.rb
@redis.multi do
        data[:collectives].each {|c| @redis.zadd "mcollective::collective::#{c}", time, data[:identity]}
        data[:agentlist].each {|a| @redis.zadd "mcollective::agent::#{a}", time, data[:identity]}
        data[:classes].each {|c| @redis.zadd "mcollective::class::#{c}", time, data[:identity]}
        @redis.set "mcollective::nodecheckin::#{data[:identity]}", time
        @redis.del "mcollective::nodeagents::#{data[:identity]}"
        @redis.sadd "mcollective::nodeagents::#{data[:identity ...
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2013-11-26 02:03:24 -0600

Seen: 116 times

Last updated: Dec 03 '13