5.02021-11-21T21:32:01ZCustom templatesAsteriskAsterisk## Description
Asterisk IP PBX template
## Overview
```
Zabbix template for Asterisk IP PBX
Finds out the total number of concurrent channels on trunks. Each thunk's name should start with "tru\_"
Installation:
- Put userparameter\_asterisk.conf in /etc/zabbix/zabbix\_agentd.d/ , restart zabbix agent
- Put asterisk\_trunks and asterisk\_calls scripts in /etc/zabbix/externalscripts/ and add execute privileges
- Set up cronjob for asterisk\_trunks script like this:
# crontab -l
SHELL=/bin/bash
# update Asterisk trunks info for zabbix
2 * * * * /etc/zabbix/externalscripts/asterisk\_trunks
- (Optional) If there're no enough permissions for /var/run/asterisk/asterisk.ctl then add following line in /etc/asterisk/asterisk.conf:
astctlpermissions = 775
, and restart Asterisk. Add zabbix user to group asterisk.
- Import Asterisk.xml template in Zabbix. Adjust values if necessary.
```
## Author
Oleg
Custom templatesAsteriskAsterisk trunksasterisk.calls.discovery6;6/1-7,07:55-21:05;30/1-7,00:00-07:54;30/1-7,21:06-23:59Finds out number of channels sorted by trunks. Each thunk's name should start with "tru_"Calls in {#TRUNK}CALCULATEDasterisk.calls[{#TRUNK}]6{#CALLS}Asterisk{last()}>40Number of calls in {#TRUNK} is {#CALLS}AVERAGEVoIPCalls in {#TRUNK}600100FIXEDGRADIENT_LINEEE0000- Asteriskasterisk.calls[{#TRUNK}]
Calls1120Calls in {#TRUNK}Asterisk5001000011000002