diff --git a/src/misc-tools/cvpoller-zabbix b/src/misc-tools/cvpoller-zabbix new file mode 100755 index 0000000..8ac9904 --- /dev/null +++ b/src/misc-tools/cvpoller-zabbix @@ -0,0 +1,9 @@ +#!/usr/bin/env sh + +# Simple wrapper script to use with Zabbix and the C client of vPoller + +_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 ".result[0] | {\"property\": .[\"${_property_name}\"]}.property"