Asterisk by HTTP
Macros used
| Name | Value |
|---|---|
| {$AMI.PORT} | 5038 |
| {$AMI.QUEUE_CALLERS.MAX.WARN} | 10 |
| {$AMI.RESPONSE_TIME.MAX.WARN} | 10s |
| {$AMI.SECRET} | zabbix |
| {$AMI.TRUNK_ACTIVE_CHANNELS.MAX.WARN} | 28 |
| {$AMI.TRUNK_ACTIVE_CHANNELS_TOTAL.MAX.WARN:"IAX"} | 28 |
| {$AMI.TRUNK_ACTIVE_CHANNELS_TOTAL.MAX.WARN:"PJSIP"} | 28 |
| {$AMI.TRUNK_ACTIVE_CHANNELS_TOTAL.MAX.WARN:"SIP"} | 28 |
| {$AMI.TRUNK_REGEXP} | trunk |
| {$AMI.URL} | http://asterisk:8088/asterisk/rawman |
| {$AMI.USERNAME} | zabbix |
Items collected
| Name | Description | Type | Interval | Key and additional info |
|---|---|---|---|---|
| Asterisk: Active calls | The number of active calls at the moment. | DEPENDENT | - | asterisk.active_calls |
| Asterisk: Active channels | The number of active channels at the moment. | DEPENDENT | - | asterisk.active_channels |
| Asterisk: Calls processed | The number of calls processed after the last service restart. | DEPENDENT | - | asterisk.calls_processed |
| Asterisk: Calls processed per second | The number of calls processed per second. | DEPENDENT | - | asterisk.calls_processed.rate |
| Asterisk: Get stats | Asterisk system information in JSON format. | HTTP_AGENT | - | asterisk.get_stats |
| Asterisk: IAX trunks active channels | The total number of IAX trunks active channels. | DEPENDENT | - | asterisk.iax.active_channels |
| Asterisk: IAX offline peers | The number of offline IAX peers. | DEPENDENT | - | asterisk.iax.offline |
| Asterisk: IAX online peers | The number of online IAX peers. | DEPENDENT | - | asterisk.iax.online |
| Asterisk: IAX peers | The total number of IAX peers. | DEPENDENT | - | asterisk.iax.total |
| Asterisk: IAX unmonitored peers | The number of unmonitored IAX peers. | DEPENDENT | - | asterisk.iax.unmonitored |
| Asterisk: PJSIP trunks active channels | The total number of PJSIP trunks active channels. | DEPENDENT | - | asterisk.pjsip.active_channels |
| Asterisk: PJSIP available endpoints | The number of available PJSIP peers. | DEPENDENT | - | asterisk.pjsip.available |
| Asterisk: PJSIP endpoints | The total number of PJSIP peers. | DEPENDENT | - | asterisk.pjsip.total |
| Asterisk: PJSIP unavailable endpoints | The number of unavailable PJSIP peers. | DEPENDENT | - | asterisk.pjsip.unavailable |
| Asterisk: SIP trunks active channels | The total number of SIP trunks active channels. | DEPENDENT | - | asterisk.sip.active_channels |
| Asterisk: SIP monitored offline | The number of monitored offline SIP peers. | DEPENDENT | - | asterisk.sip.monitored_offline |
| Asterisk: SIP monitored online | The number of monitored online SIP peers. | DEPENDENT | - | asterisk.sip.monitored_online |
| Asterisk: SIP peers | The total number of SIP peers. | DEPENDENT | - | asterisk.sip.total |
| Asterisk: SIP unmonitored offline | The number of unmonitored offline SIP peers. | DEPENDENT | - | asterisk.sip.unmonitored_offline |
| Asterisk: SIP unmonitored online | The number of unmonitored online SIP peers. | DEPENDENT | - | asterisk.sip.unmonitored_online |
| Asterisk: Total queues | The number of configured queues. | DEPENDENT | - | asterisk.total_queues |
| Asterisk: Uptime | System uptime in 'N days, hh:mm:ss' format. | DEPENDENT | - | asterisk.uptime |
| Asterisk: Uptime after reload | System uptime after a config reload in 'N days, hh:mm:ss' format. | DEPENDENT | - | asterisk.uptime_reload |
| Asterisk: Version | Service version | DEPENDENT | - | asterisk.version |
| Asterisk: Service response time | Asterisk Manager API performance. | SIMPLE | - | net.tcp.service.perf["tcp","{HOST.CONN}","{$AMI.PORT}"] |
| Asterisk: Service status | Asterisk Manager API port availability. | SIMPLE | - | net.tcp.service["tcp","{HOST.CONN}","{$AMI.PORT}"] |
Triggers
| Name | Description | Expression | Priority | Dependencies |
|---|---|---|---|---|
| Asterisk: Total number of active channels of IAX trunks is too high | The IAX trunks may not be able to process new calls. | min(/Asterisk by HTTP/asterisk.iax.active_channels,10m)>={$AMI.TRUNK_ACTIVE_CHANNELS_TOTAL.MAX.WARN:"IAX"} | WARNING 📢 | Asterisk: IAX trunks active channels |
| Asterisk: Total number of active channels of PJSIP trunks is too high | The PJSIP trunks may not be able to process new calls. | min(/Asterisk by HTTP/asterisk.pjsip.active_channels,10m)>={$AMI.TRUNK_ACTIVE_CHANNELS_TOTAL.MAX.WARN:"PJSIP"} | WARNING 📢 | Asterisk: PJSIP trunks active channels |
| Asterisk: Total number of active channels of SIP trunks is too high | The SIP trunks may not be able to process new calls. | min(/Asterisk by HTTP/asterisk.sip.active_channels,10m)>={$AMI.TRUNK_ACTIVE_CHANNELS_TOTAL.MAX.WARN:"SIP"} | WARNING 📢 | Asterisk: SIP trunks active channels |
| Asterisk: Failed to fetch AMI page | Zabbix has not received data for items for the last 30 minutes. | nodata(/Asterisk by HTTP/asterisk.uptime,30m)=1 | WARNING 📢 | Asterisk: Uptime |
| Asterisk: has been restarted | Uptime is less than 10 minutes. | last(/Asterisk by HTTP/asterisk.uptime)<10m | INFO 🔔 | Asterisk: Uptime |
| Asterisk: has been reloaded | Uptime is less than 10 minutes. | last(/Asterisk by HTTP/asterisk.uptime_reload)<10m | INFO 🔔 | Asterisk: Uptime after reload |
| Asterisk: Version has changed | Asterisk version has changed. Ack to close. | last(/Asterisk by HTTP/asterisk.version,#1)<>last(/Asterisk by HTTP/asterisk.version,#2) and length(last(/Asterisk by HTTP/asterisk.version))>0 | INFO 🔔 | Asterisk: Version |
| Asterisk: Service response time is too high | - | min(/Asterisk by HTTP/net.tcp.service.perf["tcp","{HOST.CONN}","{$AMI.PORT}"],5m)>{$AMI.RESPONSE_TIME.MAX.WARN} | WARNING 📢 | Asterisk: Service response time |
| Asterisk: Service is down | - | last(/Asterisk by HTTP/net.tcp.service["tcp","{HOST.CONN}","{$AMI.PORT}"])=0 | AVERAGE ⚠ | Asterisk: Service status |
Discovery rule №1
| Name | Description | Type | Interval | Key and additional info |
|---|---|---|---|---|
| IAX peers discovery | - | DEPENDENT | 0 | asterisk.iax_peers.discovery |
Item prototypes
| Name | Description | Type | Interval | Key and additional info |
|---|---|---|---|---|
| IAX trunk "{#OBJECTNAME}": Active channels | The total number of active IAX trunk channels. | DEPENDENT | - | asterisk.iax.trunk.active_channels[{#OBJECTNAME}] |
| IAX trunk "{#OBJECTNAME}": Status | IAX trunk status. Here are the possible states that a device state may have: Unmonitored UNKNOWN UNREACHABLE OK | DEPENDENT | - | asterisk.iax.trunk.status[{#OBJECTNAME}] |
Trigger prototypes
| Name | Description | Expression | Priority | Dependencies |
|---|---|---|---|---|
| IAX trunk "{#OBJECTNAME}": Number of the IAX trunk "{#OBJECTNAME}" active channels is too high | The IAX trunk may not be able to process new calls. | min(/Asterisk by HTTP/asterisk.iax.trunk.active_channels[{#OBJECTNAME}],10m)>={$AMI.TRUNK_ACTIVE_CHANNELS.MAX.WARN:"{#OBJECTNAME}"} | WARNING 📢 | IAX trunk "{#OBJECTNAME}": Active channels |
| IAX trunk "{#OBJECTNAME}": IAX trunk {#OBJECTNAME} has a state {ITEM.VALUE} | The IAX trunk is unable to establish a connection with a neighbor due to network issues or incorrect configuration. | last(/Asterisk by HTTP/asterisk.iax.trunk.status[{#OBJECTNAME}])="UNKNOWN" or last(/Asterisk by HTTP/asterisk.iax.trunk.status[{#OBJECTNAME}])="UNREACHABLE" | AVERAGE ⚠ | IAX trunk "{#OBJECTNAME}": Status |
Discovery rule №2
| Name | Description | Type | Interval | Key and additional info |
|---|---|---|---|---|
| PJSIP endpoints discovery | - | DEPENDENT | 0 | asterisk.pjsip_endpoints.discovery |
Item prototypes
| Name | Description | Type | Interval | Key and additional info |
|---|---|---|---|---|
| PJSIP trunk "{#OBJECTNAME}": Active channels | The total number of active PJSIP trunk channels. | DEPENDENT | - | asterisk.pjsip.trunk.active_channels[{#OBJECTNAME}] |
| PJSIP trunk "{#OBJECTNAME}": Device state | PJSIP trunk status. Here are the possible states that a device state may have: Unavailable Not in use In use | DEPENDENT | - | asterisk.pjsip.trunk.devicestate[{#OBJECTNAME}] |
Trigger prototypes
| Name | Description | Expression | Priority | Dependencies |
|---|---|---|---|---|
| PJSIP trunk "{#OBJECTNAME}": Number of the PJSIP trunk "{#OBJECTNAME}" active channels is too high | The PJSIP trunk may not be able to process new calls. | min(/Asterisk by HTTP/asterisk.pjsip.trunk.active_channels[{#OBJECTNAME}],10m)>={$AMI.TRUNK_ACTIVE_CHANNELS.MAX.WARN:"{#OBJECTNAME}"} | WARNING 📢 | PJSIP trunk "{#OBJECTNAME}": Active channels |
| PJSIP trunk "{#OBJECTNAME}": PJSIP trunk {#OBJECTNAME} has a state Unavailable | The PJSIP trunk is unable to establish a connection with a neighbor due to network issues or incorrect configuration. | last(/Asterisk by HTTP/asterisk.pjsip.trunk.devicestate[{#OBJECTNAME}])="Unavailable" | AVERAGE ⚠ | PJSIP trunk "{#OBJECTNAME}": Device state |
Discovery rule №3
| Name | Description | Type | Interval | Key and additional info |
|---|---|---|---|---|
| Queues discovery | - | DEPENDENT | 0 | asterisk.queues.discovery |
Item prototypes
| Name | Description | Type | Interval | Key and additional info |
|---|---|---|---|---|
| "{#QUEUE}": Available | The number of available queue members. | DEPENDENT | - | asterisk.queue.available[{#QUEUE}] |
| "{#QUEUE}": Callers | The number incoming calls in queue. | DEPENDENT | - | asterisk.queue.callers[{#QUEUE}] |
| "{#QUEUE}": Logged in | The number of queue members. | DEPENDENT | - | asterisk.queue.loggedin[{#QUEUE}] |
Trigger prototypes
| Name | Description | Expression | Priority | Dependencies |
|---|---|---|---|---|
| "{#QUEUE}": Number of callers in the queue "{#QUEUE}" is too high | There is a large number of calls in the queue. | min(/Asterisk by HTTP/asterisk.queue.callers[{#QUEUE}],10m)>{$AMI.QUEUE_CALLERS.MAX.WARN:"{#QUEUE}"} | WARNING 📢 | "{#QUEUE}": Callers |
Discovery rule №4
| Name | Description | Type | Interval | Key and additional info |
|---|---|---|---|---|
| SIP peers discovery | - | DEPENDENT | 0 | asterisk.sip_peers.discovery |
Item prototypes
| Name | Description | Type | Interval | Key and additional info |
|---|---|---|---|---|
| SIP trunk "{#OBJECTNAME}": Active channels | The total number of active SIP trunk channels. | DEPENDENT | - | asterisk.sip.trunk.active_channels[{#OBJECTNAME}] |
| SIP trunk "{#OBJECTNAME}": Status | SIP trunk status. Here are the possible states that a device state may have: Unmonitored UNKNOWN UNREACHABLE OK | DEPENDENT | - | asterisk.sip.trunk.status[{#OBJECTNAME}] |
Trigger prototypes
| Name | Description | Expression | Priority | Dependencies |
|---|---|---|---|---|
| SIP trunk "{#OBJECTNAME}": Number of the SIP trunk "{#OBJECTNAME}" active channels is too high | The SIP trunk may not be able to process new calls. | min(/Asterisk by HTTP/asterisk.sip.trunk.active_channels[{#OBJECTNAME}],10m)>={$AMI.TRUNK_ACTIVE_CHANNELS.MAX.WARN:"{#OBJECTNAME}"} | WARNING 📢 | SIP trunk "{#OBJECTNAME}": Active channels |
| SIP trunk "{#OBJECTNAME}": SIP trunk {#OBJECTNAME} has a state {ITEM.VALUE} | The SIP trunk is unable to establish a connection with a neighbor due to network issues or incorrect configuration. | last(/Asterisk by HTTP/asterisk.sip.trunk.status[{#OBJECTNAME}])="UNKNOWN" or last(/Asterisk by HTTP/asterisk.sip.trunk.status[{#OBJECTNAME}])="UNREACHABLE" | AVERAGE ⚠ | SIP trunk "{#OBJECTNAME}": Status |