From 2cb9c6ace795a1480e0e91619d045f51c9f38546 Mon Sep 17 00:00:00 2001 From: Heber Silva Date: Tue, 22 Aug 2023 13:26:07 -0400 Subject: [PATCH 1/2] added scylladb dashboard --- .../main.tf | 94 +++++++++++++++++++ .../outputs.tf | 4 + .../variables.tf | 4 + 3 files changed, 102 insertions(+) create mode 100644 collector-dashboards/otel-collector-scylladb-prom-receiver-dashboard/main.tf create mode 100644 collector-dashboards/otel-collector-scylladb-prom-receiver-dashboard/outputs.tf create mode 100644 collector-dashboards/otel-collector-scylladb-prom-receiver-dashboard/variables.tf diff --git a/collector-dashboards/otel-collector-scylladb-prom-receiver-dashboard/main.tf b/collector-dashboards/otel-collector-scylladb-prom-receiver-dashboard/main.tf new file mode 100644 index 0000000..b929bb0 --- /dev/null +++ b/collector-dashboards/otel-collector-scylladb-prom-receiver-dashboard/main.tf @@ -0,0 +1,94 @@ +terraform { + required_providers { + lightstep = { + source = "lightstep/lightstep" + version = "~> 1.70.10" + } + } + required_version = ">= v1.0.11" +} + +resource "lightstep_dashboard" "otel_collector_scylladb_dashboard" { + project_name = var.lightstep_project + dashboard_name = "OpenTelemetry ScyllaDB Dashboard" + dashboard_description = "Monitor ScyllaDB metrics with this summary dashboard." + + chart { + name = "UP" + rank = "0" + type = "timeseries" + + query { + query_name = "a" + display = "line" + hidden = false + query_string = "metric up | latest | group_by [], sum" + } + } + + chart { + name = "Scylla Query Requests" + rank = "1" + type = "timeseries" + + query { + query_name = "a" + display = "line" + hidden = false + query_string = "metric scylla_transport_query_requests | rate | group_by [], sum" + } + } + + chart { + name = "CQL Connections" + rank = "2" + type = "timeseries" + + query { + query_name = "a" + display = "line" + hidden = false + query_string = "metric scylla_transport_cql_connections | rate | group_by [], sum" + } + } + + chart { + name = "Total Incoming Bytes" + rank = "3" + type = "timeseries" + + query { + query_name = "a" + display = "line" + hidden = false + query_string = "metric scylla_streaming_total_incoming_bytes | rate | group_by [], sum" + } + } + + chart { + name = "Total Incoming Bytes" + rank = "3" + type = "timeseries" + + query { + query_name = "a" + display = "line" + hidden = false + query_string = "metric scylla_streaming_total_incoming_bytes | rate | group_by [], sum" + } + } + + chart { + name = "Total Outgoing Bytes" + rank = "4" + type = "timeseries" + + query { + query_name = "a" + display = "line" + hidden = false + query_string = "metric scylla_streaming_total_outgoing_bytes | rate | group_by [], sum" + } + } + +} \ No newline at end of file diff --git a/collector-dashboards/otel-collector-scylladb-prom-receiver-dashboard/outputs.tf b/collector-dashboards/otel-collector-scylladb-prom-receiver-dashboard/outputs.tf new file mode 100644 index 0000000..2a9aacd --- /dev/null +++ b/collector-dashboards/otel-collector-scylladb-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_scylladb_dashboard.id}" + description = "OpenTelemetry ScyllaDB Dashboard URL" +} diff --git a/collector-dashboards/otel-collector-scylladb-prom-receiver-dashboard/variables.tf b/collector-dashboards/otel-collector-scylladb-prom-receiver-dashboard/variables.tf new file mode 100644 index 0000000..21ee69f --- /dev/null +++ b/collector-dashboards/otel-collector-scylladb-prom-receiver-dashboard/variables.tf @@ -0,0 +1,4 @@ +variable "lightstep_project" { + description = "Name of Lightstep project" + type = string +} From 39d04d382169de195f17f602b33265d1606a7bfd Mon Sep 17 00:00:00 2001 From: Heber Silva Date: Tue, 19 Sep 2023 08:17:27 -0400 Subject: [PATCH 2/2] removed duplicate --- .../main.tf | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/collector-dashboards/otel-collector-scylladb-prom-receiver-dashboard/main.tf b/collector-dashboards/otel-collector-scylladb-prom-receiver-dashboard/main.tf index b929bb0..78015e1 100644 --- a/collector-dashboards/otel-collector-scylladb-prom-receiver-dashboard/main.tf +++ b/collector-dashboards/otel-collector-scylladb-prom-receiver-dashboard/main.tf @@ -65,19 +65,6 @@ resource "lightstep_dashboard" "otel_collector_scylladb_dashboard" { } } - chart { - name = "Total Incoming Bytes" - rank = "3" - type = "timeseries" - - query { - query_name = "a" - display = "line" - hidden = false - query_string = "metric scylla_streaming_total_incoming_bytes | rate | group_by [], sum" - } - } - chart { name = "Total Outgoing Bytes" rank = "4"