Skip to content
This repository was archived by the owner on Mar 6, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
286 changes: 286 additions & 0 deletions azure/eventhub_clusters/dashboards/overview/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,286 @@
terraform {
required_providers {
lightstep = {
source = "lightstep/lightstep"
version = "~> 1.76.0"
}
}
required_version = ">= v1.0.11"
}

variable "lightstep_project" {
description = "Cloud Observability Project Name"
type = string
}

output "dashboard_url" {
value = "https://app.lightstep.com/${var.lightstep_project}/dashboard/${lightstep_dashboard.azure_eventhub_cluster_overview.id}"
description = "OpenTelemetry Collector Event Hub Clusters Dashboard URL"
}

resource "lightstep_dashboard" "azure_eventhub_cluster_overview" {
project_name = var.lightstep_project
dashboard_name = "Event Hub Clusters Metrics"
dashboard_description = "[Beta] Monitor Event Hub Clusters with this metrics overview dashboard."

chart {
name = "Active Connections"
rank = "0"
type = "timeseries"

query {
query_name = "a"
display = "line"
hidden = false
query_string = <<EOT
metric azure_activeconnections_average | filter ((azuremonitor.subscription_id == $azuremonitor_subscription_id) && (azuremonitor.tenant_id == $azuremonitor_tenant_id) && (azuremonitor.resource_id == $azuremonitor_resource_id) && (location == $location)) | delta | group_by [], sum
EOT
}
}

chart {
name = "CPU"
rank = "1"
type = "timeseries"

query {
query_name = "a"
display = "line"
hidden = false
query_string = <<EOT
metric azure_cpu_maximum | filter ((azuremonitor.subscription_id == $azuremonitor_subscription_id) && (azuremonitor.tenant_id == $azuremonitor_tenant_id) && (azuremonitor.resource_id == $azuremonitor_resource_id) && (location == $location) && (metadata_role == $metadata_role)) | delta | group_by [], sum
EOT
}
}

chart {
name = "Available Memory"
rank = "2"
type = "timeseries"

query {
query_name = "a"
display = "line"
hidden = false
query_string = <<EOT
metric azure_availablememory_maximum | filter ((azuremonitor.subscription_id == $azuremonitor_subscription_id) && (azuremonitor.tenant_id == $azuremonitor_tenant_id) && (azuremonitor.resource_id == $azuremonitor_resource_id) && (location == $location) && (metadata_role == $metadata_role)) | delta | group_by [], sum
EOT
}
}

chart {
name = "User Errors"
rank = "3"
type = "timeseries"

query {
query_name = "a"
display = "line"
hidden = false
query_string = <<EOT
metric azure_usererrors_total | filter ((azuremonitor.subscription_id == $azuremonitor_subscription_id) && (azuremonitor.tenant_id == $azuremonitor_tenant_id) && (azuremonitor.resource_id == $azuremonitor_resource_id) && (location == $location) && (metadata_operationresult == $metadata_operationresult)) | delta | group_by [], sum
EOT
}
}

chart {
name = "Server Errors"
rank = "4"
type = "timeseries"

query {
query_name = "a"
display = "line"
hidden = false
query_string = <<EOT
metric azure_servererrors_total | filter ((azuremonitor.subscription_id == $azuremonitor_subscription_id) && (azuremonitor.tenant_id == $azuremonitor_tenant_id) && (azuremonitor.resource_id == $azuremonitor_resource_id) && (location == $location) && (metadata_operationresult == $metadata_operationresult)) | delta | group_by [], sum
EOT
}
}

chart {
name = "Quota Exceeded Errors"
rank = "5"
type = "timeseries"

query {
query_name = "a"
display = "line"
hidden = false
query_string = <<EOT
metric azure_quotaexceedederrors_total | filter ((azuremonitor.subscription_id == $azuremonitor_subscription_id) && (azuremonitor.tenant_id == $azuremonitor_tenant_id) && (azuremonitor.resource_id == $azuremonitor_resource_id) && (location == $location) && (metadata_operationresult == $metadata_operationresult)) | delta | group_by [], sum
EOT
}
}

chart {
name = "Connections Closed"
rank = "6"
type = "timeseries"

query {
query_name = "a"
display = "line"
hidden = false
query_string = <<EOT
metric azure_connectionsclosed_average | filter ((azuremonitor.subscription_id == $azuremonitor_subscription_id) && (azuremonitor.tenant_id == $azuremonitor_tenant_id) && (azuremonitor.resource_id == $azuremonitor_resource_id) && (location == $location)) | delta | group_by [], sum
EOT
}
}

chart {
name = "Connections Opened"
rank = "7"
type = "timeseries"

query {
query_name = "a"
display = "line"
hidden = false
query_string = <<EOT
metric azure_connectionsopened_average | filter ((azuremonitor.subscription_id == $azuremonitor_subscription_id) && (azuremonitor.tenant_id == $azuremonitor_tenant_id) && (azuremonitor.resource_id == $azuremonitor_resource_id) && (location == $location)) | delta | group_by [], sum
EOT
}
}

chart {
name = "Incoming Bytes"
rank = "8"
type = "timeseries"

query {
query_name = "a"
display = "line"
hidden = false
query_string = <<EOT
metric azure_incomingbytes_total | filter ((azuremonitor.subscription_id == $azuremonitor_subscription_id) && (azuremonitor.tenant_id == $azuremonitor_tenant_id) && (azuremonitor.resource_id == $azuremonitor_resource_id) && (location == $location)) | delta | group_by [], sum
EOT
}
}

chart {
name = "Incoming Messages"
rank = "9"
type = "timeseries"

query {
query_name = "a"
display = "line"
hidden = false
query_string = <<EOT
metric azure_incomingmessages_total | filter ((azuremonitor.subscription_id == $azuremonitor_subscription_id) && (azuremonitor.tenant_id == $azuremonitor_tenant_id) && (azuremonitor.resource_id == $azuremonitor_resource_id) && (location == $location)) | delta | group_by [], sum
EOT
}
}

chart {
name = "Outgoing Bytes"
rank = "10"
type = "timeseries"

query {
query_name = "a"
display = "line"
hidden = false
query_string = <<EOT
metric azure_outgoingbytes_total | filter ((azuremonitor.subscription_id == $azuremonitor_subscription_id) && (azuremonitor.tenant_id == $azuremonitor_tenant_id) && (azuremonitor.resource_id == $azuremonitor_resource_id) && (location == $location)) | delta | group_by [], sum
EOT
}
}

chart {
name = "Outgoing Messages"
rank = "11"
type = "timeseries"

query {
query_name = "a"
display = "line"
hidden = false
query_string = <<EOT
metric azure_outgoingmessages_total | filter ((azuremonitor.subscription_id == $azuremonitor_subscription_id) && (azuremonitor.tenant_id == $azuremonitor_tenant_id) && (azuremonitor.resource_id == $azuremonitor_resource_id) && (location == $location)) | delta | group_by [], sum
EOT
}
}

chart {
name = "Successful Requests"
rank = "12"
type = "timeseries"

query {
query_name = "a"
display = "line"
hidden = false
query_string = <<EOT
metric azure_successfulrequests_total | filter ((azuremonitor.subscription_id == $azuremonitor_subscription_id) && (azuremonitor.tenant_id == $azuremonitor_tenant_id) && (azuremonitor.resource_id == $azuremonitor_resource_id) && (location == $location) && (metadata_operationresult == $metadata_operationresult)) | delta | group_by [], sum
EOT
}
}

chart {
name = "Throttled Requests"
rank = "13"
type = "timeseries"

query {
query_name = "a"
display = "line"
hidden = false
query_string = <<EOT
metric azure_throttledrequests_total | filter ((azuremonitor.subscription_id == $azuremonitor_subscription_id) && (azuremonitor.tenant_id == $azuremonitor_tenant_id) && (azuremonitor.resource_id == $azuremonitor_resource_id) && (location == $location) && (metadata_operationresult == $metadata_operationresult)) | delta | group_by [], sum
EOT
}
}

chart {
name = "Incoming Requests"
rank = "14"
type = "timeseries"

query {
query_name = "a"
display = "line"
hidden = false
query_string = <<EOT
metric azure_incomingrequests_total | filter ((azuremonitor.subscription_id == $azuremonitor_subscription_id) && (azuremonitor.tenant_id == $azuremonitor_tenant_id) && (azuremonitor.resource_id == $azuremonitor_resource_id) && (location == $location)) | delta | group_by [], sum
EOT
}
}

template_variable {
name = "azuremonitor_resource_id"
default_values = []
suggestion_attribute_key = "azuremonitor.resource_id"
}

template_variable {
name = "azuremonitor_subscription_id"
default_values = []
suggestion_attribute_key = "azuremonitor.subscription_id"
}

template_variable {
name = "azuremonitor_tenant_id"
default_values = []
suggestion_attribute_key = "azuremonitor.tenant_id"
}

template_variable {
name = "location"
default_values = []
suggestion_attribute_key = "location"
}

template_variable {
name = "metadata_operationresult"
default_values = []
suggestion_attribute_key = "metadata_operationresult"
}

template_variable {
name = "metadata_role"
default_values = []
suggestion_attribute_key = "metadata_role"
}
}
20 changes: 20 additions & 0 deletions azure/eventhub_clusters/metrics.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Name,Description,Unit,DataType,Attributes,Default Aggregation
azure_activeconnections_average;azure_activeconnections_count;azure_activeconnections_maximum;azure_activeconnections_minimum;azure_activeconnections_total,Total Active Connections for Microsoft.EventHub.,Count,Gauge,azuremonitor.subscription_id;azuremonitor.tenant_id;azuremonitor.resource_id;location,average
azure_cpu_average;azure_cpu_count;azure_cpu_maximum;azure_cpu_minimum;azure_cpu_total,CPU utilization for the Event Hub Cluster as a percentage,Percent,Gauge,azuremonitor.subscription_id;azuremonitor.tenant_id;azuremonitor.resource_id;location;metadata_role,maximum
azure_availablememory_average;azure_availablememory_count;azure_availablememory_maximum;azure_availablememory_minimum;azure_availablememory_total,Available memory for the Event Hub Cluster as a percentage of total memory.,Percent,Gauge,azuremonitor.subscription_id;azuremonitor.tenant_id;azuremonitor.resource_id;location;metadata_role,maximum
azure_usererrors_average;azure_usererrors_count;azure_usererrors_maximum;azure_usererrors_minimum;azure_usererrors_total,User Errors for Microsoft.EventHub.,Count,Gauge,azuremonitor.subscription_id;azuremonitor.tenant_id;azuremonitor.resource_id;location;metadata_operationresult,total
azure_servererrors_average;azure_servererrors_count;azure_servererrors_maximum;azure_servererrors_minimum;azure_servererrors_total,Server Errors for Microsoft.EventHub.,Count,Gauge,azuremonitor.subscription_id;azuremonitor.tenant_id;azuremonitor.resource_id;location;metadata_operationresult,total
azure_quotaexceedederrors_average;azure_quotaexceedederrors_count;azure_quotaexceedederrors_maximum;azure_quotaexceedederrors_minimum;azure_quotaexceedederrors_total,Quota Exceeded Errors for Microsoft.EventHub.,Count,Gauge,azuremonitor.subscription_id;azuremonitor.tenant_id;azuremonitor.resource_id;location;metadata_operationresult,total
azure_connectionsclosed_average;azure_connectionsclosed_count;azure_connectionsclosed_maximum;azure_connectionsclosed_minimum;azure_connectionsclosed_total,Connections Closed for Microsoft.EventHub.,Count,Gauge,azuremonitor.subscription_id;azuremonitor.tenant_id;azuremonitor.resource_id;location,average
azure_connectionsopened_average;azure_connectionsopened_count;azure_connectionsopened_maximum;azure_connectionsopened_minimum;azure_connectionsopened_total,Connections Opened for Microsoft.EventHub.,Count,Gauge,azuremonitor.subscription_id;azuremonitor.tenant_id;azuremonitor.resource_id;location,average
azure_incomingbytes_average;azure_incomingbytes_count;azure_incomingbytes_maximum;azure_incomingbytes_minimum;azure_incomingbytes_total,Incoming Bytes for Microsoft.EventHub.,Bytes,Gauge,azuremonitor.subscription_id;azuremonitor.tenant_id;azuremonitor.resource_id;location,total
azure_incomingmessages_average;azure_incomingmessages_count;azure_incomingmessages_maximum;azure_incomingmessages_minimum;azure_incomingmessages_total,Incoming Messages for Microsoft.EventHub.,Count,Gauge,azuremonitor.subscription_id;azuremonitor.tenant_id;azuremonitor.resource_id;location,total
azure_outgoingbytes_average;azure_outgoingbytes_count;azure_outgoingbytes_maximum;azure_outgoingbytes_minimum;azure_outgoingbytes_total,Outgoing Bytes for Microsoft.EventHub.,Bytes,Gauge,azuremonitor.subscription_id;azuremonitor.tenant_id;azuremonitor.resource_id;location,total
azure_outgoingmessages_average;azure_outgoingmessages_count;azure_outgoingmessages_maximum;azure_outgoingmessages_minimum;azure_outgoingmessages_total,Outgoing Messages for Microsoft.EventHub.,Count,Gauge,azuremonitor.subscription_id;azuremonitor.tenant_id;azuremonitor.resource_id;location,total
azure_successfulrequests_average;azure_successfulrequests_count;azure_successfulrequests_maximum;azure_successfulrequests_minimum;azure_successfulrequests_total,Successful Requests for Microsoft.EventHub.,Count,Gauge,azuremonitor.subscription_id;azuremonitor.tenant_id;azuremonitor.resource_id;location;metadata_operationresult,total
azure_throttledrequests_average;azure_throttledrequests_count;azure_throttledrequests_maximum;azure_throttledrequests_minimum;azure_throttledrequests_total,Throttled Requests for Microsoft.EventHub.,Count,Gauge,azuremonitor.subscription_id;azuremonitor.tenant_id;azuremonitor.resource_id;location;metadata_operationresult,total
azure_incomingrequests_average;azure_incomingrequests_count;azure_incomingrequests_maximum;azure_incomingrequests_minimum;azure_incomingrequests_total,Incoming Requests for Microsoft.EventHub.,Count,Gauge,azuremonitor.subscription_id;azuremonitor.tenant_id;azuremonitor.resource_id;location,total
azure_capturebacklog_average;azure_capturebacklog_count;azure_capturebacklog_maximum;azure_capturebacklog_minimum;azure_capturebacklog_total,Capture Backlog for Microsoft.EventHub.,Count,Gauge,azuremonitor.subscription_id;azuremonitor.tenant_id;azuremonitor.resource_id;location,total
azure_capturedbytes_average;azure_capturedbytes_count;azure_capturedbytes_maximum;azure_capturedbytes_minimum;azure_capturedbytes_total,Captured Bytes for Microsoft.EventHub.,Bytes,Gauge,azuremonitor.subscription_id;azuremonitor.tenant_id;azuremonitor.resource_id;location,total
azure_capturedmessages_average;azure_capturedmessages_count;azure_capturedmessages_maximum;azure_capturedmessages_minimum;azure_capturedmessages_total,Captured Messages for Microsoft.EventHub.,Count,Gauge,azuremonitor.subscription_id;azuremonitor.tenant_id;azuremonitor.resource_id;location,total
azure_size_average;azure_size_count;azure_size_maximum;azure_size_minimum;azure_size_total,Size of an EventHub in Bytes.,Bytes,Gauge,azuremonitor.subscription_id;azuremonitor.tenant_id;azuremonitor.resource_id;location;metadata_role,average
Loading