I've pulled down the master branch of this gem, and integrated the plugins to my organization's monitoring cookbook. This deploys the sensu plugins to the clients, and uses the embedded Ruby binary at /opt/chef/embedded/bin/ruby
. The current version deployed with Chef Client 12.* is Ruby 2.3.0
action: create
command: /opt/chef/embedded/bin/ruby /etc/sensu/plugins/metrics-haproxy.rb -c 10.0.2.15
duration: 0.367
executed: 2016-11-18 15:28:18
handlers: slack
history: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2
interval: 300
issued: 2016-11-18 15:28:18
name: haproxy_metrics
occurrences: 1
output: Check failed to run: Illegal quoting in line 2., ["/opt/chef/embedded/lib/ruby/2.3.0/csv.rb:1883:in
`block (2 levels) in shift'", "/opt/chef/embedded/lib/ruby/2.3.0/csv.rb:1845:in `each'",
"/opt/chef/embedded/lib/ruby/2.3.0/csv.rb:1845:in `block in shift'",
"/opt/chef/embedded/lib/ruby/2.3.0/csv.rb:1805:in `loop'",
"/opt/chef/embedded/lib/ruby/2.3.0/csv.rb:1805:in `shift'",
"/opt/chef/embedded/lib/ruby/2.3.0/csv.rb:1747:in `each'",
"/opt/chef/embedded/lib/ruby/2.3.0/csv.rb:1761:in `to_a'",
"/opt/chef/embedded/lib/ruby/2.3.0/csv.rb:1761:in `read'",
"/opt/chef/embedded/lib/ruby/2.3.0/csv.rb:1307:in `parse'", "/etc/sensu/plugins/metrics-
haproxy.rb:145:in `run'", "/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugin-1.4.3/lib/sensu-
plugin/cli.rb:58:in `block in <class:CLI>'"]
standalone: true
status: 2
total_state_change: 0
So far, the only conclusion I can come to is that Ruby 2.3.0 is not yet supported by this plugin, or there is a bug in this use of CSV for this version. Or, possibly this implementation does not support the latest CSV class itself. Any feedback is much appreciated.