From efc84699c4a9f0f5363517aaa76ab24307581f4d Mon Sep 17 00:00:00 2001 From: Heber Silva Date: Thu, 24 Aug 2023 16:21:28 -0400 Subject: [PATCH 1/2] added pulsar dashboard --- .../main.tf | 304 ++++++++++++++++++ .../outputs.tf | 4 + .../variables.tf | 4 + 3 files changed, 312 insertions(+) create mode 100644 collector-dashboards/otel-collector-pulsar-prom-receiver-dashboard/main.tf create mode 100644 collector-dashboards/otel-collector-pulsar-prom-receiver-dashboard/outputs.tf create mode 100644 collector-dashboards/otel-collector-pulsar-prom-receiver-dashboard/variables.tf diff --git a/collector-dashboards/otel-collector-pulsar-prom-receiver-dashboard/main.tf b/collector-dashboards/otel-collector-pulsar-prom-receiver-dashboard/main.tf new file mode 100644 index 0000000..ac591aa --- /dev/null +++ b/collector-dashboards/otel-collector-pulsar-prom-receiver-dashboard/main.tf @@ -0,0 +1,304 @@ +terraform { + required_providers { + lightstep = { + source = "lightstep/lightstep" + version = "~> 1.70.10" + } + } + required_version = ">= v1.0.11" +} + +resource "lightstep_dashboard" "otel_collector_pulsar_dashboard" { + project_name = var.lightstep_project + dashboard_name = "OpenTelemetry Pulsar & Dashboard" + dashboard_description = "Monitor Pulsar and metrics with this summary dashboard." + + chart { + name = "CPU Time Spent" + rank = "0" + type = "timeseries" + query { + query_name = "a" + display = "line" + hidden = false + query_string = "metric process_cpu_seconds_total | rate | group_by [], sum" + } + } + + chart { + name = "Resident Memory Size" + rank = "1" + type = "timeseries" + query { + query_name = "a" + display = "line" + hidden = false + query_string = "metric process_resident_memory_bytes | rate | group_by [], sum" + } + } + + chart { + name = "Virtual Memory Size" + rank = "2" + type = "timeseries" + query { + query_name = "a" + display = "line" + hidden = false + query_string = "metric process_virtual_memory_bytes | rate | group_by [], sum" + } + } + + chart { + name = "Process Max FDS" + rank = "2" + type = "timeseries" + query { + query_name = "a" + display = "line" + hidden = false + query_string = "metric process_max_fds | rate | group_by [], sum" + } + } + + chart { + name = "Process Open FDS" + rank = "2" + type = "timeseries" + query { + query_name = "a" + display = "line" + hidden = false + query_string = "metric process_open_fds | rate | group_by [], sum" + } + } + + chart { + name = "UP" + rank = "2" + type = "timeseries" + query { + query_name = "a" + display = "line" + hidden = false + query_string = "metric up | rate | group_by [], sum" + } + } + + chart { + name = "Active Connections" + rank = "10" + type = "timeseries" + query { + query_name = "a" + display = "line" + hidden = false + query_string = "metric pulsar_active_connections | rate | group_by [], sum" + } + } + + chart { + name = "Broker Message Backlog" + rank = "10" + type = "timeseries" + query { + query_name = "a" + display = "line" + hidden = false + query_string = "metric pulsar_broker_msg_backlog | rate | group_by [], sum" + } + } + + chart { + name = "Broker Incoming Message Rate" + rank = "11" + type = "timeseries" + query { + query_name = "a" + display = "line" + hidden = false + query_string = "metric pulsar_broker_rate_in | rate | group_by [], sum" + } + } + + chart { + name = "Broker Outgoing Message Rate" + rank = "12" + type = "timeseries" + query { + query_name = "a" + display = "line" + hidden = false + query_string = "metric pulsar_broker_rate_out | rate | group_by [], sum" + } + } + + chart { + name = "Broker Storage Size" + rank = "13" + type = "timeseries" + query { + query_name = "a" + display = "line" + hidden = false + query_string = "metric pulsar_broker_storage_size | rate | group_by [], sum" + } + } + + chart { + name = "Broker Topics Count" + rank = "14" + type = "timeseries" + query { + query_name = "a" + display = "line" + hidden = false + query_string = "metric pulsar_broker_topics_count | rate | group_by [], sum" + } + } + + chart { + name = "Message Backlog Across Topics" + rank = "15" + type = "timeseries" + query { + query_name = "a" + display = "line" + hidden = false + query_string = "metric pulsar_msg_backlog | rate | group_by [], sum" + } + } + + chart { + name = "Producers Count" + rank = "16" + type = "timeseries" + query { + query_name = "a" + display = "line" + hidden = false + query_string = "metric pulsar_producers_count | rate | group_by [], sum" + } + } + + chart { + name = "Consumers Count" + rank = "17" + type = "timeseries" + query { + query_name = "a" + display = "line" + hidden = false + query_string = "metric pulsar_consumers_count | rate | group_by [], sum" + } + } + + chart { + name = "Total Incoming Bytes" + rank = "18" + type = "timeseries" + query { + query_name = "a" + display = "line" + hidden = false + query_string = "metric pulsar_in_bytes_total | rate | group_by [], sum" + } + } + + chart { + name = "Total Outgoing Bytes" + rank = "19" + type = "timeseries" + query { + query_name = "a" + display = "line" + hidden = false + query_string = "metric pulsar_out_bytes_total | rate | group_by [], sum" + } + } + + chart { + name = "Storage Read Rate" + rank = "20" + type = "timeseries" + query { + query_name = "a" + display = "line" + hidden = false + query_string = "metric pulsar_storage_read_rate | rate | group_by [], sum" + } + } + + chart { + name = "Storage Write Rate" + rank = "21" + type = "timeseries" + query { + query_name = "a" + display = "line" + hidden = false + query_string = "metric pulsar_storage_write_rate | rate | group_by [], sum" + } + } + + chart { + name = "Total Storage Size" + rank = "22" + type = "timeseries" + query { + query_name = "a" + display = "line" + hidden = false + query_string = "metric pulsar_storage_size | rate | group_by [], sum" + } + } + + chart { + name = "Total Storage Size" + rank = "22" + type = "timeseries" + query { + query_name = "a" + display = "line" + hidden = false + query_string = "metric pulsar_storage_logical_size | rate | group_by [], sum" + } + } + + chart { + name = "Subscription Backlog" + rank = "30" + type = "timeseries" + query { + query_name = "a" + display = "line" + hidden = false + query_string = "metric pulsar_subscription_back_log | rate | group_by [], sum" + } + } + + chart { + name = "Subscription Consumers Count" + rank = "31" + type = "timeseries" + query { + query_name = "a" + display = "line" + hidden = false + query_string = "metric pulsar_subscription_consumers_count | rate | group_by [], sum" + } + } + + chart { + name = "Subscription Message Rate Out" + rank = "32" + type = "timeseries" + query { + query_name = "a" + display = "line" + hidden = false + query_string = "metric pulsar_subscription_msg_rate_out | rate | group_by [], sum" + } + } + +} diff --git a/collector-dashboards/otel-collector-pulsar-prom-receiver-dashboard/outputs.tf b/collector-dashboards/otel-collector-pulsar-prom-receiver-dashboard/outputs.tf new file mode 100644 index 0000000..d02907b --- /dev/null +++ b/collector-dashboards/otel-collector-pulsar-prom-receiver-dashboard/outputs.tf @@ -0,0 +1,4 @@ +output "dashboard_url" { + value = "https://app.lightstep.com/${var.lightstep_project}/dashboard/${lightstep_dashboard.otel_collector_pulsar_dashboard.id}" + description = "OpenTelemetry Pulsar Dashboard URL" +} diff --git a/collector-dashboards/otel-collector-pulsar-prom-receiver-dashboard/variables.tf b/collector-dashboards/otel-collector-pulsar-prom-receiver-dashboard/variables.tf new file mode 100644 index 0000000..21ee69f --- /dev/null +++ b/collector-dashboards/otel-collector-pulsar-prom-receiver-dashboard/variables.tf @@ -0,0 +1,4 @@ +variable "lightstep_project" { + description = "Name of Lightstep project" + type = string +} From d564ffeba9d90cb648ee521f8739374f8defed78 Mon Sep 17 00:00:00 2001 From: Heber Silva Date: Tue, 19 Sep 2023 08:24:48 -0400 Subject: [PATCH 2/2] fixed rank sequence --- .../main.tf | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/collector-dashboards/otel-collector-pulsar-prom-receiver-dashboard/main.tf b/collector-dashboards/otel-collector-pulsar-prom-receiver-dashboard/main.tf index ac591aa..6d6dde6 100644 --- a/collector-dashboards/otel-collector-pulsar-prom-receiver-dashboard/main.tf +++ b/collector-dashboards/otel-collector-pulsar-prom-receiver-dashboard/main.tf @@ -10,7 +10,7 @@ terraform { resource "lightstep_dashboard" "otel_collector_pulsar_dashboard" { project_name = var.lightstep_project - dashboard_name = "OpenTelemetry Pulsar & Dashboard" + dashboard_name = "OpenTelemetry Pulsar Dashboard" dashboard_description = "Monitor Pulsar and metrics with this summary dashboard." chart { @@ -51,7 +51,7 @@ resource "lightstep_dashboard" "otel_collector_pulsar_dashboard" { chart { name = "Process Max FDS" - rank = "2" + rank = "3" type = "timeseries" query { query_name = "a" @@ -63,7 +63,7 @@ resource "lightstep_dashboard" "otel_collector_pulsar_dashboard" { chart { name = "Process Open FDS" - rank = "2" + rank = "4" type = "timeseries" query { query_name = "a" @@ -75,7 +75,7 @@ resource "lightstep_dashboard" "otel_collector_pulsar_dashboard" { chart { name = "UP" - rank = "2" + rank = "5" type = "timeseries" query { query_name = "a" @@ -87,7 +87,7 @@ resource "lightstep_dashboard" "otel_collector_pulsar_dashboard" { chart { name = "Active Connections" - rank = "10" + rank = "6" type = "timeseries" query { query_name = "a" @@ -99,7 +99,7 @@ resource "lightstep_dashboard" "otel_collector_pulsar_dashboard" { chart { name = "Broker Message Backlog" - rank = "10" + rank = "7" type = "timeseries" query { query_name = "a" @@ -111,7 +111,7 @@ resource "lightstep_dashboard" "otel_collector_pulsar_dashboard" { chart { name = "Broker Incoming Message Rate" - rank = "11" + rank = "8" type = "timeseries" query { query_name = "a" @@ -123,7 +123,7 @@ resource "lightstep_dashboard" "otel_collector_pulsar_dashboard" { chart { name = "Broker Outgoing Message Rate" - rank = "12" + rank = "9" type = "timeseries" query { query_name = "a" @@ -135,7 +135,7 @@ resource "lightstep_dashboard" "otel_collector_pulsar_dashboard" { chart { name = "Broker Storage Size" - rank = "13" + rank = "10" type = "timeseries" query { query_name = "a" @@ -147,7 +147,7 @@ resource "lightstep_dashboard" "otel_collector_pulsar_dashboard" { chart { name = "Broker Topics Count" - rank = "14" + rank = "11" type = "timeseries" query { query_name = "a" @@ -159,7 +159,7 @@ resource "lightstep_dashboard" "otel_collector_pulsar_dashboard" { chart { name = "Message Backlog Across Topics" - rank = "15" + rank = "12" type = "timeseries" query { query_name = "a" @@ -171,7 +171,7 @@ resource "lightstep_dashboard" "otel_collector_pulsar_dashboard" { chart { name = "Producers Count" - rank = "16" + rank = "13" type = "timeseries" query { query_name = "a" @@ -183,7 +183,7 @@ resource "lightstep_dashboard" "otel_collector_pulsar_dashboard" { chart { name = "Consumers Count" - rank = "17" + rank = "14" type = "timeseries" query { query_name = "a" @@ -195,7 +195,7 @@ resource "lightstep_dashboard" "otel_collector_pulsar_dashboard" { chart { name = "Total Incoming Bytes" - rank = "18" + rank = "15" type = "timeseries" query { query_name = "a" @@ -207,7 +207,7 @@ resource "lightstep_dashboard" "otel_collector_pulsar_dashboard" { chart { name = "Total Outgoing Bytes" - rank = "19" + rank = "16" type = "timeseries" query { query_name = "a" @@ -219,7 +219,7 @@ resource "lightstep_dashboard" "otel_collector_pulsar_dashboard" { chart { name = "Storage Read Rate" - rank = "20" + rank = "17" type = "timeseries" query { query_name = "a" @@ -231,7 +231,7 @@ resource "lightstep_dashboard" "otel_collector_pulsar_dashboard" { chart { name = "Storage Write Rate" - rank = "21" + rank = "18" type = "timeseries" query { query_name = "a" @@ -243,7 +243,7 @@ resource "lightstep_dashboard" "otel_collector_pulsar_dashboard" { chart { name = "Total Storage Size" - rank = "22" + rank = "19" type = "timeseries" query { query_name = "a" @@ -255,7 +255,7 @@ resource "lightstep_dashboard" "otel_collector_pulsar_dashboard" { chart { name = "Total Storage Size" - rank = "22" + rank = "20" type = "timeseries" query { query_name = "a" @@ -267,7 +267,7 @@ resource "lightstep_dashboard" "otel_collector_pulsar_dashboard" { chart { name = "Subscription Backlog" - rank = "30" + rank = "21" type = "timeseries" query { query_name = "a" @@ -279,7 +279,7 @@ resource "lightstep_dashboard" "otel_collector_pulsar_dashboard" { chart { name = "Subscription Consumers Count" - rank = "31" + rank = "22" type = "timeseries" query { query_name = "a" @@ -291,7 +291,7 @@ resource "lightstep_dashboard" "otel_collector_pulsar_dashboard" { chart { name = "Subscription Message Rate Out" - rank = "32" + rank = "23" type = "timeseries" query { query_name = "a"