Skip to content

[Azure Metrics] Move container instance metrics from beats to integrations #3593

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

Merged
merged 5 commits into from
Jun 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/azure_metrics/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
- version: "1.0.6"
changes:
- description: Move container_instance metrics config from beats to integrations
type: enhancement
link: https://github.com/elastic/integrations/pull/3593
- version: "1.0.5"
changes:
- description: Fix doc build
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
metricsets: ["container_instance"]
metricsets: ["monitor"]
period: {{period}}
{{#if client_id}}
client_id: {{client_id}}
Expand Down Expand Up @@ -26,11 +26,58 @@ resources:
{{#if resource_groups}}
{{#each resource_groups}}
- resource_group: "{{this}}"
resource_type: "Microsoft.ContainerInstance/containerGroups"
metrics:
- name: ["CpuUsage", "MemoryUsage"]
namespace: "Microsoft.ContainerInstance/containerGroups"
ignore_unsupported: true
timegrain: "PT5M"
dimensions:
- name: "containerName"
value: "*"
- name: ["NetworkBytesReceivedPerSecond", "NetworkBytesTransmittedPerSecond"]
namespace: "Microsoft.ContainerInstance/containerGroups"
ignore_unsupported: true
timegrain: "PT5M"
{{/each}}
{{/if}}
{{#if resource_ids}}
{{#each resource_ids}}
- resource_id: "{{this}}"
metrics:
- name: ["CpuUsage", "MemoryUsage"]
namespace: "Microsoft.ContainerInstance/containerGroups"
ignore_unsupported: true
timegrain: "PT5M"
dimensions:
- name: "containerName"
value: "*"
- name: ["NetworkBytesReceivedPerSecond", "NetworkBytesTransmittedPerSecond"]
namespace: "Microsoft.ContainerInstance/containerGroups"
ignore_unsupported: true
timegrain: "PT5M"
{{/each}}
{{/if}}

{{!
When no resource group and resource ID are specified by the user, we want to
collect metrics for all the resource groups in the subscription.
}}

{{#unless resource_ids }}
{{#unless resource_groups }}
- resource_query: "resourceType eq 'Microsoft.ContainerInstance/containerGroups'"
metrics:
- name: ["CpuUsage", "MemoryUsage"]
namespace: "Microsoft.ContainerInstance/containerGroups"
ignore_unsupported: true
timegrain: "PT5M"
dimensions:
- name: "containerName"
value: "*"
- name: ["NetworkBytesReceivedPerSecond", "NetworkBytesTransmittedPerSecond"]
namespace: "Microsoft.ContainerInstance/containerGroups"
ignore_unsupported: true
timegrain: "PT5M"
{{/unless}}
{{/unless}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
description: Pipeline for parsing azure container_instance metrics.
processors:
- set:
field: ecs.version
value: "8.0.0"
- rename:
field: azure.monitor
target_field: azure.container_instance
ignore_missing: true
on_failure:
- set:
field: error.message
value: '{{ _ingest.on_failure_message }}'
2 changes: 1 addition & 1 deletion packages/azure_metrics/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: azure_metrics
title: Azure Resource Metrics
version: 1.0.5
version: 1.0.6
release: ga
description: Collect metrics from Azure resources with Elastic Agent.
type: integration
Expand Down