Tech

How to Connect Prometheus with Vodia PBX

Published on:

July 24, 2024

Integrating Prometheus with Vodia PBX enables effective monitoring of your phone system’s performance. Start by creating an API account on Vodia PBX to grant access to Prometheus, followed by the installation of Prometheus on DigitalOcean. Update the prometheus.yml file to include your PBX as a target by configuring the DNS, username, and password. Explore the Vodia API for available system stats, such as CPU usage and memory. Finally, create custom stat panels in Prometheus to visualize and track these key performance metrics in real time.

Prometheus is an open-source monitoring and alerting toolkit that is part of the Cloud Native Computing Foundation. By integrating it with Vodia PBX, you can effectively monitor and manage your phone system's performance. Here’s how to get started:

Step 1: Create an API Account on Vodia PBX

To allow Prometheus to access Vodia PBX data, you need to create an API account. Follow these steps:

  1. Log in to Vodia PBX as an Administrator:
    • Navigate to the system level where you can manage user accounts.
  2. Create a New User Account for API Access:
    • Go to the Administrator section.
    • Create a new account with the following details:
      • Account: Choose a user name.
      • API Access: Enable API access.
      • Type: Set the account type to Regular.
      • Password: Set a strong, secret password.
  3. Save the Configuration:
    • Save the user account configuration.
    • Keep the username and password handy, as you will need them for Prometheus to access Vodia PBX data.
API credentils

Installing Prometheus on Digital Ocean: https://marketplace.digitalocean.com/apps/prometheus

Once your server is set up, you can access the Prometheus user interface by going to http://your_server_ip:9090/

Setting up the .yml file

By default, Prometheus is set up to monitor itself and Node Exporter. To monitor more systems, you need to update the configuration file located at: /etc/prometheus/prometheus.yml

Download Prometheus.yml

3 things need to be changed in the Prometheus .yml file config file

  • targets: ['123.vodia.com'] Here is where you will set the target - in this case it will be your PBX DNS name
  • username: 'prometheus'
  • password: 'prometheus'

Note: Do not remove the ' ' and [ ] in the config file leave it as is and change the value

Once you have edited the config file, you can modify the prometheus.yml using nano or any edit you desire by copy-pasting the config or simply creating a new .yml file and renaming the old file.

Restart the service by sudo systemctl restart prometheus

How to use Vodia API

To learn more about Vodia API, please visit us here https://api.vodia.com/#f3d2b273-75f7-4876-be45-d34858664fed

Check the Prometheus and click on System Stats - this will show all of the available APIs for Prometheus, and you will see an Example Response. Click on "view more" and it should look like this:

I have bolded all of the stats you can use as an examples, there's no need to copy the whole thing

# pbxctrl 69.3.2.beta

# HELP system_cpu_srv_max Peak usage of the CPU
# TYPE system_cpu_srv_max gauge
system_cpu_srv_max 0 1719852690061

# HELP system_cpu_srv_avg Average Load
# TYPE system_cpu_srv_avg gauge
system_cpu_srv_avg 0 1719852690061

# HELP system_cpu_ctrl_max Peak usage of the CPU
# TYPE system_cpu_ctrl_max gauge
system_cpu_ctrl_max 25 1719852690061

# HELP system_cpu_ctrl_avg Peak usage of the CPU
# TYPE system_cpu_ctrl_avg gauge
system_cpu_ctrl_avg 2 1719852690061

# HELP system_memory_all Total
# TYPE system_memory_all gauge
system_memory_all 172928 1719852690061

Creating a stat panel on Prometheus

Click "add panel" and enter the Vodia API cmd - in this case system_cpu_srv_max, then press execute: you can create many panels to monitor the PBX.

stat
Api
w
api
tcp

Derniers articles

Voir tous

Connecting to OpenAI Realtime API

This document details the beta version of the Vodia PBX that connects to the OpenAI realtime API, enabling users to interact with a chatbot via telephone. The backend JavaScript code facilitates the connection, handling audio input and output, and the WebSocket connection to the OpenAI API. The setup requires a Vodia PBX version 69.5.3 or higher, an API key, and a license with an IVR node. The demo can be accessed by editing the ivrnode.js template and creating an IVR node in the tenant. The system supports various VoIP devices and offers good voice quality. Future improvements include voice activity detection and the ability to take actions based on OpenAI responses.

November 26, 2024

How Vodia Helps Hotels Not Disturb Their Guests

Vodia’s cloud PBX system enhances the Do-Not-Disturb (DND) function for hotels, allowing guests to manage their privacy through buttons in the room or on the phone. The system syncs with PMS for seamless functionality, enabling hotel operators to manually override DND when guests struggle to disable it. For critical situations, like room service follow-ups, the system allows specific extensions to bypass DND, ensuring guests are reachable when needed. VIP guest management features, guest-to-guest call restrictions and automatic resets upon checkout ensure privacy, security, and convenience, improving the guest experience while maintaining operational efficiency.

October 22, 2024

WLAN and VoIP: What You Need to Know

As businesses increasingly adopt Wireless Local Area Networks (WLAN), understanding its impact on Voice over IP (VoIP) is essential. While WLAN offers flexibility and mobility, it can lead to call quality issues due to packet loss and bursts during access point switching. To combat these challenges, organizations can utilize robust codecs like OPUS which are designed to handle packet loss effectively and employ Session Border Controllers (SBCs) to enhance jitter buffers. By incorporating these solutions, companies can ensure a more reliable VoIP experience that meets the demands of modern workplaces, allowing seamless communication without interruptions.

October 10, 2024