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

Azure Monitor input plugin does not watch for new resources #15573

Open
csdaraujo opened this issue Jun 27, 2024 · 2 comments
Open

Azure Monitor input plugin does not watch for new resources #15573

csdaraujo opened this issue Jun 27, 2024 · 2 comments
Labels
bug unexpected problem or unintended behavior

Comments

@csdaraujo
Copy link

csdaraujo commented Jun 27, 2024

Relevant telegraf.conf

[[inputs.azure_monitor.subscription_target]]
  resource_type = "Microsoft.Compute/disks"
  metrics = [
    "Composite Disk Read Bytes/sec",
    "Composite Disk Read Operations/sec",
    "Composite Disk Write Bytes/sec",
    "Composite Disk Write Operations/sec",
  ]
  aggregations = [ "Average" ]

Logs from Telegraf

No valuable logs since the issue relates to new resources that are not identified/included by Telegraf after creation.

System info

Commit d7f3a0e, Ubuntu 22.04, Kubernetes 1.29

Docker

No response

Steps to reproduce

  1. Install and run telegraf monitoring Azure resources
  2. Create a new resource for a type that is monitored by Telegraf (example used disk, so a PVC in k8s)
  3. Check if metrics for the new resources are sent

Expected behavior

New resources should be monitored by Telegraf without the need for a restart (which adds the new resource).

Actual behavior

New resource is not monitored until restart.

Additional info

There should be some kind of watch mechanism to include new resources.

@csdaraujo csdaraujo added the bug unexpected problem or unintended behavior label Jun 27, 2024
@powersj
Copy link
Contributor

powersj commented Jun 27, 2024

Hi,

It looks like the only time we collect the resources is during Init during start up. The result of that is the resources to montior and a debug message about the total number of targets.

Are you suggesting some sort of timer to refresh that list? Is this something you want to put up a PR for?

I'd suggest making this opt-in with a config option like:

## Resource refresh interval
## Interval to refresh the targets used for montioring. Disabled by default
## and when passed a zero value.
# refresh_interval = "0s"

@powersj powersj added the waiting for response waiting for response from contributor label Jun 27, 2024
@csdaraujo
Copy link
Author

Yes. That would work! Will work on a PR for us.

Thank you!

@telegraf-tiger telegraf-tiger bot removed the waiting for response waiting for response from contributor label Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants