ZenPacks

Azure ZenPack

Monitoring for Microsoft Azure Services.

Background

This ZenPack provides support for monitoring Microsoft Azure Services. Monitoring for the following Azure Subscription entities is provided using Windows Azure SDK for Python.

This ZenPack is included with commercial versions of Zenoss and enterprise support for this ZenPack is provided to Zenoss customers with an active subscription.

Releases

Version 1.3.0- Download
Released on 2017/03/02
Requires PythonCollector ZenPack
Compatible with Zenoss Resource Manager 4.2.x, Zenoss Resource Manager 5.0.x, Zenoss Resource Manager 5.1.x, Zenoss Resource Manager 5.2.x
Version 1.2.0- Download
Released on 2016/11/04
Requires PythonCollector ZenPack
Compatible with Zenoss Resource Manager 4.2.x, Zenoss Resource Manager 5.0.x, Zenoss Resource Manager 5.1.x
Version 1.1.1- Download
Released on 2016/06/13
Requires PythonCollector ZenPack
Compatible with Zenoss Resource Manager 4.2.x, Zenoss Resource Manager 5.0.x, Zenoss Resource Manager 5.1.x
Version 1.0.3- Download
Released on 2015/10/22
Requires PythonCollector ZenPack
Compatible with Zenoss Resource Manager 4.2.x, Zenoss Resource Manager 5.0.x, Zenoss Resource Manager 5.1.x
Version 1.0.2- Download
Released on 2014/02/04
Requires PythonCollector ZenPack
Compatible with Zenoss Resource Manager 4.1.x, Zenoss Resource Manager 4.2.x


Azure Add Azure Subscription Menu Item.png Azure Add Azure Subscription Dialog.png Azure Subscription Overview Page.png Azure Storage Service Tables.png Azure Container Blobs.png Azure Subscription Graphs.png Azure Site Graphs.png Azure Impact.png Certificate File on Azure Management Page.PNG Monitoring Configuration on Azure Management Page.PNG

Features

The features added by this ZenPack can be summarized as follows. They are each detailed further below.

  • Discovery of Azure Subscription entities.
  • Monitoring of Storage Service and Site components.
  • Event management and monitoring for certain Azure states.
  • Optional service impact with an addition of Zenoss Service Dynamics product.

Discovery

The following entities will be automatically discovered through an account name, subscription ID and certificate file path you provide. The attributes, tags, and collections will be updated on Zenoss' regular remodeling interval which defaults to every 12 hours.

Resource Groups

Attributes: ID, URL, Location

Collections: Storage Services, Virtual Network Site, Instances, Blobs, Containers, Disks, Queues, Sites, Subnets, Tables
Hosted Services (Cloud Services in Azure Management Portal)

Attributes: ID, URL, Service status, Affinity group, Location, Creation date, Modification date

Collections: Classic Instances, Classic Disks
Classic Instances (Classic Virtual Machines in Azure Management Portal)

Attributes: ID, Hosted service, Instance status, IP address, Power state, Error code

Tags: Name
Collections: Classic Disks
Instances (Virtual Machines in Azure Management Portal)

Attributes: ID, Instance Size, IP Address, FQDN, Power state, Provisioning State, OS

Tags: Name
Collections: Disks
Classic Disks
Attributes: ID, Hosted service, Instance, Location, Link, Size
Tags: Name
Disks
Attributes: ID, Instance, Caching, Link, Size, Source Image
Tags: Name
Classic Storage Services (Storage accounts (classic) in Azure Management Portal)

Attributes: ID, URL, Service status, Affinity group, Location

Collections: Classic Containers, Classic Blobs, Classic Tables, Classic Queues
Storage Services (Storage accounts in Azure Management Portal)

Attributes: ID, URL, Service status, Location, URL

Collections: Containers, Blobs, Tables, Queues
Classic Containers
Attributes: ID, Classic Storage service, URL, Modification date
Tags: Name
Collections: Classic Blobs
Containers
Attributes: ID, Storage service, Modification date
Tags: Name
Collections: Blobs
Classic Blobs
Attributes: ID, Classic Storage service, Classic Container, URL, Modification date, Content length, Content type, Blob type, Lease status
Tags: Name
Blobs
Attributes: ID, Storage service, Container, URL, Modification date, Content length, Content type, Blob type, Lease status
Tags: Name
Classic Tables
Attributes: ID, Storage service
Tags: Name
Tables
Attributes: ID, Storage service
Tags: Name
Queues
Attributes: ID, Storage service, URL
Tags: Name
Classic Virtual Network Sites (Virtual Networks (classic) in Azure Management Portal)

Attributes: ID, Affinity group, State

Collections: Subnets
Virtual Network Sites (Virtual Networks in Azure Management Portal)

Attributes: ID, Location, Provisioning State

Collections: Subnets
Subnets
Attributes: ID, Virtual Network, Address prefix
Tags: Name
Web Spaces
Attributes: ID, Service Status, Plan, Geolocation, Workers, Availability state, Compute mode
Collections: Sites
Classic Sites (Web Sites in Azure Management Portal)

Attributes: ID, Web space, State, Availability state, Runtime availability state, Admin enabled, Compute mode, Hostnames, Enabled host names, Link, Usage state

Tags: Name
Sites (Web Sites in Azure Management Portal)

Attributes: ID, State, Availability state, Server Farm, Hostnames, Enabled host names,

Tags: Name
Locations
Attributes: ID
Affinity Groups
Attributes: ID, Description, Location, Capabilities

Monitoring

The following metrics will be collected every 5 minutes by default. The Average statistic is collected, and the graphed value is per second for anything that resembles a rate.

Classic Storage Services
Metrics: Blobs container count, Blobs object count, Blobs capacity
Storage Services
Metrics: Blobs container count, Blobs object count, Blobs capacity
Sites
Metrics: CPU time, Filesystem storage, Memory usage, Bytes received, Bytes sent, Local bytes read, Local bytes written
Subscription
Metrics: Max core count, Max storage accounts, Max hosted services, Current core count, Current hosted services, Current storage accounts
Locations
Metrics: Total Regional Cores, Virtual Machines, Virtual Networks, Public IP Addresses

Selective monitoring

If property zAzureMonitoringIgnore filled with proper Python expression that returns a boolean value, then this expression will be evaluated against each device component. And if a result of that expression is True then the component will not be monitored. Following variables are defined for each component and can be used inside user-defined expressions:

  • cls - component's class name
  • cmp - component object

Do not monitor all Azure blobs:

  cls == 'AzureBlob'

Do not monitor blob if its name starts with 'qa-' prefix:

  cls == 'AzureBlob' and cmp.name().startswith('qa-')

Event monitoring

According to the following Azure states, this ZenPack will trigger info or error events with an appropriate summary message. Note that events will not be generated for Table and Queue Components as they are application level objects and could cause performance issues.

Subscription

Info event: :* Current core count is equal to Max core count,

:* Current storage accounts number is equal to Max storage accounts number,

:* Current hosted services number is equal to Max hosted services number.

Warning event: :* One or more Virtual Hard Drive is not attached to instance

Hosted Service (Cloud Service)

Warning event: Hosted service is Stopped or Unavailable

Info event: service status is one of the following: Deleting, Deleted, Changing, ResolvingDns
Classic Instance (Virtual Machine)

Warning event: Instance is Stopped or Unavailable

Info event: instance status is DeletingVM

Error event: :* instance status is one of the following: RoleStateUnknown, FailedStartingRole, FailedStartingVM, UnresponsiveRole,

:* instance error code is one of the following: WaitTimeout, VhdTooLarge, AzureInternalError,

:* instance status is Unknown.

Instance (Virtual Machine)

Warning event: Instance is Stopped or Unavailable

Info event: instance status is DeletingVM

Error event: :* instance status is one of the following: RoleStateUnknown, FailedStartingRole, FailedStartingVM, UnresponsiveRole,

:* instance error code is one of the following: WaitTimeout, VhdTooLarge, AzureInternalError,

:* instance status is Unknown.

Classic Disk
Warning event: Disk is Deleted or Unavailable
Error event: is_corrupted property is True
Disk
Warning event: Disk is Deleted or Unavailable
Classic Storage Service
Warning event: Storage Service is Deleted or Unavailable
Info event: service status is one of the following: Deleting, Deleted, Changing, ResolvingDns
Storage Service
Warning event: Storage Service is Deleted or Unavailable
Info event: service status is one of the following: Deleting, Deleted, Changing, ResolvingDns
Virtual Network Site (Network)

Warning event: Virtual Network is Deleted or Unavailable

Info event: state is Deleting
Web Space
Error event: availability or service status is Limited
Classic Site
Warning event: Site is Stopped, Deleted or Unavailable

Error event: :* usage state is Exceeded,

:* availability state is Limited

Site
Warning event: Site is Stopped, Deleted or Unavailable
Error event: :* usage state is Exceeded

Service Impact

When combined with the Zenoss Service Dynamics product, this ZenPack adds built-in service impact capability for services running on Microsoft Azure Service. The following service impact relationships are automatically added. These will be included in any services that contain one or more of the explicitly mentioned entities.

Service Impact Relationships

  • Subscription failure affects resource group, hosted service, classic storage service, classic virtual network, web space, affinity group or location.
  • Resource Group failure affects storage service, virtual network, site, instance.
  • Hosted service and disk failure affects related instance.
  • Classic Storage service failure affects related classic container, classic table or classic queue.
  • Storage service failure affects related container, table or queue.
  • Container failure affects associated blob.
  • Classic Container failure affects associated classic blob.
  • Web space failure affects related site.
  • Classic Virtual network failure affects associated classic subnet.
  • Virtual network failure affects associated subnet.
  • Disk failure affects associated Instance.
  • Azure Instance (Classic Instance) failure affects associated guest device in Zenoss.

Billing Charts

If zProperties zAzureEAAccessKey and zAzureEAEnrollmentNumber are filled with correct values and AzureEABillingDataSourcePlugin data source plugin is attached to device, then billing charts will be available at:

Device Overview Page

Five charts on the device overview page:

  • Total cost bullet chart. It shows total money spend in current month, and also minimum, maximum and average for all previous months
  • Pie chart 'Costs by Service'. Shows distribution of money spends in current month by services.
  • Pie chart 'Costs by Region'. Shows distribution of money spends in current month by regions.
  • 'Services by top Regions'. Shows top 10 most expensive services in current month by regions.
  • 'Regions by top Services'. Shows top 10 most expensive regions in current month by services.

Billing Charts Page

Two charts on the Billing Charts page

  • Services usage trends.
  • Regions usage trends

By default values displayed on a daily basis for each Region and Service for the last 30 days. Following options can be changed by controls on the top of the page:

  • Start date - the date from data is displayed
  • End date - the date till data on graphs are displayed
  • Department - the department for which data are displayed
  • View - on which basis (daily/monthly) data are displayed.

Billing Charts for Components

For components 'Classic Storage Services', 'Storage Services' and 'Hosted Services' choosing display option 'Billing Information' displays usage graph for particular selected component.

Usage

Adding Azure Subscriptions

Use the following steps to start monitoring Azure Subscription using the Zenoss web interface.

  1. Navigate to the Infrastructure page.
  2. Choose Add Azure Subscription from the add device button.
  3. Enter your Azure account name, Subscription ID and optionally choose a collector other than the default localhost
  4. Enter certificate file name along with absolute path (e.g. /home/zenoss/Downloads/MSAzure.pem) to collect ASM deployed resources.
  5. Enter Client ID, Secret Key and Tenant ID to collect ARM/CSP deployed resources.
  6. Click Add.

Collecting Resources Created in Azure Resource Manager Deployment Model (ARM) or Azure Cloud Solution Provider (CSP)

Modeling and monitoring of resources created in ARM deployment model require account to be available to authenticate requests using Azure service principal, see (Use portal to create Active Directory application and service principal that can access resources) for details.

Following zProperties should be filled in with appropriate values:

  • zAzureClientID
  • zAzureSecretKey
  • zAzureTenantID

Collecting Resources Created in Azure Service Management (Azure Classic) Deployment Model (ASM)

To collect Azure Classic deployments you will need a certificate file used in Management Certificates on Azure Management Page (see 1), which can be stored anywhere on the disk with read permissions enabled. If you do not have a certificate, please see Windows Azure Documentation page.

Enabling billing data collection for Enterprise Accounts

This requires an Access Key and Enrollment Number that can be obtained at Azure Enterprise Portal (http://ea.azure.com/)

  • Fill in zProperties zAzureEAAccessKey and zAzureEAEnrollmentNumber with values from Azure Enterprise Portal
  • Add AzureEABillingDataSourcePlugin data source plugin to monitoring template /Azure/AzureSubscription.

Prerequisites

Monitoring configuration
Data monitoring and events triggering will only work if monitoring configuration on Azure Management Page (see 2) is enabled with at least 1-2 days retention.
Network access to Azure endpoints
Your Zenoss collector should be able to establish HTTP and HTTPS (ports 80 and 443) connections to following addresses:
    • .blob.core.windows.net
    • .queue.core.windows.net
    • .table.core.windows.net
    • .servicebus.windows.net
  • management.core.windows.net
  • management.azure.com

Zenoss 5.x

On Zenoss 5.x certificate file should be available inside a container. Good option is to store PEM file in DFS storage directory on 5.X:

  /opt/serviced/var/volumes/$SERVICE_ID/var-zenpacks

So inside the container, the pem file can be found here:

  /var/zenoss

Example:

1. In 5.X master host, place the Azure certificate pem file in the following directory and give the pem file read permission:

  SERVICE_ID=$(serviced service list | awk '/Zenoss./{print $2}')
  cd /opt/serviced/var/volumes/$SERVICE_ID/var-zenpacks
  chmod +r azure.pem

2. On the Azure device, for “Certificate file name” provide the path to the pem file.

  /var/zenoss/azure.pem

Troubleshooting

If you encounter any issues with Zenpack installation, please make sure that you have restarted zenoss after installation and your target disk has enough free memory and read permissions enabled. If device adding failed, try to restart your browser and make sure that you have specified a correct id and path to the certificate file (e.g. /home/zenoss/Downloads/MSAzure.pem). In the case of any issues when uninstalling this Zenpack, please remove all devices first.

Note that device monitoring requires zenpython daemon to be constantly running. If you have just enabled monitoring, try pressing Zoom in to see the graphs. In a case of any issues you can run zenpython daemon in the foreground with zenpython run -v10 -c command and check if there are no exceptions. If zenpython runs without errors and prints monitoring data to stdout, then you should check if monitoring templates are bound to subscription, and it's components.

If the device can not be modeled or monitored with reason 'Server failed to authenticate the request' it may be caused by wrong system time.

Billing Charts

Billing data may have up to a five day lag due to Azure data processing delays. So if there are no any billable resources in Azure older than five days, then billing charts might be empty.

Limitations

Due to limitations of REST API this ZenPack does not monitor some of Azure services:

  • Mobile services
  • SQL Databases
  • SQL Reporting
  • Media services
  • Active Directory

For Virtual Machines there is no performance information available via REST API, so this ZenPack does not provide such information. However, this information can be retrieved by adding Azure VM as Linux/Windows server device in Zenoss.

For Storage Services, the graphs are updated on a daily basis. The entities are stored in $MetricsCapacityBlob each day. (MSDN)

For Sites, the graphs are updated with some delay. (MSDN)

Known bugs:

Installed Items

Installing this ZenPack will add the following items to your Zenoss system.

Device Classes

  • /Azure

Modeler Plugins

  • AzureCollector
  • AzureBlobs

Datasource Types

  • AzureDataSource
  • AzureEABillingDataSourcePlugin

Monitoring Templates

  • AzureSite (in /Azure)
  • AzureStorageService (in /Azure)
  • AzureSubscription (in /Azure)

Device Types

  • AzureSubscription (in /Azure)

Component Types

  • AzureHostedService (on AzureSubscription)
  • AzureInstance (on AzureHostedService)
  • AzureDisk (on AzureInstance)
  • AzureStorageService (on AzureSubscription)
  • AzureContainer (on AzureStorageService)
  • AzureQueue (on AzureStorageService)
  • AzureTable (on AzureStorageService)
  • AzureBlob (on AzureContainer)
  • AzureVirtualNetworkSite (on AzureSubscription)
  • AzureSubnet (on AzureVirtualNetworkSite)
  • AzureWebSpace (on AzureSubscription)
  • AzureSite (on AzureWebSpace)
  • AzureLocation (on AzureSubscription)
  • AzureAffinityGroup (on AzureSubscription)
  • AzureResourceGroup (on AzureSubscription)
  • ARMStorageAccount (on AzureResourceGroup)
  • ARMVirtualNetworkSite (on AzureResourceGroup)
  • ARMVirtualMachine (on AzureResourceGroup)
  • ARMDisk (on ARMVirtualMachine)
  • ARMSite (on AzureResourceGroup)
  • ARMTable (on ARMStorageAccount)
  • ARMQueue (on ARMStorageAccount)
  • ARMSubnet (on ARMVirtualNetworkSite)
  • ARMContainer (on ARMStorageAccount)
  • ARMBlob (on ARMContainer)

Changes

1.3.0

  • Strict rules for device ID
  • Support of Blob Storage Account
  • Fix modeling of stopped instance
  • Support of Azure Cloud Solution Provider (ASM) subscription
  • Separate AzureBlobs modeler plugin to control whether model blobs or not

1.2.0

  • Add support for resources deployed in Azure Resource Manager deployment model
  • Add bidirectional associating of Azure Instances (Classic Instances) with guest operation systems

1.1.1

  • Fix ID processing for Resource Manager deployment model

1.1.0

  • Add billing data collection and charting for Azure Enterprise accounts

1.0.4

  • Add possibility to skip monitoring of particular components

1.0.3

  • 5.x support.
  • Monitoring performance improved.
  • Various bug fixes.
Commercial

This ZenPack is developed and supported by Zenoss Inc. Commercial ZenPacks are available to Zenoss commercial customers only. Contact Zenoss to request more information regarding this or any other ZenPacks. Click here to view all available Zenoss Commercial ZenPacks.