Skip to content

[azure_monitor] Cannot use empty string as the nampspace prefix #8256

@ethanshea-ms

Description

@ethanshea-ms

Relevant telegraf.conf:

[[outputs.azure_monitor]]
  namespace_prefix = ""

# For debugging
[[outputs.file]]
  data_format = "influx"
  files = ["stdout"]

System info:

Telegraf 1.15.3

Steps to reproduce:

  1. Run telegraf with the above configuration

Expected behavior:

Metrics are emitted to azure monitor in the AZM namespace which matches the field name.

Actual behavior:

Metrics are emitted to azure monitor in the AZM namespace telegraf/{fieldName}.

Additional info:

This seems to be the suspect part of the code. Can it be compared to nil instead of the empty string?

As a side note, the regex processor may be a better solution to add namespace prefixes.

ATTN: @ danielnelson

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/azureAzure plugins including eventhub_consumer, azure_storage_queue, azure_monitorbugunexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions