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

telegraf agent azure output plugin does not support sovereign clouds (e.g. usgovcloud) #5452

Closed
ernstae opened this issue Feb 20, 2019 · 4 comments
Labels
area/azure Azure plugins including eventhub_consumer, azure_storage_queue, azure_monitor feature request Requests for new plugin and for new features to existing plugins
Milestone

Comments

@ernstae
Copy link
Contributor

ernstae commented Feb 20, 2019

Feature Request

I've been using telegraf agent to ship metrics to Azure Monitor instances in multiple Azure subscriptions. It looks like the URL is hard-coded as [regionname].monitoring.azure.com which doesn't result in support of sovereign cloud environments like US Goverment (e.g. usgovvirginia.monitoring.azure.com is incorrect in this context, and should be monitoring.core.usgovcloudapi.net.)

Proposal:

Allow for endpoint overrides to support the environment, with an output configuration variable to define the endpoint.

It would be even cleaner if telegraf were able to automatically determine where it was running by querying the Azure Instance Metadata service, but reviewing the available information doesn't show tenantId (which can be used to derive whether it's Azure Commercial or Government), or any other information to reveal the necessary information.

Current behavior:

telegraf attempts to send metrics to https://<region>.monitoring.azure.com

Desired behavior:

Allow for an override for the Azure Monitor output host.
For example, the regional endpoints seem to be shunned in favor of the simpler monitoring.core.usgovcloudapi.net in Azure USGovernment

Use case:

Telegraf doesn't send metrics to the correct URL in non-Commercial Azure environments. Allowing for an override value that, if set, changes the output URL for metrics data POSTs, would solve this roadblock for me (and possibly other users who wish to leverage Azure Monitor in sovereign Azure cloud environments)

Microsoft does offer a method for determining the cloud environment you're operating in, via this method:
https://docs.microsoft.com/en-us/azure/virtual-machines/windows/instance-metadata-service#getting-azure-environment-where-the-vm-is-running

@ernstae
Copy link
Contributor Author

ernstae commented Feb 20, 2019

I took a quick stab at the code necessary (minus any unit tests) in this attempt:

master...ernstae:fix/issue-5452

@danielnelson
Copy link
Contributor

We have something very similar in the cloudwatch output:

  ## Endpoint to make request against, the correct endpoint is automatically
  ## determined and this option should only be set if you wish to override the
  ## default.
  ##   ex: endpoint_url = "http://localhost:8000"
  # endpoint_url = ""

@ernstae
Copy link
Contributor Author

ernstae commented Feb 20, 2019

I just updated the PR to switch the variable naming to endpoint_url for consistency-sake @danielnelson

@danielnelson danielnelson added this to the 1.10.0 milestone Feb 20, 2019
@danielnelson danielnelson added feature request Requests for new plugin and for new features to existing plugins area/azure Azure plugins including eventhub_consumer, azure_storage_queue, azure_monitor labels Feb 20, 2019
@danielnelson
Copy link
Contributor

Closed in #5453

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/azure Azure plugins including eventhub_consumer, azure_storage_queue, azure_monitor feature request Requests for new plugin and for new features to existing plugins
Projects
None yet
Development

No branches or pull requests

2 participants