Skip to content

Instantly share code, notes, and snippets.

@altmas5
Last active February 13, 2020 00:37
Show Gist options
  • Select an option

  • Save altmas5/fbd4eb82b83e96ee5feca998b9da1072 to your computer and use it in GitHub Desktop.

Select an option

Save altmas5/fbd4eb82b83e96ee5feca998b9da1072 to your computer and use it in GitHub Desktop.
Queue stats (Members, Members in use, Members in call) for zabbix items
#!/bin/bash
case $1 in
"in-call")
sudo asterisk -rx "queue show $2"|grep SIP|grep 'in call'| wc -l
;;
"in-use")
sudo asterisk -rx "queue show $2"|grep SIP|grep 'In use'| wc -l
;;
"ext")
sudo asterisk -rx "queue show $2"|grep SIP|wc -l
;;
*)
esac
UserParameter=queue.stats[*],/var/lib/zabbix/externalscripts/queue_stats.sh "$1" "$2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment