Перейти к основному содержимому

Asterisk by HTTP

Macros used

NameValue
{$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

NameDescriptionTypeIntervalKey and additional info
Asterisk: Active callsThe number of active calls at the moment.DEPENDENT

-

asterisk.active_calls
Asterisk: Active channelsThe number of active channels at the moment.DEPENDENT

-

asterisk.active_channels
Asterisk: Calls processedThe number of calls processed after the last service restart.DEPENDENT

-

asterisk.calls_processed
Asterisk: Calls processed per secondThe number of calls processed per second.DEPENDENT

-

asterisk.calls_processed.rate
Asterisk: Get statsAsterisk system information in JSON format.HTTP_AGENT

-

asterisk.get_stats
Asterisk: IAX trunks active channelsThe total number of IAX trunks active channels.DEPENDENT

-

asterisk.iax.active_channels
Asterisk: IAX offline peersThe number of offline IAX peers.DEPENDENT

-

asterisk.iax.offline
Asterisk: IAX online peersThe number of online IAX peers.DEPENDENT

-

asterisk.iax.online
Asterisk: IAX peersThe total number of IAX peers.DEPENDENT

-

asterisk.iax.total
Asterisk: IAX unmonitored peersThe number of unmonitored IAX peers.DEPENDENT

-

asterisk.iax.unmonitored
Asterisk: PJSIP trunks active channelsThe total number of PJSIP trunks active channels.DEPENDENT

-

asterisk.pjsip.active_channels
Asterisk: PJSIP available endpointsThe number of available PJSIP peers.DEPENDENT

-

asterisk.pjsip.available
Asterisk: PJSIP endpointsThe total number of PJSIP peers.DEPENDENT

-

asterisk.pjsip.total
Asterisk: PJSIP unavailable endpointsThe number of unavailable PJSIP peers.DEPENDENT

-

asterisk.pjsip.unavailable
Asterisk: SIP trunks active channelsThe total number of SIP trunks active channels.DEPENDENT

-

asterisk.sip.active_channels
Asterisk: SIP monitored offlineThe number of monitored offline SIP peers.DEPENDENT

-

asterisk.sip.monitored_offline
Asterisk: SIP monitored onlineThe number of monitored online SIP peers.DEPENDENT

-

asterisk.sip.monitored_online
Asterisk: SIP peersThe total number of SIP peers.DEPENDENT

-

asterisk.sip.total
Asterisk: SIP unmonitored offlineThe number of unmonitored offline SIP peers.DEPENDENT

-

asterisk.sip.unmonitored_offline
Asterisk: SIP unmonitored onlineThe number of unmonitored online SIP peers.DEPENDENT

-

asterisk.sip.unmonitored_online
Asterisk: Total queuesThe number of configured queues.DEPENDENT

-

asterisk.total_queues
Asterisk: UptimeSystem uptime in 'N days, hh:mm:ss' format.DEPENDENT

-

asterisk.uptime
Asterisk: Uptime after reloadSystem uptime after a config reload in 'N days, hh:mm:ss' format.DEPENDENT

-

asterisk.uptime_reload
Asterisk: VersionService versionDEPENDENT

-

asterisk.version
Asterisk: Service response timeAsterisk Manager API performance.SIMPLE

-

net.tcp.service.perf["tcp","{HOST.CONN}","{$AMI.PORT}"]
Asterisk: Service statusAsterisk Manager API port availability.SIMPLE

-

net.tcp.service["tcp","{HOST.CONN}","{$AMI.PORT}"]

Triggers

NameDescriptionExpressionPriorityDependencies
Asterisk: Total number of active channels of IAX trunks is too highThe 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 highThe 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 highThe 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 pageZabbix has not received data for items for the last 30 minutes.nodata(/Asterisk by HTTP/asterisk.uptime,30m)=1WARNING 📢Asterisk: Uptime
Asterisk: has been restartedUptime is less than 10 minutes.last(/Asterisk by HTTP/asterisk.uptime)<10mINFO 🔔Asterisk: Uptime
Asterisk: has been reloadedUptime is less than 10 minutes.last(/Asterisk by HTTP/asterisk.uptime_reload)<10mINFO 🔔Asterisk: Uptime after reload
Asterisk: Version has changedAsterisk 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))>0INFO 🔔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}"])=0AVERAGE ⚠Asterisk: Service status

Discovery rule №1

NameDescriptionTypeIntervalKey and additional info
IAX peers discovery

-

DEPENDENT0asterisk.iax_peers.discovery

Item prototypes

NameDescriptionTypeIntervalKey and additional info
IAX trunk "{#OBJECTNAME}": Active channelsThe total number of active IAX trunk channels.DEPENDENT

-

asterisk.iax.trunk.active_channels[{#OBJECTNAME}]
IAX trunk "{#OBJECTNAME}": StatusIAX trunk status. Here are the possible states that a device state may have: Unmonitored UNKNOWN UNREACHABLE OKDEPENDENT

-

asterisk.iax.trunk.status[{#OBJECTNAME}]

Trigger prototypes

NameDescriptionExpressionPriorityDependencies
IAX trunk "{#OBJECTNAME}": Number of the IAX trunk "{#OBJECTNAME}" active channels is too highThe 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

NameDescriptionTypeIntervalKey and additional info
PJSIP endpoints discovery

-

DEPENDENT0asterisk.pjsip_endpoints.discovery

Item prototypes

NameDescriptionTypeIntervalKey and additional info
PJSIP trunk "{#OBJECTNAME}": Active channelsThe total number of active PJSIP trunk channels.DEPENDENT

-

asterisk.pjsip.trunk.active_channels[{#OBJECTNAME}]
PJSIP trunk "{#OBJECTNAME}": Device statePJSIP trunk status. Here are the possible states that a device state may have: Unavailable Not in use In useDEPENDENT

-

asterisk.pjsip.trunk.devicestate[{#OBJECTNAME}]

Trigger prototypes

NameDescriptionExpressionPriorityDependencies
PJSIP trunk "{#OBJECTNAME}": Number of the PJSIP trunk "{#OBJECTNAME}" active channels is too highThe 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 UnavailableThe 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

NameDescriptionTypeIntervalKey and additional info
Queues discovery

-

DEPENDENT0asterisk.queues.discovery

Item prototypes

NameDescriptionTypeIntervalKey and additional info
"{#QUEUE}": AvailableThe number of available queue members.DEPENDENT

-

asterisk.queue.available[{#QUEUE}]
"{#QUEUE}": CallersThe number incoming calls in queue.DEPENDENT

-

asterisk.queue.callers[{#QUEUE}]
"{#QUEUE}": Logged inThe number of queue members.DEPENDENT

-

asterisk.queue.loggedin[{#QUEUE}]

Trigger prototypes

NameDescriptionExpressionPriorityDependencies
"{#QUEUE}": Number of callers in the queue "{#QUEUE}" is too highThere 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

NameDescriptionTypeIntervalKey and additional info
SIP peers discovery

-

DEPENDENT0asterisk.sip_peers.discovery

Item prototypes

NameDescriptionTypeIntervalKey and additional info
SIP trunk "{#OBJECTNAME}": Active channelsThe total number of active SIP trunk channels.DEPENDENT

-

asterisk.sip.trunk.active_channels[{#OBJECTNAME}]
SIP trunk "{#OBJECTNAME}": StatusSIP trunk status. Here are the possible states that a device state may have: Unmonitored UNKNOWN UNREACHABLE OKDEPENDENT

-

asterisk.sip.trunk.status[{#OBJECTNAME}]

Trigger prototypes

NameDescriptionExpressionPriorityDependencies
SIP trunk "{#OBJECTNAME}": Number of the SIP trunk "{#OBJECTNAME}" active channels is too highThe 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