ajf8 / mcomaster Goto Github PK
View Code? Open in Web Editor NEWweb interface to mcollective
License: Apache License 2.0
web interface to mcollective
License: Apache License 2.0
Hi,
I installed mcomaster as the doc http://mcomaster.org/docs/install. Mcomaster was started up successfully, but no nodes was discovered.It seems that no data was in the redis database.
[root@sk00 mcomaster-master]# /usr/local/bin/redis-cli
127.0.0.1:6379> keys mcollective::agent::*
(empty list or set)
I installed ruby193 by rvm, bundle & mcollective-client were installed by gem.
[root@sk00 yum.repos.d]# ruby -v
ruby 1.9.3p551 (2014-11-13 revision 48407) [x86_64-linux]
Redis/mcomaster were installed by source. In this case, did I miss some redis configurations?
PS: I copied all mco-client lib file to dir /usr/libexec/mcollective/mcollective and mco ping was good.
[root@sk00 yum.repos.d]# mco ping
ag.bestv.com.cn time=42.82 ms
Thanks a lot!
Hi,
The rpcutil and process agents are working fine. But when i try to use the service agent plugin, it shows me an error "Cannot validate input service: Unknown validator: 'service_name'.". Infact when i start typing in the service name box, a popup is is showing this error, when i click on execute, the same error shows up in the result section also.
My mcollective-client and mcomaster resides in the same machine
Hey,
I recently installed the mcomaster on CentOS 6.4 and so far it's been working great. Now I realized that if I try to trigger a "runonce" via the puppet Agent the field for splashlimit is printing an Error:
Error
"Cannot validate input splaylimit: value should be a number"
It doesn't matter whether I set "Splay" to false or true with a value for splashlimit (e.g. 30). On having a look into the production.log the parameters seem to get the right values..
without splay:
"Received a request, parameters: {"filter":{},"args":{"force":false,"server":"","tags":"","noop":true,"splay":false,"splaylimit":"","environment":"production"}}"
with splay and splaylimit:
"Received a request, parameters: {"filter":{},"args":{"force":false,"server":"","tags":"","noop":true,"splay":true,"splaylimit":"30","environment":"production"}}"
Is there anything I might did wrong?
Thanks in advance!
If a field is optional and empty it shouldn't be passed on to mco. At the moment most fields in a form aren't optional because of this, I think. At least when I use the puppet agent I've to fill in a couple of fields who are in the ddl optional.
Hi Alan,
I have mcomaster up and running. I am comparing it with Enterprise Puppet Dashboard Live Management. Most the same (good job!), except that I can't find "Node Filter" which allows me to filter node by name, class or fact, and then select the nodes for my next action.
For example, I can only select one node from the left list, and then "runonce" on this node.
If I want to "runonce" on all the nodes whose hostname starts with "test", I can't.
Do I miss any configuration or it is a feature not implemented yet?
Thanks,
Stella
Hi,
I already have installed MCollective and it is working fine. Now I plan to use Mcomaster as a Web UI.
The install documentation on this web site is pretty clear:
http://www.mcomaster.org/docs/install
But I still have several questions:
Thanks a lot!
Stella
I installed mcomaster. I noticed the /var/log/mcomaster/production.log is updated every 30 seconds:
Started GET "/nodes" for 123.45.67.89 at 2014-11-15 09:53:39 -0500
Processing by NodesController#index as JSON
User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
Completed 200 OK in 2ms (Views: 0.1ms | ActiveRecord: 0.2ms)
I don't want it to check every 30 second and want to change it.
I checked /etc/mcomaster/application.yml and saw this:
client:
refresh_interval: 30 # how long between refreshes of agents, nodes, collectives?
I tried to increase refresh_interval to 300 (every 5 minutes), but it doesn't work. I made sure I restarted mcomaster after modification.
How to change it? Thanks!
Possible to use MySQL db?
One co-worker is implementing ldap authentication on mcomaster, we had succeed on it using devise, but currently the code is exclusive, it is not possible to have both ldap and database authentication.
we will work more on that to make it possible to choose which authentication to use in a config file.
After we have that done we will submit a pull request.
This would be the first change to integrate mcomaster in our company.
After I log in I have to log out as the first thing i do, because if I don't I will not get any response.
When I do that I don't get logged out but a rebuild of the display starts and I can start working with the tool. It's annoying but I can live with it.
When selecting a node the facts are shown in a random order it would be nice/logical to display them sorted.
I've followed all installation directions precisely on the latest version of mcollective (running over ActiveMQ).
I'm running mcomaster over passenger via nginx, and the web interface works fine. However it says 0 nodes are registered, even though there are 84 servers working when I run 'mco ping' and other commands.
How can I troubleshoot the registration to see where it's failing? Thanks!
I upgraded mcollective to 2.8.1 and my Agents have gone missing. Looking through the logs, they still all exist and each node is still calling them without issue. However mcomaster itself does not list the agents. What information can I provide to troubleshoot this?
when adding more than one identity filter it should be handled as an "or" filter not as an "and" filter. I suppose one could argue that it should be so for all filter entries. It would be nice to have it as an option.
Hello,
I was wondering if you would be open to the following feature:
It would be nice to have a 'jobs' view where you can define custom mco commands for certain combinations of facts.
That way, you could run a job that is in fact just a definition of a mco command but for a certain use case.
Regards.
MCollective is good for taking out live reports. You can write a bunch of cool reporting modules if you want. More often, however, I'm asked to help someone get an overview or ensure a status - they'd like a quick report for themselves. I think it would be nice if the report table returned could be exported directly as a csv (and if you feel like it, other formats as well).
As a second convenience export function I'd like to suggest being able to export the list of nodes returning 'successful' or the list of nodes returning 'failed' to a simple one-node-per-line-txt-format.
This is not really necessary, but would make it easy to go back and forth between WebUI and CLI usage. I.e. I'd like to build complex filters using the web interface, but would like to use the responding nodes in a shell script using the mco --nodes nodes.txt feature, or maybe for something completely different.
Hello,
I try to install 'mcomaster' but I have an issue during it.
I try to install on a CentOS 7 and after the command : RAILS_ENV=production scl enable ruby193 "bundle exec bin/rake db:reset --trace"
** Invoke db:reset (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:reset
** Invoke db:drop (first_time)
** Invoke db:load_config
** Execute db:drop
** Invoke db:setup (first_time)
** Invoke db:schema:load_if_ruby (first_time)
** Invoke db:create (first_time)
** Invoke db:load_config
** Execute db:create
** Invoke environment
** Execute db:schema:load_if_ruby
** Invoke db:schema:load (first_time)
** Invoke environment
** Invoke db:load_config
** Execute db:schema:load
-- create_table("actlogs", {:force=>true})
-> 0.1185s
-- create_table("app_settings", {:force=>true})
-> 0.0039s
-- create_table("filter_members", {:force=>true})
-> 0.0047s
-- create_table("filters", {:force=>true})
-> 0.0041s
-- create_table("policies", {:force=>true})
-> 0.0038s
-- create_table("policy_defaults", {:force=>true})
-> 0.0038s
-- create_table("reply_items", {:force=>true})
-> 0.0043s
-- create_table("responselogs", {:force=>true})
-> 0.0039s
-- create_table("roles", {:force=>true})
-> 0.0058s
-- add_index("roles", ["name", "resource_type", "resource_id"], {:name=>"index_roles_on_name_and_resource_type_and_resource_id"})
-> 0.0048s
-- add_index("roles", ["name"], {:name=>"index_roles_on_name"})
-> 0.0042s
-- create_table("users", {:force=>true})
-> 0.0131s
-- add_index("users", ["email"], {:name=>"index_users_on_email", :unique=>true})
-> 0.0048s
-- add_index("users", ["reset_password_token"], {:name=>"index_users_on_reset_password_token", :unique=>true})
-> 0.0047s
-- create_table("users_roles", {:id=>false, :force=>true})
-> 0.0040s
-- add_index("users_roles", ["user_id", "role_id"], {:name=>"index_users_roles_on_user_id_and_role_id"})
-> 0.0049s
-- initialize_schema_migrations_table()
-> 0.0056s
** Invoke db:structure:load_if_sql (first_time)
** Invoke db:create
** Invoke environment
** Execute db:structure:load_if_sql
** Invoke db:seed (first_time)
** Execute db:seed
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment
** Execute db:abort_if_pending_migrations
ROLES
role: admin
role: user
role: VIP
DEFAULT USERS
rake aborted!
NoMethodError: undefined method find_or_create_by_email' for #<Class:0x00000005ca2f88> /usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/activerecord-4.1.4/lib/active_record/dynamic_matchers.rb:26:in
method_missing'
/usr/share/mcomaster/db/seeds.rb:18:in <top (required)>' /usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:241:in
load'
/usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:241:in block in load' /usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:232:in
load_dependency'
/usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:241:in load' /usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/railties-4.1.4/lib/rails/engine.rb:543:in
load_seed'
/usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/activerecord-4.1.4/lib/active_record/tasks/database_tasks.rb:184:in load_seed' /usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/activerecord-4.1.4/lib/active_record/railties/databases.rake:173:in
block (2 levels) in <top (required)>'
/usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:240:in call' /usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:240:in
block in execute'
/usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:235:in each' /usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:235:in
execute'
/usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:179:in block in invoke_with_call_chain' /opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in
mon_synchronize'
/usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:172:in invoke_with_call_chain' /usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:201:in
block in invoke_prerequisites'
/usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:199:in each' /usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:199:in
invoke_prerequisites'
/usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:178:in block in invoke_with_call_chain' /opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in
mon_synchronize'
/usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:172:in invoke_with_call_chain' /usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:165:in
invoke'
/usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/activerecord-4.1.4/lib/active_record/railties/databases.rake:132:in block (2 levels) in <top (required)>' /usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:240:in
call'
/usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:240:in block in execute' /usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:235:in
each'
/usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:235:in execute' /usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:179:in
block in invoke_with_call_chain'
/opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in mon_synchronize' /usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:172:in
invoke_with_call_chain'
/usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:165:in invoke' /usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:150:in
invoke_task'
/usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:106:in block (2 levels) in top_level' /usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:106:in
each'
/usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:106:in block in top_level' /usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:115:in
run_with_threads'
/usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:100:in top_level' /usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:78:in
block in run'
/usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:176:in standard_exception_handling' /usr/share/mcomaster/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:75:in
run'
bin/rake:4:in `
I don't know why this occurs...
Thank you :)
Assets are precompiled with a checksum in their filename for me, but the images used by mcomaster (such as node.png, agent.png, collective.png, etc) don't have a checksum in the name so they are broken.
Is there something I need to do to either make sure the references to the images include the checksum, or that assets are compiled without the checksum in the filename?
I was wondering if the following feature would be hard to implement:
Authentication + authorization for multiple users.
I could certainly use it with my MCollective setup but don't know if you would be willing to implement it...
It would be nice to assign a certain role to a specific user or multiple users.
After logging in, a user would only be allowed to use an agent or access certain nodes based on a specific role (perhaps based on a regular expression through configuration in application.yml) .
What do you think of this idea ?
Hello
I've installed Mcomaster according wiki.
Can see Nodes and Facts in web interface.
However I can't see any Agent in list.
If I run "mco rpc" from commandline - agent works ok. But in WebUI I can't see anything.
There is no error in logs mcollective and mcomaster.
Mcomaster and mcollective installed from rpm.
Mcomaster: 0.1.0
Mcollective: 2.8.4
Ruby mcomaster: 1.9.3
Ruby mcollective: 1.8.7
Tried to install gem mcollective-client under ruby 1.9.3 - no result.
It just will not accept any password/user I use.
Hello, I'm having problems getting the agent registration to showup in the UI. Looking over a previous post was great help.
My nodes are self registering in the UI and agent info seems to be making it to redis. However the agent info is not showing up in the ui.
redis-cli
redis 127.0.0.1:6379> smembers "mcollective::nodeagents::hostname"
Im running mcollective 2.8
I installed from the following rpm:
mcomaster-0.1.0-1.141001_113_540c865.el6.x86_64
I have no errors in /var/log/mcollecitve.log on any of my nodes. Not sure where to go from here.
Any info greatly appreciated.
When I try to run any agent against my machine, I get the following error:
undefined method `request_sequence' for MCollective::Client:Class
I can not seem to find where this method is being called. When I look at the method, all it does is return a unique ID for the request by bumping up the number by 1.
Here are the logs:
Started POST "/execute/rpcutil/inventory" for 10.34.230.169 at 2014-10-01 13:34:17 -0400
Processing by ExecuteController#execute as JSON
Parameters: {"{"filter":{"identity":"=>{""c3osjboss1""=>{"},"args":{}}"=>nil}}, "agent"=>"rpcutil", "mcaction"=>"inventory"}
ESC[1mESC[35mUser Load (0.2ms)ESC[0m SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1aadba02-7ce2-4d80-87c0-31861d333887 Received a request, parameters: {"filter":{"identity":["c3osjboss1"]},"args":{}}
1aadba02-7ce2-4d80-87c0-31861d333887 Converted filters: {"fact"=>[], "cf_class"=>[], "agent"=>[], "identity"=>["c3osjboss1"], "compound"=>[]}
ESC[1mESC[36m (0.1ms)ESC[0m ESC[1mbegin transactionESC[0m
ESC[1mESC[35mSQL (0.3ms)ESC[0m INSERT INTO "actlogs" ("action", "agent", "args", "created_at", "filters", "owner", "txid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["action", "inventory"], ["agent", "rpcutil"], ["args", "{}"], ["created_at", "2014-10-01 17:34:17.843881"], ["filters", "{"identity":["c3osjboss1"]}"], ["owner", "user"], ["txid", "1aadba02-7ce2-4d80-87c0-31861d333887"], ["updated_at", "2014-10-01 17:34:17.843881"]]
ESC[1mESC[36m (2.3ms)ESC[0m ESC[1mcommit transactionESC[0m
1aadba02-7ce2-4d80-87c0-31861d333887 Sending acknowledgement.
ESC[1mESC[35mAppSetting Load (0.1ms)ESC[0m SELECT "app_settings".* FROM "app_settings" WHERE "app_settings"."set_key" = ? LIMIT 1 [["set_key", "policies_enabled"]]
Completed 200 OK in 8ms (Views: 0.1ms | ActiveRecord: 2.9ms)
ESC[1mESC[36m (0.0ms)ESC[0m ESC[1mbegin transactionESC[0m
ESC[1mESC[35mSQL (0.2ms)ESC[0m UPDATE "actlogs" SET "mcerr" = ?, "updated_at" = ? WHERE "actlogs"."id" = 6 [["mcerr", "undefined method `request_sequence' for MCollective::Client:Class"], ["updated_at", "2014-10-01 17:34:17.851926"]]
ESC[1mESC[36m (11.7ms)ESC[0m ESC[1mcommit transactionESC[0m
hi,
i've changed 2 things because mcollect has type number and type integer fields
line 35
switch actionDdl.input[ddlKey].type
when "string" then actionDdl.input[ddlKey]['isString'] = 1
when "boolean" then actionDdl.input[ddlKey]['isBool'] = 1
when "number", "integer"
actionDdl.input[ddlKey]['isInteger'] = 1
validationRules[ddlKey] = {
remote : {
type : "POST"
dataType : "number"
url : "/ddls/"+agent+"/validate/"+action
}
}
line 88
if input_type == "boolean"
if x.value == "true"
x.value = true
else
x.value = false
else if input_type in ["integer","number"]
x.value = parseInt(x.value)
I have my collective and all of my nodes listed in mcomaster, but none of my agents show up.
Is there anything special that needs to be done to ensure that the agents show up in mcomaster's interface? I can use them all from the command line with the 'mco' command and they work fine.
Hi
There is anyway to specify one custom mcollective client.cfg configuration for mcomaster.
I do not want to have a system wide mcollective client configuration.
Maybe it is already implemented I just did not understand how to configure it.
Could you provide one example, ao I could update the install documentation ?
It would be cool to be able choose from a predefined set of filters for those recurring actions.
Pick some filters, then add to your list of saved filters.
This would improve daily workflow as well as give the app a more personal feel ;)
Hello,
I'm trying to install mcomaster but I am having some problems...
I followed the guide at http://www.mcomaster.org/docs/install but I'm unable to get it running.
I assume the mcollective node which receives the registrations and saves them in redis is actually the mcollective client because Redis listens on localhost ?
In your docs, you mention directaddressing=1
but isn't it supposed to be direct_addressing =1
?
I think I followed all the steps correctly, and rails server -e production
starts without any problems but when I go to http://url:3000, I get an error page saying 'Something went wrong'.
Also, I don't see a Redis process on the mcollective client.
I restarted the mcollective process on both the mco client and one node.
I have setup mcollective with a client, 2 brokers and a large number of agents, but I'm not very familiar with the registration process of mcollective...
Any thoughts on what I'm doing wrong ?
Thanks.
:in app/assets/javascripts/helpers/mcclient.coffee
line 26:
is :if actionDdl.input[ddlKey]['optional']
should be if actionDdl.input[ddlKey]['optional']?
line 33:
is validationRules[ddlKey]['minlength'] = actionDdl.input[ddlKey]['maxlength']
should be validationRules[ddlKey]['minlength'] = actionDdl.input[ddlKey]['minlength']
line 40:
is validationRules[ddlKey]['dataType'] = "number"
should be validationRules[ddlKey]['remote']['dataType'] = "number"
Hey. Seems like a cool tool. So I thought Id give it a go. I have it all configured per your install guide. I am able to connect via webui. mco is working fine after the install. However, I am not seeing any nodes show up on the mcomaster dashboard(if you want to call it that).
Not quite sure where to start. Any help is greatly appreciated. Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.