Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide integration with Azure Monitor #4

Closed
6 tasks done
tomkerkhove opened this issue Feb 20, 2018 · 5 comments
Closed
6 tasks done

Provide integration with Azure Monitor #4

tomkerkhove opened this issue Feb 20, 2018 · 5 comments
Assignees
Labels
feature All issues that are new features integration:azure-monitor All issues related to Azure Monitor integration
Milestone

Comments

@tomkerkhove
Copy link
Owner

tomkerkhove commented Feb 20, 2018

Provide integration with Azure Monitor where it will automatically query the Azure Monitor REST API for a set of metrics and expose them via the scrape endpoint.

Depends on #3.

Specifications

  • Integrate with the Azure Monitor REST API
  • Provide a way to configure one or more metrics to query
  • Provide a way to configure how often you should pull latest representation of a metric
  • Provide documentation on how to configure the metrics
  • Provide documentation on how often you should pull latest representation of a metric
  • Provide documentation on how to configure the authentication with Azure Monitor

Configuration

Metrics to scrape:

metrics:
- metric:
  name: "my-name"
  resource-type: "Microsoft.ServiceBus"
- metric:
  name: "my-name"
  resource-type: "Microsoft.WebApps"

Scrape frequency:

  • PROMITOR_SCRAPE_SCHEDULE

Azure authentication:

  • PROMITOR_AUTH_APPID
  • PROMITOR_AUTH_APPKEY
@tomkerkhove tomkerkhove added integration:azure-monitor All issues related to Azure Monitor integration feature All issues that are new features labels Feb 20, 2018
@tomkerkhove tomkerkhove added this to the v1 milestone Feb 20, 2018
@tomkerkhove tomkerkhove self-assigned this Mar 6, 2018
@tomkerkhove
Copy link
Owner Author

tomkerkhove commented Mar 16, 2018

Current proposal for configuration:

azureConfiguration: 
  resourceGroupName: foo
  subscriptionId: bar
metrics: 
    # v1.0
  - name: "queue-size"
    description: "Size of the 'myqueue' queue"
    namespace: "myNamespace"
    queueName: "myqueue"
    resourceType: ServiceBusQueue
    # Supported in later version - This will compose the following URL to query (subscriptions/abc/resourceGroups/xyz/providers/Microsoft.ServiceBus/namespaces/monitor-integration)
  - name: "queue-size-generic" # Metric without description
    resourceType: Generic
    resourceProvider: "Microsoft.ServiceBus"
    resourceSuffix: "namespaces/monitor-integration" # Provide better name for this
    filterExpression: "EntityName eq 'myqueue'"
    resourceGroupName: xyz # Overrides default Azure configuration
    subscriptionId: abc    # Overrides default Azure configuration

@tomkerkhove
Copy link
Owner Author

This is currently what you need to query for Azure Service Bus:

azureMetadata:
  tenantId: tenant-x
  subscriptionId: foo
  resourceGroupName: bar
metrics: 
    # v1.0
  - name: demo_queue_size
    description: "Size of the 'myqueue' queue"
    namespace: myNamespace
    azureMetricName: ActiveMessages
    azureMetricAggregation: Average
    queueName: myqueue
    resourceType: ServiceBusQueue

However, I don't like the names for azureMetricName & azureMetricAggregation so will need to come up with a better name

@tomkerkhove
Copy link
Owner Author

Change the structure to the following approach:

azureMetadata:
  tenantId: tenant-x
  subscriptionId: foo
  resourceGroupName: bar
metrics: 
    # v1.0
  - name: demo_queue_size
    description: "Size of the 'myqueue' queue"
    resourceType: ServiceBusQueue
    namespace: myNamespace
    queueName: myQueue
    azureMetricConfiguration:
      metricName: Size
      aggregation: Average

This should be more readable than before

@tomkerkhove
Copy link
Owner Author

tomkerkhove commented Apr 16, 2018

Scraping Azure Monitor works but it needs some improvements.

@tomkerkhove
Copy link
Owner Author

First rough release is ready ✔️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature All issues that are new features integration:azure-monitor All issues related to Azure Monitor integration
Projects
None yet
Development

No branches or pull requests

1 participant