Skip to content

Instantly share code, notes, and snippets.

@skarllot
Created January 6, 2014 18:11
Show Gist options
  • Save skarllot/8286891 to your computer and use it in GitHub Desktop.
Save skarllot/8286891 to your computer and use it in GitHub Desktop.
Zabbix 2.0 FreeBSD net.if.discovery
. . .
UserParameter=net.if.discovery,ifconfig | awk ' BEGIN { print "{\"data\":\[" } /^[a-z0-9]+\:/ { gsub(/\:/,"",$ 1); if ( $ 1 != "lo0" ) print "{ \"{#IFNAME}\":\"" $ 1"\" }," } END { print "{ \"{#IFNAME}\":\"lo0\"} \n]}" } '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment