netuitive / chef-netuitive Goto Github PK
View Code? Open in Web Editor NEWInstalls Native Netuitive Agent
License: MIT License
Installs Native Netuitive Agent
License: MIT License
By not specifying this it will assume this is in the wrapper cookbook which is not correct.
Here is an example of a failure:
* template[/opt/netuitive-agent/conf/collectors/MongoDBCollector.conf] action create[2016-05-20T19:49:17+00:00] INFO: Processing template[/opt/netuitive-agent/conf/collectors/MongoDBCollector.conf] action create (/var/chef/cache/cookbooks/netuitive/libraries/provider_custom_collector.rb line 21)
================================================================================
Error executing action `create` on resource 'template[/opt/netuitive-agent/conf/collectors/MongoDBCollector.conf]'
================================================================================
Chef::Exceptions::FileNotFound
------------------------------
Cookbook 'cc_netuitive' (0.4.0) does not contain a file at any of these locations:
templates/ubuntu-14.04/collector_generic.conf.erb
templates/ubuntu/collector_generic.conf.erb
templates/default/collector_generic.conf.erb
templates/collector_generic.conf.erb
Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/netuitive/libraries/provider_custom_collector.rb
21: template "#{new_resource.collectors_dir}/#{collector}.conf" do
22: source 'collector_generic.conf.erb'
23: owner 'root'
24: group 'root'
25: mode 00744
26: variables(
27: options: options
28: )
29: end
30: end
Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/netuitive/libraries/provider_custom_collector.rb:21:in `block (2 levels) in <class:NetuitiveCustomCollectorProvider>'
template("/opt/netuitive-agent/conf/collectors/MongoDBCollector.conf") do
action [:create]
retries 0
retry_delay 2
default_guard_interpreter :default
source "collector_generic.conf.erb"
variables {:options=>{"enabled"=>"True", "host"=>"127.0.0.1:27017", "metrics_blacklist"=>".*databases.*|.*metrics.repl.executor.shuttingDown.*|.*storageEngine.*|.*writeBacksQueued.*|.*mem.supported.*|.*tcmallocformattedString.*", "simple"=>"True"}}
declared_type :template
cookbook_name "cc_netuitive"
owner "root"
group "root"
mode 484
path "/opt/netuitive-agent/conf/collectors/MongoDBCollector.conf"
end
[2016-05-20T19:49:17+00:00] INFO: Running queued delayed notifications before re-raising exception
================================================================================
Error executing action `create` on resource 'netuitive_collector[netuitive]'
================================================================================
Chef::Exceptions::FileNotFound
------------------------------
template[/opt/netuitive-agent/conf/collectors/MongoDBCollector.conf] (/var/chef/cache/cookbooks/netuitive/libraries/provider_custom_collector.rb line 21) had an error: Chef::Exceptions::FileNotFound: Cookbook 'cc_netuitive' (0.4.0) does not contain a file at any of these locations:
templates/ubuntu-14.04/collector_generic.conf.erb
templates/ubuntu/collector_generic.conf.erb
templates/default/collector_generic.conf.erb
templates/collector_generic.conf.erb
Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/cc_netuitive/recipes/setup.rb
21: netuitive_collector 'netuitive' do
22: custom_collectors node['netuitive']['custom_collectors']
23: end
Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/cc_netuitive/recipes/setup.rb:21:in `from_file'
netuitive_collector("netuitive") do
action [:create]
retries 0
retry_delay 2
default_guard_interpreter :default
declared_type :netuitive_collector
cookbook_name "cc_netuitive"
recipe_name "setup"
custom_collectors {"MongoDBCollector"=>{"enabled"=>"True", "host"=>"127.0.0.1:27017", "metrics_blacklist"=>".*databases.*|.*metrics.repl.executor.shuttingDown.*|.*storageEngine.*|.*writeBacksQueued.*|.*mem.supported.*|.*tcmallocformattedString.*", "simple"=>"True"}}
collectors_dir "/opt/netuitive-agent/conf/collectors"
end
[2016-05-20T19:49:17+00:00] INFO: Running queued delayed notifications before re-raising exception
Right now the Cookbook basically only really supports an api key. It was written in mind to have a separate template that would then be included and merged, due a bug with diamond (and netuitive) this does not work. We will need to add more things to the 'base template'. I do not really know all the things we should be adding and would be helpful to see a real config file used by internal netuitive or an existing customer.
@createor @shawnbutts if you could produce a sample I can work on getting that into the template. If you want to submit a PR with either an example config file or update the existing config file with some suggestions that would be great.
I would imagine that rather than having an attribute for each value in the config may be rather annoying we may wish to have a single attribute as a hash or something like that. Once I see what a example config file looks like we can make a decision on that.
We currently support debian based systems and should support adding epel based systems such as centos.
The typo is the same on the resource and the provider, so it works if you use the typo'ed attribute.
Wondering if users would like us to push to the supermarket rather than just tagging it in git.
Please vote with a
@majormoses
Running on:
Development: Chef 11.10, Ubuntu 14.04.2 LTS on Vagrant 1.8.1
Production: Chef 11.10, Ubuntu 14.04.3 LTS
Chef 11 supports the 'provides' method on Resources but not on Providers. See this issue: chef-boneyard/chef-vault#36
Would be great to add Chef 11 compatibility (for legacy AWS OpsWorks Chef 11 stacks)
The agent will restart when the main config is updated but not when any of the custom collectors are updated.
We have only basic lint testing, we should add some unit testing.
Instead of using make rubotest
we should use make travisci
https://github.com/Netuitive/chef-netuitive/blob/master/Makefile#L13 that way people can add tests to the test suite without having write access.
Support installing the java agent (zorka) and rails agent (not sure if there are others)
Add functionality to support a Windows OS install/config
Looks like platform metadata is bad:
$ berks upload
Skipping apt (3.0.0) (frozen)
Skipping cc_netuitive (0.2.0) (frozen)
E, [2016-03-21T18:43:29.042795 #9634] ERROR -- : Ridley::Errors::HTTPBadRequest: {"error":["Invalid key '[\"ubuntu\", \"debian\", \"centos\", \"redhat\"]' for metadata.platforms"]}
E, [2016-03-21T18:43:29.043686 #9634] ERROR -- : /home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/ridley-4.5.0/lib/ridley/middleware/chef_response.rb:24:in `on_complete'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/faraday-0.9.2/lib/faraday/response.rb:9:in `block in call'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/faraday-0.9.2/lib/faraday/response.rb:57:in `on_complete'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/faraday-0.9.2/lib/faraday/response.rb:8:in `call'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/faraday-0.9.2/lib/faraday/response.rb:8:in `call'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/ridley-4.5.0/lib/ridley/middleware/chef_auth.rb:74:in `call'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/faraday-0.9.2/lib/faraday/request/retry.rb:116:in `call'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/faraday-0.9.2/lib/faraday/rack_builder.rb:139:in `build_response'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/faraday-0.9.2/lib/faraday/connection.rb:377:in `run_request'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/ridley-4.5.0/lib/ridley/connection.rb:105:in `run_request'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/faraday-0.9.2/lib/faraday/connection.rb:177:in `put'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:26:in `public_send'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:26:in `dispatch'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:63:in `dispatch'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/cell.rb:60:in `block in invoke'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/cell.rb:71:in `block in task'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/actor.rb:357:in `block in task'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/tasks.rb:57:in `block in initialize'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/tasks/task_thread.rb:21:in `block in create'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/thread_handle.rb:13:in `block in initialize'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/actor_system.rb:32:in `block in get_thread'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/internal_pool.rb:130:in `call'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/internal_pool.rb:130:in `block in create'
(celluloid):0:in `remote procedure call'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:92:in `value'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/proxies/cell_proxy.rb:17:in `_send_'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/pool_manager.rb:41:in `_send_'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/pool_manager.rb:140:in `method_missing'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:26:in `public_send'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:26:in `dispatch'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:63:in `dispatch'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/cell.rb:60:in `block in invoke'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/cell.rb:71:in `block in task'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/actor.rb:357:in `block in task'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/tasks.rb:57:in `block in initialize'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/tasks/task_fiber.rb:15:in `block in create'
(celluloid):0:in `remote procedure call'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:92:in `value'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/ridley-4.5.0/lib/ridley/resource.rb:132:in `raw_request'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/ridley-4.5.0/lib/ridley/resource.rb:123:in `request'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/ridley-4.5.0/lib/ridley/resources/cookbook_resource.rb:162:in `update'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/ridley-4.5.0/lib/ridley/resources/cookbook_resource.rb:230:in `upload'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:26:in `public_send'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:26:in `dispatch'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:63:in `dispatch'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/cell.rb:60:in `block in invoke'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/cell.rb:71:in `block in task'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/actor.rb:357:in `block in task'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/tasks.rb:57:in `block in initialize'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/tasks/task_thread.rb:21:in `block in create'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/thread_handle.rb:13:in `block in initialize'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/actor_system.rb:32:in `block in get_thread'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/internal_pool.rb:130:in `call'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/internal_pool.rb:130:in `block in create'
(celluloid):0:in `remote procedure call'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:92:in `value'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/berkshelf-4.3.0/lib/berkshelf/uploader.rb:55:in `block (2 levels) in upload'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/berkshelf-4.3.0/lib/berkshelf/uploader.rb:51:in `each'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/berkshelf-4.3.0/lib/berkshelf/uploader.rb:51:in `block in upload'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/ridley-4.5.0/lib/ridley/client.rb:38:in `open'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/ridley-4.5.0/lib/ridley.rb:56:in `open'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/berkshelf-4.3.0/lib/berkshelf.rb:144:in `ridley_connection'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/berkshelf-4.3.0/lib/berkshelf/uploader.rb:50:in `upload'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/berkshelf-4.3.0/lib/berkshelf/uploader.rb:37:in `run'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/berkshelf-4.3.0/lib/berkshelf/berksfile.rb:592:in `upload'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/berkshelf-4.3.0/lib/berkshelf/cli.rb:208:in `upload'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/berkshelf-4.3.0/lib/berkshelf/cli.rb:52:in `dispatch'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/berkshelf-4.3.0/lib/berkshelf/cli.rb:27:in `execute!'
/home/babrams/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/berkshelf-4.3.0/bin/berks:5:in `<top (required)>'
/home/babrams/.rbenv/versions/2.1.4/bin/berks:23:in `load'
/home/babrams/.rbenv/versions/2.1.4/bin/berks:23:in `<main>'
There was an error connecting to the Chef Server
Currently We do not have any documentation on what versions of chef we support. We currently support any chef 12.x release.
Once #33 lands this will not be true anymore. We will want to document supported versions.
I am thinking that we will officially support 12.x and 11.x will be best effort.
I'm not sure if this is a bug or enhancement, but the cookbook fails to install the netuitive agent in Ubuntu with chef client 12.9+ due to the addition of apt_repository as a core resource.
The repo gets created in Ubuntu 14.04 as
vagrant@netuitive-ubuntu-1404:~$ cat /etc/apt/sources.list.d/netuitive.list
deb "https://repos.app.netuitive.com/deb/" trusty stable main
whereas, it should be
vagrant@netuitive-ubuntu-1404:~$ cat /etc/apt/sources.list.d/netuitive.list
deb "https://repos.app.netuitive.com/deb/" stable main
Received a security alert:
Known moderate severity security vulnerability detected in rack >= 2.0.0, < 2.0.6 defined in Gemfile.lock.
Gemfile.lock update suggested: rack ~> 2.0.6.
https://github.com/Netuitive/chef-netuitive/network/alert/Gemfile.lock/rack/open
We should run all of the tests in docker container using kitchen-docker or kitchen-dokken to prevent issues and have a higher degree of confidence that it works.
We need to drop chef 12 and 13 compatibility due to maintainability. See #61 (comment) for more details.
Make some decisions and document support, this includes outlining new branching strategies and expectations.
Fix ci
EDIT: based on the feedback here is a list of action items:
chef-client/11.x
, chef-client/12.x
, and chef-client/13.x
.After the repo was forked the badge in the readme was not updated.
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.