bin/check-chef-nodes.rb in sensu-plugins-chef-0.0.3 vs bin/check-chef-nodes.rb in sensu-plugins-chef-0.0.4
- old
+ new
@@ -60,10 +60,10 @@
def connection
@connection ||= chef_api_connection
end
- def nodes_last_seen # rubocop:disable all
+ def nodes_last_seen
nodes = connection.get_rest('/nodes')
nodes.keys.map do |node_name|
node = connection.get_rest("/nodes/#{node_name}")
if node['ohai_time']
{ node_name => (Time.now - Time.at(node['ohai_time'])) > config[:critical_timespan].to_i }