AppDynamics Monitoring Extension for use with Microsoft Azure ServiceBus

This extension works only with the standalone machine agent.

 

Use Case

Microsoft Azure is an Internet-scale computing and services platform hosted in Microsoft data centers. It includes a number of features with corresponding developer services which can be used individually or together.

 

Installation

  1. Download and unzip the file 'AzureServiceBusMonitor.zip' to {machineagent install dir}/monitors
  2. Open monitor.xml and configure the Azure arguments
<argument name="config-file" is-required="true" default-value="monitors/AzureServiceBusMonitor/config.yml" />

config-file : yml file where we define the Azure Service Bus configurations

example yml configuration

   
# Azure Service Bus particulars

#This will create this metric in all the tiers, under this path
#metricPrefix: Custom Metrics|Azure Service Bus|

#This will create it in specific Tier/Component. Make sure to replace  with the appropriate one from your environment.
#To find the  in your environment, please follow the screenshot https://docs.appdynamics.com/display/PRO42/Build+a+Monitoring+Extension+Using+Java
metricPrefix: Server|Component:|Custom Metrics|Azure Service Bus|

numberOfThreads: 2

azure:
  - namespace: "appdx-dev"
    # Provide sasKeyName,sasKey or encryptedSasKeyName,encryptedSasKey
    sasKeyName:
    sasKey:
    encryptedSasKeyName:
    encryptedSasKey:
    serviceBusRootUri: ".servicebus.windows.net"
    # Provide either include or exclude configuration.
    # If include and exclude are provided, will consider only include.
    # If include and exclude are not provided, will fetch everything.
    # Define queues to include. supports regex
    includeQueues: ["test.*"]
    # Define queues to exclude. supports regex
    excludeQueues: []
    # Define topics to include. supports regex
    includeTopics: []
    # Define topics to exclude. supports regex
    excludeTopics: []
  - namespace: "appdx-dev1"
    # Provide sasKeyName,sasKey or encryptedSasKeyName,encryptedSasKey
    sasKeyName:
    sasKey:
    encryptedSasKeyName:
    encryptedSasKey:
    serviceBusRootUri: ".servicebus.windows.net"
    # Provide either include or exclude configuration.
    # If include and exclude are provided, will consider only include.
    # If include and exclude are not provided, will fetch everything.
    # Define queues to include. supports regex
    includeQueues: []
    # Define queues to exclude. supports regex
    excludeQueues: []
    # Define topics to include. supports regex
    includeTopics: []
    # Define topics to exclude. supports regex
    excludeTopics: []

encryptionKey: "hello"

#Proxy server URI
proxyUri:
#Proxy server user name
proxyUser:
#Proxy server password
proxyPassword:

# type once defined can not be changed later.
# type consists is made of: aggregationType.timeRollup.clusterRollup
queueMetrics:
  - name: "ActiveMessageCount"
    type: "OBS.CUR.COL"
  - name: "DeadLetterMessageCount"
    type: "OBS.CUR.COL"
  - name: "ScheduledMessageCount"
    type: "OBS.CUR.COL"
  - name: "TransferMessageCount"
    type: "OBS.CUR.COL"
  - name: "TransferDeadLetterMessageCount"
    type: "OBS.CUR.COL"
  - name: "MaxDeliveryCount"
    type: "OBS.CUR.COL"
  - name: "MaxSizeInMegabytes"
    type: "OBS.CUR.COL"
  - name: "MessageCount"
    type: "OBS.CUR.COL"
  - name: "SizeInBytes"
    type: "OBS.CUR.COL"
  - name: "Status"
    type: "OBS.CUR.COL"
    converter:
       Active: "1"
       Disabled: "2"
       Restoring: "3"
       SendDisabled: "4"
       ReceiveDisabled: "5"
  - name: "AvailabilityStatus"
    type: "OBS.CUR.COL"
    converter:
       Unknown: "1"
       Available: "2"
       Limited: "3"
       Restoring: "4"
topicMetrics:
  - name: "ActiveMessageCount"
    type: "OBS.CUR.COL"
  - name: "DeadLetterMessageCount"
    type: "OBS.CUR.COL"
  - name: "ScheduledMessageCount"
    type: "OBS.CUR.COL"
  - name: "TransferMessageCount"
    type: "OBS.CUR.COL"
  - name: "TransferDeadLetterMessageCount"
    type: "OBS.CUR.COL"
  - name: "MaxSizeInMegabytes"
    type: "OBS.CUR.COL"
  - name: "SizeInBytes"
    type: "OBS.CUR.COL"
  - name: "Status"
    type: "OBS.CUR.COL"
    converter:
       Active: "1"
       Disabled: "2"
       Restoring: "3"
       SendDisabled: "4"
       ReceiveDisabled: "5"
  - name: "AvailabilityStatus"
    type: "OBS.CUR.COL"
    converter:
       Unknown: "1"
       Available: "2"
       Limited: "3"
       Restoring: "4"

 

Password encryption

To avoid setting the clear text password in the config.yml, please follow the steps below to encrypt the sasKeyName,sasKey and set the encryptedSasKeyName,encryptedSasKey and the encryptionKey in the config.yml:

  1. Download the util jar to encrypt the password from here.
  2. Encrypt password from the command line using the following command :
    java -cp "appd-exts-commons-2.0.0.jar" com.appdynamics.extensions.crypto.Encryptor myKey myPassword
    
    where "myKey" is any random key, "myPassword" is the actual sasKeyName and sasKey that needs to be encrypted
  3. Add the values for "encryptedSasKeyName", "encryptedSasKey" and "encryptionKey" in the config.yml. The value for "encryptionKey" is the value substituted for "myKey" in the above command. The value for "encryptedSasKeyName" and "encryptedSasKey" are the result of the above command.

 

Metrics

The following metrics are reported.

Queues

Metrics
Azure Service Bus/{NameSpace}/Queues/{QueueName}/ActiveMessageCount
Azure Service Bus/{NameSpace}/Queues/{QueueName}/DeadLetterMessageCount
Azure Service Bus/{NameSpace}/Queues/{QueueName}/ScheduledMessageCount
Azure Service Bus/{NameSpace}/Queues/{QueueName}/TransferMessageCount
Azure Service Bus/{NameSpace}/Queues/{QueueName}/TransferDeadLetterMessageCount
Azure Service Bus/{NameSpace}/Queues/{QueueName}/MaxDeliveryCount
Azure Service Bus/{NameSpace}/Queues/{QueueName}/MaxSizeInMegabytes
Azure Service Bus/{NameSpace}/Queues/{QueueName}/MessageCount
Azure Service Bus/{NameSpace}/Queues/{QueueName}/SizeInBytes
Azure Service Bus/{NameSpace}/Queues/{QueueName}/Status
Azure Service Bus/{NameSpace}/Queues/{QueueName}/AvailabilityStatus

 

Topics

Metric Path
Azure Service Bus/{NameSpace}/Topics/{TopicName}/ActiveMessageCount
Azure Service Bus/{NameSpace}/Topics/{TopicName}/DeadLetterMessageCount
Azure Service Bus/{NameSpace}/Topics/{TopicName}/ScheduledMessageCount
Azure Service Bus/{NameSpace}/Topics/{TopicName}/TransferMessageCount
Azure Service Bus/{NameSpace}/Topics/{TopicName}/TransferDeadLetterMessageCount
Azure Service Bus/{NameSpace}/Topics/{TopicName}/MaxSizeInMegabytes
Azure Service Bus/{NameSpace}/Topics/{TopicName}/SizeInBytes
Azure Service Bus/{NameSpace}/Topics/{TopicName}/Status
Azure Service Bus/{NameSpace}/Topics/{TopicName}/AvailabilityStatus

 

Contributing

 

Always feel free to fork and contribute any changes directly via GitHub.

 

Support

 

For any support questions, please contact help@appdynamics.com.

 

Version:

2.0.1

Compatibility:

3.7

Last Update:

18th March 2018

 

 

 Changes in versions:
1.0.1: Bugfixes and config.yml formatting
2.0: Re-writing the extension using new REAT API's. Added support for SAS authentication
2.0.1: Updated Licenses