Skip to content

Commit

Permalink
Integration Azure Event Hub fixes (#275)
Browse files Browse the repository at this point in the history
Co-authored-by: Nicolas VION <[email protected]>
Co-authored-by: Quentin Manfroi <[email protected]>
Co-authored-by: Quentin Manfroi <[email protected]>
  • Loading branch information
4 people authored Apr 15, 2021
1 parent 3b74b1e commit 292c92e
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
7 changes: 7 additions & 0 deletions modules/integration_azure-event-hub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
- [What are the available detectors in this module?](#what-are-the-available-detectors-in-this-module)
- [How to collect required metrics?](#how-to-collect-required-metrics)
- [Metrics](#metrics)
- [Notes](#notes)
- [About `throttled_requests` detector](#about-throttled_requests-detector)
- [Related documentation](#related-documentation)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->
Expand Down Expand Up @@ -95,6 +97,11 @@ Here is the list of required metrics for detectors in this module.
* `ThrottledRequests`


## Notes

### About `throttled_requests` detector

Basic customer's case seems to report values between 0 and 5% in a nominal situation so the default warning threshold has been set to `5`.


## Related documentation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
---
module: "Azure Event Hub"
name: "throttled requests"
filtering: "filter('resource_type', 'Microsoft.EventHub/clusters') and filter('primary_aggregation_type', 'true')"
filtering: "filter('resource_type', 'Microsoft.EventHub/namespaces') and filter('primary_aggregation_type', 'true')"
aggregation: ".mean(by=['azure_resource_name', 'azure_resource_group_name', 'azure_region'])"
transformation: ".min(over='15m')"
value_unit: "%"
Expand All @@ -22,7 +22,7 @@ rules:
comparator: ">"
dependency: critical
warning:
threshold: 0
threshold: 5
comparator: ">"
dependency: major
...
4 changes: 4 additions & 0 deletions modules/integration_azure-event-hub/conf/readme.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
documentations:
- name: Azure Monitor metrics
url: 'https://docs.microsoft.com/en-us/azure/azure-monitor/platform/metrics-supported'
notes: |
### About `throttled_requests` detector
Basic customer's case seems to report values between 0 and 5% in a nominal situation so the default warning threshold has been set to `5`.
2 changes: 1 addition & 1 deletion modules/integration_azure-event-hub/detectors-gen.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ resource "signalfx_detector" "throttled_requests" {
}

program_text = <<-EOF
base_filtering = filter('resource_type', 'Microsoft.EventHub/clusters') and filter('primary_aggregation_type', 'true')
base_filtering = filter('resource_type', 'Microsoft.EventHub/namespaces') and filter('primary_aggregation_type', 'true')
A = data('ThrottledRequests', filter=base_filtering and ${module.filter-tags.filter_custom})${var.throttled_requests_aggregation_function}${var.throttled_requests_transformation_function}
B = data('IncomingRequests', filter=base_filtering and ${module.filter-tags.filter_custom})${var.throttled_requests_aggregation_function}${var.throttled_requests_transformation_function}
signal = (A/B).scale(100).fill(0).publish('signal')
Expand Down
2 changes: 1 addition & 1 deletion modules/integration_azure-event-hub/variables-gen.tf
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@ variable "throttled_requests_threshold_major" {
variable "throttled_requests_threshold_warning" {
description = "Warning threshold for throttled_requests detector in %"
type = number
default = 0
default = 5
}

0 comments on commit 292c92e

Please sign in to comment.