Skip to content

Commit

Permalink
cvpoller-zabbix: Just parse the stdout with 'jq', ignore stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
dnaeon committed Apr 7, 2014
1 parent ca87aad commit 36c436d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/misc-tools/cvpoller-zabbix
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ _args="$@"
_property_name=`echo ${_args} | sed -ne 's|.* -p \([a-zA-Z\.]*\)|\1|p'`

# Rename property as it might contain dots in the complete property name, so that 'jq' can parse it
vpoller-cclient ${_args} | jq -r ".result[0] | {\"property\": .[\"${_property_name}\"]}.property"
vpoller-cclient ${_args} 2>/dev/null | jq -r ".result[0] | {\"property\": .[\"${_property_name}\"]}.property"

0 comments on commit 36c436d

Please sign in to comment.