bin/metrics-conntrack.rb in sensu-plugins-conntrack-0.0.3 vs bin/metrics-conntrack.rb in sensu-plugins-conntrack-1.0.0
- old
+ new
@@ -1,6 +1,6 @@
-e #! /usr/bin/env ruby
+#!/usr/bin/env ruby
# encoding: UTF-8
#
# conntrack-metrics
#
# DESCRIPTION:
@@ -40,10 +40,10 @@
description: 'Table to count',
long: '--table TABLE',
default: 'conntrack'
def run
- value = `conntrack -C #{config[:table]}`.strip
+ value = `conntrack -C #{config[:table]} 2>/dev/null`.strip
timestamp = Time.now.to_i
output config[:scheme], value, timestamp
ok