Skip to content

Commit

Permalink
Commit a wrapper script for use with Zabbix and the C client of vPoller
Browse files Browse the repository at this point in the history
  • Loading branch information
dnaeon committed Apr 6, 2014
1 parent 066e791 commit 3a8a5db
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/misc-tools/cvpoller-zabbix
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 3a8a5db

Please sign in to comment.