Home Directory Plugins Cloud Monitoring AzureStack Alerts

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com


Remember Me

Directory Tree

Monitoring AzureStack Alerts

0 votes
Current Version
Last Release Date
Compatible With
  • Nagios 3.x
  • Nagios 4.x
  • Nagios XI
azurestack-nagios-1.2.tar.gzAzureStack plugin archive
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
Third party plugin written in python used to monitor AzureStack alerts.
# Overview

Nagios is one of the most used open source monitoring tools. The current
package contains a plugin which can be used for monitoring and resolving
AzureStack alerts.

# Authentication

The plugin uses Azure AD SPNs, with either client secrets or client certificates.

To create a SPN with a secret using the az CLI:

az ad sp create-for-rbac --name Nagios-SPN --password

To create a SPN with a self signed client certificate using the az CLI:

az ad sp create-for-rbac --name Nagios-SPN --create-cert --years 5

To create a SPN with an existing client certificate using the az CLI:

az ad sp create-for-rbac --name Nagios-SPN --cert @{}

Take note of the appId (client_id).

In order to allow access to the Azure Stack alerts, grant a role (e.g. Reader)
to the SPN in the Azure Stack's subscription IAM settings.

In case of client certificate authentication, both certificate and private key
need to be contained in the same file (see the self signed certificate creation
above for reference).
To retrieve the certificate's thumbprint:

openssl x509 -in -fingerprint -noout | sed s/://g

# Installation and Configuration

The plugin can be used with either the Nagios enterprise edition or the free
edition. Below are the steps to install and configure it:

- Copy the plugin file to the plugins directory and make sure you set it as

sudo cp azurestack_plugin.py
sudo chmod +x /azurestack_plugin.py

NOTE: For Nagios Core 4 and Nagios enterprise the location
is /usr/local/nagios/libexec while for Nagios Core 3 the location is /usr/lib/nagios/plugins.

Install the required python dependencies:

sudo pip install adal pyyaml six

Copy the configuration files samples from the samples/etc directory to the
Nagios configuration directory. For Nagios Core 4 and Nagios enterprise, the
configuration directory location is /usr/local/nagios/etc/objects, while for
Nagios Core 3 is /etc/nagios3/conf.d.

In case the config files are not loaded automatically from the conf.d folder,
include them manually in nagios.cfg (on Nagios 4 and Nagios
enterprise located in /usr/local/nagios/etc), e.g.:


NOTE: Make sure you edit the azurestack.cfg file and set the parameters
specific to your AzureStack environment. Update also the location of the
configuration file path in azurestack_services.cfg and azurestack_contacts.cfg
based on your environment.

- Reload the Nagios service:

sudo service nagios reload

# Manually close an active AzureStack alert

Active AzureStack alerts can be manually closed using Nagios custom
notification functionality. The `azurestack_handler.sh` (configured in the
sample configuration files) processes all the custom notifications. If the
notification comment has the form `/close-alert `, the handler will
close an AzureStack alert with the uuid ``, otherwise it falls back
to the normal behavior and it sends an e-mail notification.

# Troubleshooting

Here's an easy way to validate the plugin's Azure Stack configuration on
the command line (replace the paths according to your environment):

--config-file /usr/local/nagios/etc/objects/azurestack.cfg
--action Monitor