sensu-plugins / sensu-plugins-chef

This plugin provides native instrumentation for monitoring Chef, including service health checks (via chef-server-ctl) and chef node status, and a Sensu handler for removing stale Sensu clients.
http://sensu-plugins.io
MIT License
6 stars 16 forks source link

Warning messages in handler-chef-node #21

Open runningman84 opened 8 years ago

runningman84 commented 8 years ago

Can these messages be supressed?

{"timestamp":"2016-09-09T15:09:24.324282+0000","level":"info","message":"handler output","handler":{"type":"pipe","filters":["keepalives","chef","every_3_occurrences","max_300_occurre
nces"],"severities":["warning","critical"],"command":"sudo handler-chef-node.rb","timeout":300,"name":"chef_node"},"output":["W, [2016-09-09T15:09:24.284687 #1379]  WARN -- : Terminat
ing task: type=:finalizer, meta={:method_name=>:__shutdown__}, status=:receiving\n\tCelluloid::TaskFiber backtrace unavailable. Please try `Celluloid.task_class = Celluloid::TaskThrea
d` if you need backtraces here.\n"]
majormoses commented 7 years ago

@runningman84 what version of the gem are you seeing this on?

majormoses commented 7 years ago

I would guess it has something with where Celluloid is being booted, but I would honestly have to look more into it to be sure. I saw some odd stuff with that handler that I did not need to do when re-writing the other checks to use ridley.

runningman84 commented 7 years ago

The current release sensu-plugins-chef-3.0.2 seems to have other problems:

warning: event filtering in sensu-plugin is deprecated, see http://bit.ly/sensu-plugin
warning: occurrence filtering in sensu-plugin is deprecated, see http://bit.ly/sensu-plugin
only handling every 60 occurrences: i-0fc808cbdfcf21b40/keepalive
/opt/sensu/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- hashie/logger (LoadError)
    from /opt/sensu/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-chef-3.0.2/bin/handler-chef-node.rb:48:in `<top (required)>'
    from /opt/sensu/embedded/bin/handler-chef-node.rb:22:in `load'
    from /opt/sensu/embedded/bin/handler-chef-node.rb:22:in `<main>'
runningman84 commented 7 years ago

and this error with enable_deprecated_filtering set to false:

ignoring event -- no handler defined
/opt/sensu/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- hashie/logger (LoadError)
    from /opt/sensu/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-chef-3.0.2/bin/handler-chef-node.rb:48:in `<top (required)>'
    from /opt/sensu/embedded/bin/handler-chef-node.rb:22:in `load'
    from /opt/sensu/embedded/bin/handler-chef-node.rb:22:in `<main>'
majormoses commented 7 years ago

hmm there was no change to the handler (there were for 2 of the checks), I am guessing this is due to event filters being deprecated in newer versions of sensu. Will certainly need to be updated. I am not really using this handler myself though so it might be a bit before I get to this. I use aws-cleaner instead to remove nodes.