| 1 | # Asterisk collector |
| 2 | |
| 3 | Monitors [Asterisk](https://www.asterisk.org/) dialplan application's statistics. |
| 4 | |
| 5 | ## Requirements |
| 6 | |
| 7 | - Asterisk [integrated with StatsD](https://www.asterisk.org/integrating-asterisk-with-statsd/). |
| 8 | |
| 9 | ## Configuration |
| 10 | |
| 11 | Netdata ships |
| 12 | with [asterisk.conf](https://github.com/netdata/netdata/blob/master/src/collectors/statsd.plugin/asterisk.conf) with |
| 13 | preconfigured charts. |
| 14 | |
| 15 | To receive Asterisk metrics in Netdata, uncomment the following lines in the `/etc/asterisk/statsd.conf` file: |
| 16 | |
| 17 | ```ini |
| 18 | [general] |
| 19 | enabled = yes ; When set to yes, statsd support is enabled |
| 20 | server = 127.0.0.1 ; server[:port] of statsd server to use. |
| 21 | ; If not specified, the port is 8125 |
| 22 | prefix = asterisk ; Prefix to prepend to all metrics |
| 23 | ``` |
| 24 | |
| 25 | > See [statsd.conf.sample](https://github.com/asterisk/asterisk/blob/master/configs/samples/statsd.conf.sample) for all available options. |
| 26 | |
| 27 | ## Charts and metrics |
| 28 | |
| 29 | <details><summary>Click to see screenshots of the charts.</summary> |
| 30 | |
| 31 |  |
| 32 |  |
| 33 | |
| 34 | </details> |
| 35 | |
| 36 | Mapping Asterisk StatsD metrics and Netdata charts. |
| 37 | |
| 38 | | Chart | Metrics | |
| 39 | |------------------------------------------------------|--------------------------------------------| |
| 40 | | Active Channels | asterisk.channels.count | |
| 41 | | Active Endpoints | asterisk.endpoints.count | |
| 42 | | Active Endpoints by Status | asterisk.endpoints.state.* | |
| 43 | | Active SIP channels by endpoint | asterisk.endpoints.SIP.*.channels | |
| 44 | | Active PJSIP channels by endpoint | asterisk.endpoints.PJSIP.*.channels | |
| 45 | | Distribution of Dial Statuses | asterisk.dialstatus.* | |
| 46 | | Asterisk Channels Call Duration | asterisk.channels.calltime | |
| 47 | | Distribution of Hangup Causes | asterisk.hangupcause.* | |
| 48 | | Distribution of Hangup Causes for ANSWERed calls | asterisk.dialhangupcause.ANSWER.* | |
| 49 | | Distribution of Hangup Causes for BUSY calls | asterisk.dialhangupcause.BUSY.* | |
| 50 | | Distribution of Hangup Causes for CANCELled calls | asterisk.dialhangupcause.CANCEL.* | |
| 51 | | Distribution of Hangup Causes for CHANUNVAILed calls | asterisk.dialhangupcause.CHANUNAVAIL.* | |
| 52 | | Distribution of Hangup Causes for CONGESTIONed calls | asterisk.dialhangupcause.CONGESTION.* | |
| 53 | | Asterisk Dialplan Events | asterisk.stasis.message.ast_channel_*_type | |
| 54 | | Asterisk PJSIP Peers Qualify | asterisk.PJSIP.contacts.*.rtt | |