Skip to content

[azure_metrics]: integration fails ingest metrics when resource tags contain dots in the name #11343

@zmoog

Description

@zmoog

Integration Name

Azure Resource Metrics [azure_metrics]

Dataset Name

metrics-azure.monitor

Integration Version

1.6.7

Agent Version

8.14.3

Agent Output Type

elasticsearch

Elasticsearch Version

8.14.3

OS Version and Architecture

Linux (x86_64)

Software/API Version

No response

Error Message

{
  "error": {
    "root_cause": [
      {
        "type": "document_parsing_exception",
        "reason": "[1:183] failed to parse field [azure.resource.tags.i] of type [keyword] in a time series document at [2024-10-07T10:29:24.000Z]. Preview of field's value: '{contain={dots=oh yeah}}'"
      }
    ],
    "type": "document_parsing_exception",
    "reason": "[1:183] failed to parse field [azure.resource.tags.i] of type [keyword] in a time series document at [2024-10-07T10:29:24.000Z]. Preview of field's value: '{contain={dots=oh yeah}}'",
    "caused_by": {
      "type": "illegal_state_exception",
      "reason": "Can't get text on a START_OBJECT at 1:166"
    }
  },
  "status": 400
}

Event Original

{
  "@timestamp": "2024-10-07T12:29:24+02:00",
  "azure": {
    "resource": {
      "id": "whatever",
      "tags": {
        "a": 1,
        "i.contain.dots": "oh yeah"
      }
    }
  }
}

What did you do?

Posted a document using the Dev Tools:

POST metrics-azure.monitor-sdh5203/_doc
{
  "@timestamp": "2024-10-07T12:29:24+02:00",
  "azure": {
    "resource": {
      "id": "whatever",
      "tags": {
        "a": 1,
        "i.contain.dots": "oh yeah"
      }
    }
  }
}

What did you see?

Elasticsearch API returned an mapping error:

{
  "error": {
    "root_cause": [
      {
        "type": "document_parsing_exception",
        "reason": "[1:183] failed to parse field [azure.resource.tags.i] of type [keyword] in a time series document at [2024-10-07T10:29:24.000Z]. Preview of field's value: '{contain={dots=oh yeah}}'"
      }
    ],
    "type": "document_parsing_exception",
    "reason": "[1:183] failed to parse field [azure.resource.tags.i] of type [keyword] in a time series document at [2024-10-07T10:29:24.000Z]. Preview of field's value: '{contain={dots=oh yeah}}'",
    "caused_by": {
      "type": "illegal_state_exception",
      "reason": "Can't get text on a START_OBJECT at 1:166"
    }
  },
  "status": 400
}

What did you expect to see?

The document should be indexed successfully (no errors).

Users can set tag names with dots.

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions