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

Issue with Azure Monitor Data Collection Rules #20258

Closed
cRaZyT1807 opened this issue Feb 1, 2023 · 4 comments · Fixed by #20352
Closed

Issue with Azure Monitor Data Collection Rules #20258

cRaZyT1807 opened this issue Feb 1, 2023 · 4 comments · Fixed by #20352

Comments

@cRaZyT1807
Copy link

cRaZyT1807 commented Feb 1, 2023

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

1.3.7

AzureRM Provider Version

3.41.0

Affected Resource(s)/Data Source(s)

azurerm_monitor_data_collection_rule

Terraform Configuration Files

resource "azurerm_monitor_data_collection_rule" "data_collection_rule" {
  name                = "${var.project}-${var.environment}-log-rules"
  resource_group_name = lower("devops-${var.environment}-log-rg")
  location            = var.location

  destinations {
    log_analytics {
      workspace_resource_id = var.workspace_id
      name                  = "${var.project}-${var.environment}-destination-log"
    }
  }

  data_flow {
    streams      = ["Microsoft-Perf","Microsoft-Syslog"]
    destinations = ["${var.project}-${var.environment}-destination-log"]
  }

  data_sources {
    syslog {
      facility_names = ["*"]
      log_levels     = ["*"]
      name           = "${var.project}-${var.environment}-sysLogs"
    }

    performance_counter {
      streams                       = ["Microsoft-Perf"]
      sampling_frequency_in_seconds = 10
      counter_specifiers            = ["*"]
      name                          = "${var.project}-${var.environment}-perfCounter"
    }
  }
}

Debug Output/Panic Output

N/A

Expected Behaviour

Create the rule with the provided "syslog" and "performance counter" settings.

Actual Behaviour

The rule is created but nothing is selected in the “Performance Counters” and in “Syslog” all the “Facilities” are available but no “minimum log level”.

Steps to Reproduce

No response

Important Factoids

No response

References

No response

@teowa
Copy link
Contributor

teowa commented Feb 3, 2023

Hi @cRaZyT1807 , thanks for submitting this issue!

From Data Collection Rule REST API sepcification , the wildcard(*) means collect all instance, but from doc the performance counters format is like object(instance)\counter. And azurerm has send the correct value to service API. Through reproduce, I can also see in Portal the no option is selected, So the issue should be in servicn side or Portal side.

@teowa
Copy link
Contributor

teowa commented Feb 6, 2023

After internal sync, the conclusion is: For performance_counter, the * should be used in format object(instance)\counter to collect all the instance.
And for syslog, the * can be used in facility_names and log_levels, it is the portal display issue (no log level is selected), and it will be reported.

Thanks.

@cRaZyT1807
Copy link
Author

HI @teowa , thanks for the feedback and support!

The documentation for performance_counter was a bit confusing at this point, because Use a wildcard * to collect counters for all instances meant for me that I could get all possible counters with it, especially since the term instances is not explained further here.

Regards

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants