Azure

Installation

  1. Create a directory for the install. Suggested:: mkdir -p /opt/circonus/cloud-agent
  2. Download the latest release
  3. Unpack the release in the directory created in first step
  4. In this directory, create a config folder. Suggested: mkdir /opt/circonus/cloud-agent/etc/azure.d
  5. Auto-create a service specific configuration template in the desired format (yaml, toml, or json). Suggested: sbin/circonus-cloud-agentd --enable-azure --azure-example-conf=yaml > etc/azure.d/azure-config.yaml.
    • Note, the id in the template is defaulted to the filename. This should be changed to a name that will be unique across all cloud-agents used in Circonus
    • Follow configuration instructions to finish config settings
  6. Setup as a system service or run in foreground ensuring that --enable-azure is specified

Options

$  sbin/circonus-cloud-agentd -h
The Circonus Cloud Agent collects metrics from cloud infrastructures and fowards them to Circonus.

Usage:
  circonus-cloud-agent [flags]

Flags:
      --azure-conf-dir string       Azure configuration directory (default "/opt/circonus/cloud-agent/etc/azure.d")
      --azure-example-conf string   Show Azure config (json|toml|yaml) and exit
  -c, --config string               config file (default: circonus-cloud-agent.yaml|.json|.toml)
  -d, --debug                       [ENV: CCA_DEBUG] Enable debug messages
      --enable-azure                Enable Azure metric collection client
  -h, --help                        help for circonus-cloud-agent
      --log-level string            [ENV: CCA_LOG_LEVEL] Log level [(panic|fatal|error|warn|info|debug|disabled)] (default "info")
      --log-pretty                  [ENV: CCA_LOG_PRETTY] Output formatted/colored log lines [ignored on windows]
  -V, --version                     Show version and exit

Configuration

Setting up application in Azure

  1. Login to the Azure portal
  2. Create application
    1. Name the application (e.g. circonus-cloud-agent)
    2. Add reader role to subscription for the application
  3. Collect application configuration information
    1. Directory ID
    2. Application ID
    3. Application secret
    4. Subscription ID
  4. Add these to the azure section of the config file.

Circonus

  1. Use Circonus UI to create or identify an API Token to use
  2. Add the key to the config file under the circonus section

Azure configuration file settings

  • directory_id
  • applicaiton_id
  • application_secret
  • subscription_id
  • resource_filter - Use the resourceFilter setting to limit the resources from which metrics are collected. Otherwise, ALL metrics from ALL resources will be collected. The suggested method would be to add a tag to each resource from which to collect metrics and use a filter expression such as tagname eq 'circonus' and tagValue eq 'enabled'
  • cloud_name - default AzurePublicCloud
  • user_agent - default circonus-cloud-agent
  • interval - collection interval in minutes [>=default], default 5

Example configuration

Minimum configuration:

---
id: ...
azure:
  directory_id: ...
  application_id: ...
  application_secret: ...
  subscription_id: ...
circonus:
  key: ...