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
121 changes: 121 additions & 0 deletions azure/eventgrid_extensiontopics/dashboards/overview/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
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_eventgrid_extensiontopics_overview.id}"
description = "OpenTelemetry Collector Event Grid Extension Topics Dashboard URL"
}

resource "lightstep_dashboard" "azure_eventgrid_extensiontopics_overview" {
project_name = var.lightstep_project
dashboard_name = "Event Grid Extension Topics Metrics"
dashboard_description = "[Beta] Monitor Event Grid Extension Topics with this metrics overview dashboard."

chart {
name = "Publish Failed Events"
rank = "0"
type = "timeseries"

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

chart {
name = "Published Events"
rank = "1"
type = "timeseries"

query {
query_name = "a"
display = "line"
hidden = false
query_string = <<EOT
metric azure_publishsuccesscount_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 = "Unmatched Events"
rank = "2"
type = "timeseries"

query {
query_name = "a"
display = "line"
hidden = false
query_string = <<EOT
metric azure_unmatchedeventcount_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 = "Publish Success Latency"
rank = "3"
type = "timeseries"

query {
query_name = "a"
display = "line"
hidden = false
query_string = <<EOT
metric azure_publishsuccesslatencyinms_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_error"
default_values = []
suggestion_attribute_key = "metadata_error"
}

template_variable {
name = "metadata_errortype"
default_values = []
suggestion_attribute_key = "metadata_errortype"
}
}
5 changes: 5 additions & 0 deletions azure/eventgrid_extensiontopics/metrics.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Name,Description,Unit,DataType,Attributes,Default Aggregation
azure_publishfailcount_average;azure_publishfailcount_count;azure_publishfailcount_maximum;azure_publishfailcount_minimum;azure_publishfailcount_total,Total events failed to publish to this topic,Count,Gauge,azuremonitor.subscription_id;azuremonitor.tenant_id;azuremonitor.resource_id;location;metadata_errortype;metadata_error,total
azure_publishsuccesscount_average;azure_publishsuccesscount_count;azure_publishsuccesscount_maximum;azure_publishsuccesscount_minimum;azure_publishsuccesscount_total,Total events published to this topic,Count,Gauge,azuremonitor.subscription_id;azuremonitor.tenant_id;azuremonitor.resource_id;location,total
azure_unmatchedeventcount_average;azure_unmatchedeventcount_count;azure_unmatchedeventcount_maximum;azure_unmatchedeventcount_minimum;azure_unmatchedeventcount_total,Total events not matching any of the event subscriptions for this topic,Count,Gauge,azuremonitor.subscription_id;azuremonitor.tenant_id;azuremonitor.resource_id;location,total
azure_publishsuccesslatencyinms_average;azure_publishsuccesslatencyinms_count;azure_publishsuccesslatencyinms_maximum;azure_publishsuccesslatencyinms_minimum;azure_publishsuccesslatencyinms_total,Publish success latency in milliseconds,Milliseconds,Gauge,azuremonitor.subscription_id;azuremonitor.tenant_id;azuremonitor.resource_id;location,total
Loading