Help build the future of open source observability software Open positions

Check out the open source projects we support Downloads

Grot cannot remember your choice unless you click the consent notice at the bottom.

How to observe your Asterisk instance with Grafana Cloud

How to observe your Asterisk instance with Grafana Cloud

May 4, 2022 4 min

Observability and monitoring is a fundamental part of the contact center environment. When there are thousands of live voice and other multi-channel interactions happening, it is crucial to keep a close eye on the system because any issue in service gives an instant blow to the customer experience.

Asterisk is a free and open source framework for building communications applications and is sponsored by Sangoma. It’s the most popular open source IP PBX software used for communications and contact center setups around the world.

Here, we’ll walk you through how to set up the Asterisk integration for Grafana Cloud and how it makes monitoring your metrics and logs in Asterisk as well as alerting so much easier.

How to configure Asterisk with Grafana Cloud

The Asterisk integration is based on the res_prometheus module. This embedded Prometheus exporter was added to Asterisk in v17. You can start monitoring your Asterisk deployment with Grafana Cloud by following these simple steps:

  1. A Grafana Cloud account is required to use the Asterisk integration. If you don’t have a Grafana Cloud account, you can sign up for a free account today.
  2. Enable the embedded Prometheus exporter in Asterisk. Refer to the Asterisk integration documentation.
  3. Install the Asterisk integration and configure the Grafana Agent to collect logs and metrics from Asterisk. Refer to how to install and manage integrations documentation and for advanced Grafana Agent configurations refer to Asterisk integration documentation.

Start monitoring your Asterisk instance

After the integration is installed, you will see two pre-built dashboards for Asterisk and a set of Asterisk-related alerts automatically installed into your Grafana Cloud account.

Asterisk overview dashboard

This dashboard gives a general overview of the Asterisk instance based on all the metrics exposed by the embedded Prometheus exporter in Asterisk.

Pre-configured overview dashboard for the Asterisk integration for Grafana Cloud
Pre-configured overview dashboard for the Asterisk integration for Grafana Cloud

The dashboard also contains further sections which include the following key metrics:

  • Channels information
  • Endpoints information
  • Bridges information
  • Asterisk system information

Asterisk logs dashboard

This dashboard provides metrics and details on Asterisk log files. Currently only the main Asterisk log file /var/log/asterisk/full is tracked in this dashboard.

Pre-configured dashboard for Asterisk logs in the Asterisk integration for Grafana Cloud
Pre-configured dashboard for Asterisk logs in the Asterisk integration for Grafana Cloud

Asterisk alerts

The integration also comes packaged with a number of handy alerts.

Alerts listed for the Asterisk integration for Grafana Cloud
Alerts listed for the Asterisk integration for Grafana Cloud
  • AsteriskRestarted

This alert monitors the asterisk_core_uptime_seconds metric and alerts if the system was restarted in the last 60 seconds. This can either be a planned restart or a restart due to some exception or failure.

  • AsteriskReloaded

This alert monitors the asterisk_core_last_reload_seconds metric and alerts if the system was reloaded in the last 60 seconds. This alert is important for system administrators to alert them of any configuration changes that are made live in the system.

  • AsteriskHighScrapeTime > 100ms (Can be set by user)

The Asterisk Prometheus exporter exposes a metric called asterisk_core_scrape_time_ms which is time in milliseconds taken to collect the Asterisk data by the exporter. A high scrape time can lead to a performance degradation of the system. This value should generally be very low, so if the scrape time goes above 100ms, this alert is fired.

  • AsteriskHighActiveCallsCount > 100 (Can be set by user)

The capacity of an Asterisk deployment will vary from environment to environment; however, this alert can be configured to flag an abnormally high active call count on the system.

Learn more about the Asterisk integration

The pre-configured dashboards and alerts can help you get your Asterisk monitoring up and running in an easy way, which is the goal of this Grafana Cloud integration. For more information, please refer to our Asterisk integration documentation.

Give our Asterisk integration a try, and let us know what you think! You can reach out to us in our Grafana Labs Community Slack in the #Integrations channel.

Grafana Cloud is the easiest way to get started with metrics, logs, traces, and dashboards. We have a generous forever-free tier and plans for every use case. Sign up for free now!