Hi,

I've made this change.  Can you look at this again to see what other changes are needed?|

Thanks,
Jessica


________________________________
 From: nstielau <notifications@github.com>
To: sensu/sensu-community-plugins <sensu-community-plugins@noreply.github.com> 
Cc: Jessica Blackburn <jblackburn22@yahoo.com> 
Sent: Thursday, March 21, 2013 11:40 AM
Subject: Re: [sensu-community-plugins] Wrap data elements to prevent abnormal exit (#163)
 

In plugins/rabbitmq/rabbitmq-overview-metrics.rb:
>        output "#{config[:scheme]}.message_stats.deliver_no_ack.count", overview['message_stats']['deliver_no_ack'], timestamp
>        output "#{config[:scheme]}.message_stats.deliver_no_ack.rate", overview['message_stats']['deliver_no_ack_details']['rate'], timestamp
>      end
>  
>      # overview['message_stats']['deliver_get']
> -    output "#{config[:scheme]}.message_stats.deliver_get.count", overview['message_stats']['deliver_get'], timestamp
> -    output "#{config[:scheme]}.message_stats.deliver_get.rate", overview['message_stats']['deliver_get_details']['rate'], timestamp
> +    if overview['message_stats'].include?('deliver_get') then 
This part, unlike the others above, seem like it could actually raise an exception (since there was no check previously).  This could still raise and error if overview['message_stats']['deliver_get_details']['rate'] is called and overview['message_stats']['deliver_get_details']['rate'] is nil.  Do you want to protect against that as well?
—
Reply to this email directly or view it on GitHub.