You are here

Azure PostgreSQL Monitoring

Requires Opsview Cloud or Opsview Monitor 6
check_circle
Opsview Supported

Azure - PostgreSQL Server Opspack

Azure Database for PostgreSQL provides a managed database service for app development and deployment, allowing you to create a PostgreSQL database in minutes and scale right away. Designed for app developers, Azure PostgreSQL Server allows users to focus on application management and have assurance in its high availability and trustworthy cloud platform.

What You Can Monitor

Opsview Monitor's Azure PostgreSQL Opspack provides all the latest metrics to visualize and track by providing useful dashboards, reports and notifications. Common PostgreSQL issues such as I/O issues and connections are easy to identify with granular customizable thresholds.

Service Checks

Service Check Name Description Default Thresholds (Warning, Critical) UOM
Azure - PostgreSQL - Active Connections The number of active connections currently connected to the database [Default Timespan = 5mins, Granularity = 5mins] N/A N/A
Azure - PostgreSQL - CPU Percent The CPU usage of the database server [Default Timespan = 5mins, Granularity = 5mins] cpu_percent=70,90 %
Azure - PostgreSQL - IO Consumption Percent The amount of I/O resources being consumed [Default Timespan = 5mins, Granularity = 5mins] io_consumption_percent=70,90 %
Azure - PostgreSQL - Memory Percent The current memory usage of the database [Default Timespan = 5mins, Granularity = 5mins] memory_percent=70,90 %
Azure - PostgreSQL - Storage Limit The limit of hard disk space the database has been allocated [Default Timespan = 5mins, Granularity = 5mins] N/A B
Azure - PostgreSQL - Storage Percent The hard disk usage of the database [Default Timespan = 5mins, Granularity = 5mins] storage_percent=70,90 %
Azure - PostgreSQL - Storage Used The hard disk storage currently used [Default Timespan = 5mins, Granularity = 5mins] N/A B
Azure - PostgreSQL - Server Log Storage Percent The average server log storage usage percentage [Default Timespan = 5mins, Granularity = 5mins] serverlog_storage_percent=70,90 %
Azure - PostgreSQL - Server Log Storage Used The average server log storage used [Default Timespan = 5mins, Granularity = 5mins] N/A B
Azure - PostgreSQL - Server Log Storage Limit The average server log storage limit [Default Timespan = 5mins, Granularity = 5mins] N/A B
Azure - PostgreSQL - Network In The number of bytes received across active connections [Default Timespan = 5mins, Granularity = 5mins] N/A B
Azure - PostgreSQL - Network Out The number of bytes sent across active connections [Default Timespan = 5mins, Granularity = 5mins] N/A B
Azure - PostgreSQL - Backup Storage Used The average backup storage used [Default Timespan = 30mins, Granularity = 30mins] N/A B
Azure - PostgreSQL - Replica Lag Delay in Seconds The maximum replica lag in seconds [Default Timespan = 5mins, Granularity = 5mins] N/A s
Azure - PostgreSQL - Replica Lag Delay in Bytes The maximum replica lag in bytes [Default Timespan = 5mins, Granularity = 5mins] N/A B
Azure - PostgreSQL - Connections Failed The number of failed connection attempts to the database [Default Timespan = 5mins, Granularity = 5mins] N/A N/A

Prerequisites

The monitoring plugin for this Opspack has been tested with Python 2.7. In order for the Opspack to run, you will need to have some Python packages installed by running the pip python package tool.

If a cryptography error occurs when trying to install the Azure packages, you can run the commands which should fix the problem.

Debian and Ubuntu

sudo apt-get install build-essential libssl-dev libffi-dev python-dev python-pip

CentOS and RHEL

sudo yum install gcc libffi-devel python-devel openssl-devel python-pip

Common

When python-pip is installed, you can then run:

sudo pip install --upgrade pip==9.0.2
sudo pip install --upgrade setuptools
sudo pip install --upgrade requests
sudo pip install nagiosplugin
sudo pip install azure
sudo pip install azure-monitor

Setup Azure for Monitoring

To monitor you Azure environment, you need to configure it for monitoring.

This requires Administrator access on Azure. You need to retrieve the following credentials:

  • Subscription ID
  • Tenant/Directory ID
  • Client/Application ID
  • Secret Key

Step 1: Find Subscription ID

The Subscription ID can be found in the Subscriptions section under the All services section from the Azure dashboard.

Azure Find Subscription Step 1

Azure Find Subscription Step 2

Step 2 : Find the Tenant/Directory ID

The Tenant/Directory ID can be found in the Azure Active Directory under the Properties section from the Azure dashboard.

Azure Find Directory ID

Step 3: Find the Client/Application ID for your application

You need to create and register your application if you haven't already. Use the following documentation from Microsoft: Create an Azure Active Directory application

The Client/Application ID can be found in Azure Active Directory under the App registrations section from the Azure dashboard.

Azure Find Application ID

Step 4: Generate the Secret Key for your application

You will need to create a Secret Key for your application, once this has been created its value will be hidden so save the value during creation.

To create the Secret Key, select your application from the list, select the Settings within your application and then select the Keys option.

There you can create a new key by adding the description and expiration period and the value will be generated.

Azure Create Secret Key

Step 5: Provide access to the subscription you wish to monitor

Navigate to the Subscriptions section and select the Subscription you selected before:

In the Subscription to be monitored, click Access Control (IAM).

Then click the Add button, select Monitoring Contributor and select the application.

Azure Add Subscription

Azure Add Role

If you are running more than one subscription these steps will need to be done for each one you wish to monitor.

Setup and Configuration

To configure and utilize this Opspack, you simply need to add the 'Cloud - Azure - Virtual Machines' Opspack to your Opsview Monitor system.

Step 1: Add the Host Template

Azure Add Host Template

Step 2: Add and configure variables required for this host

Add 'AZURE_CREDENTIALS' to the host and set the Resource Group as its variable value, then override the Subscription ID, Client ID, Secret Key and Tenant ID to match the values retrieved earlier.

Azure Add Variables

For more information, refer to Opsview Knowledge Center - Adding Variables to Hosts.

Step 3: Apply changes and the system will now be monitored

Azure PostgreSQL Service Checks