From 2195e9b7ebaeee3a8ea192aa617e2b0a10b3cdff Mon Sep 17 00:00:00 2001 From: Dmitry Avdeev Date: Thu, 27 Jul 2023 09:12:32 -0700 Subject: [PATCH 1/5] azure storage examples and dashboards --- azure/Makefile.Common | 2 +- azure/README.md | 2 +- azure/compute_disks/example/tf/Makefile | 26 ++ .../example/tf/Makefile | 26 ++ .../example/tf/Makefile | 26 ++ .../example/tf/Makefile | 26 ++ .../dbformariadb_servers/example/tf/Makefile | 26 ++ .../example/tf/Makefile | 26 ++ azure/dbformysql_servers/example/tf/Makefile | 26 ++ .../example/tf/Makefile | 26 ++ .../example/tf/Makefile | 26 ++ .../example/tf/Makefile | 26 ++ .../example/tf/Makefile | 26 ++ .../example/tf/Makefile | 26 ++ .../sql_managedinstances/example/tf/Makefile | 26 ++ .../sql_servers_databases/example/tf/Makefile | 26 ++ .../example/tf/Makefile | 26 ++ .../{example => examples}/tf/Makefile | 2 +- .../{example => examples}/tf/collector.yaml | 0 .../{example => examples}/tf/main.tf | 2 +- .../dashboards/overview/main.tf | 226 ++++++++++++++++++ .../examples/tf/Makefile | 4 + .../examples/tf/collector.yaml | 29 +++ .../examples/tf/main.tf | 35 +++ .../metrics.csv | 12 + .../dashboards/overview/main.tf | 226 ++++++++++++++++++ .../examples/tf/Makefile | 4 + .../examples/tf/collector.yaml | 29 +++ .../examples/tf/main.tf | 32 +++ .../metrics.csv | 14 ++ .../dashboards/overview/main.tf | 85 +++++++ .../examples/tf/Makefile | 4 + .../examples/tf/collector.yaml | 29 +++ .../examples/tf/main.tf | 63 +++++ .../metrics.csv | 3 + .../dashboards/overview/main.tf | 199 +++++++++++++++ .../examples/tf/Makefile | 4 + .../examples/tf/collector.yaml | 29 +++ .../examples/tf/main.tf | 26 ++ .../metrics.csv | 10 + .../dashboards/overview/main.tf | 106 ++++++++ .../metrics.csv | 4 + .../dashboards/overview/main.tf | 199 +++++++++++++++ .../examples/tf/Makefile | 4 + .../examples/tf/collector.yaml | 29 +++ .../examples/tf/main.tf | 26 ++ .../metrics.csv | 10 + 47 files changed, 1835 insertions(+), 4 deletions(-) create mode 100644 azure/compute_disks/example/tf/Makefile create mode 100644 azure/compute_virtualmachines/example/tf/Makefile create mode 100644 azure/containerregistry_registries/example/tf/Makefile create mode 100644 azure/containerservice_managedclusters/example/tf/Makefile create mode 100644 azure/dbformariadb_servers/example/tf/Makefile create mode 100644 azure/dbformysql_flexibleservers/example/tf/Makefile create mode 100644 azure/dbformysql_servers/example/tf/Makefile create mode 100644 azure/dbforpostgresql_flexibleservers/example/tf/Makefile create mode 100644 azure/dbforpostgresql_servers/example/tf/Makefile create mode 100644 azure/documentdb_cassandraclusters/example/tf/Makefile create mode 100644 azure/documentdb_databaseaccounts/example/tf/Makefile create mode 100644 azure/network_networkinterfaces/example/tf/Makefile create mode 100644 azure/sql_managedinstances/example/tf/Makefile create mode 100644 azure/sql_servers_databases/example/tf/Makefile create mode 100644 azure/sql_servers_elasticpools/example/tf/Makefile rename azure/storage_storageaccounts/{example => examples}/tf/Makefile (92%) rename azure/storage_storageaccounts/{example => examples}/tf/collector.yaml (100%) rename azure/storage_storageaccounts/{example => examples}/tf/main.tf (96%) create mode 100644 azure/storage_storageaccounts_blobservices/dashboards/overview/main.tf create mode 100644 azure/storage_storageaccounts_blobservices/examples/tf/Makefile create mode 100644 azure/storage_storageaccounts_blobservices/examples/tf/collector.yaml create mode 100644 azure/storage_storageaccounts_blobservices/examples/tf/main.tf create mode 100644 azure/storage_storageaccounts_blobservices/metrics.csv create mode 100644 azure/storage_storageaccounts_fileservices/dashboards/overview/main.tf create mode 100644 azure/storage_storageaccounts_fileservices/examples/tf/Makefile create mode 100644 azure/storage_storageaccounts_fileservices/examples/tf/collector.yaml create mode 100644 azure/storage_storageaccounts_fileservices/examples/tf/main.tf create mode 100644 azure/storage_storageaccounts_fileservices/metrics.csv create mode 100644 azure/storage_storageaccounts_objectreplicationpolicies/dashboards/overview/main.tf create mode 100644 azure/storage_storageaccounts_objectreplicationpolicies/examples/tf/Makefile create mode 100644 azure/storage_storageaccounts_objectreplicationpolicies/examples/tf/collector.yaml create mode 100644 azure/storage_storageaccounts_objectreplicationpolicies/examples/tf/main.tf create mode 100644 azure/storage_storageaccounts_objectreplicationpolicies/metrics.csv create mode 100644 azure/storage_storageaccounts_queueservices/dashboards/overview/main.tf create mode 100644 azure/storage_storageaccounts_queueservices/examples/tf/Makefile create mode 100644 azure/storage_storageaccounts_queueservices/examples/tf/collector.yaml create mode 100644 azure/storage_storageaccounts_queueservices/examples/tf/main.tf create mode 100644 azure/storage_storageaccounts_queueservices/metrics.csv create mode 100644 azure/storage_storageaccounts_storagetasks/dashboards/overview/main.tf create mode 100644 azure/storage_storageaccounts_storagetasks/metrics.csv create mode 100644 azure/storage_storageaccounts_tableservices/dashboards/overview/main.tf create mode 100644 azure/storage_storageaccounts_tableservices/examples/tf/Makefile create mode 100644 azure/storage_storageaccounts_tableservices/examples/tf/collector.yaml create mode 100644 azure/storage_storageaccounts_tableservices/examples/tf/main.tf create mode 100644 azure/storage_storageaccounts_tableservices/metrics.csv diff --git a/azure/Makefile.Common b/azure/Makefile.Common index 2f27690..1d85561 100644 --- a/azure/Makefile.Common +++ b/azure/Makefile.Common @@ -19,7 +19,7 @@ destroy-terraform: .PHONY: run-collector run-collector: - docker run -d --name=$(EXAMPLE_NAME) -v ./:/conf/ -e AZURE_CLIENT_ID=${AZURE_CLIENT_ID} -e AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} -e AZURE_SUBSCRIPTION_ID=${AZURE_SUBSCRIPTION_ID} -e AZURE_TENANT_ID=${AZURE_TENANT_ID} -e LS_ACCESS_TOKEN=${LS_ACCESS_TOKEN} otel/opentelemetry-collector-contrib:0.79.0 --config=/conf/collector.yaml + docker run -d --name=$(EXAMPLE_NAME) -v ./:/conf/ -e AZURE_CLIENT_ID=${AZURE_CLIENT_ID} -e AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} -e AZURE_SUBSCRIPTION_ID=${AZURE_SUBSCRIPTION_ID} -e AZURE_TENANT_ID=${AZURE_TENANT_ID} -e LS_ACCESS_TOKEN=${LS_ACCESS_TOKEN} otel/opentelemetry-collector-contrib:0.81.0 --config=/conf/collector.yaml .PHONY: stop-collector stop-collector: diff --git a/azure/README.md b/azure/README.md index 216df26..5a30c90 100644 --- a/azure/README.md +++ b/azure/README.md @@ -39,7 +39,7 @@ Detailed description of available [Azure metrics per service](https://learn.micr Collector Azure Monitor receiver has to be configured to capture required Azure resources, [configuration description](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/azuremonitorreceiver#configuration). -The following example configuration collects metrics from Kong and send them to Lightstep Observability: +The following example configuration collects metrics from Azure and send them to Lightstep Observability: ```yaml receivers: diff --git a/azure/compute_disks/example/tf/Makefile b/azure/compute_disks/example/tf/Makefile new file mode 100644 index 0000000..368fe35 --- /dev/null +++ b/azure/compute_disks/example/tf/Makefile @@ -0,0 +1,26 @@ + +.PHONY: run +run: apply-terraform run-collector + +.PHONY: stop +stop: stop-collector destroy-terraform + +.PHONY: get-logs +get-logs: + docker logs azure-collector-disks >& ../../logs.txt + +.PHONY: apply-terraform +apply-terraform: + terraform init && terraform apply --auto-approve + +.PHONY: destroy-terraform +destroy-terraform: + terraform destroy --auto-approve + +.PHONY: run-collector +run-collector: + docker run -d --name=azure-collector-disks -v ./:/conf/ -e AZURE_CLIENT_ID=${AZURE_CLIENT_ID} -e AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} -e AZURE_SUBSCRIPTION_ID=${AZURE_SUBSCRIPTION_ID} -e AZURE_TENANT_ID=${AZURE_TENANT_ID} -e LS_ACCESS_TOKEN=${LS_ACCESS_TOKEN} otel/opentelemetry-collector-contrib:0.81.0 --config=/conf/collector.yaml + +.PHONY: stop-collector +stop-collector: + docker rm -f azure-collector-disks diff --git a/azure/compute_virtualmachines/example/tf/Makefile b/azure/compute_virtualmachines/example/tf/Makefile new file mode 100644 index 0000000..8f3d0a8 --- /dev/null +++ b/azure/compute_virtualmachines/example/tf/Makefile @@ -0,0 +1,26 @@ + +.PHONY: run +run: apply-terraform run-collector + +.PHONY: stop +stop: stop-collector destroy-terraform + +.PHONY: get-logs +get-logs: + docker logs azure-collector-vm >& ../../logs.txt + +.PHONY: apply-terraform +apply-terraform: + terraform init && terraform apply --auto-approve + +.PHONY: destroy-terraform +destroy-terraform: + terraform destroy --auto-approve + +.PHONY: run-collector +run-collector: + docker run -d --name=azure-collector-vm -v ./:/conf/ -e AZURE_CLIENT_ID=${AZURE_CLIENT_ID} -e AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} -e AZURE_SUBSCRIPTION_ID=${AZURE_SUBSCRIPTION_ID} -e AZURE_TENANT_ID=${AZURE_TENANT_ID} -e LS_ACCESS_TOKEN=${LS_ACCESS_TOKEN} otel/opentelemetry-collector-contrib:0.81.0 --config=/conf/collector.yaml + +.PHONY: stop-collector +stop-collector: + docker rm -f azure-collector-vm diff --git a/azure/containerregistry_registries/example/tf/Makefile b/azure/containerregistry_registries/example/tf/Makefile new file mode 100644 index 0000000..45ab63f --- /dev/null +++ b/azure/containerregistry_registries/example/tf/Makefile @@ -0,0 +1,26 @@ + +.PHONY: run +run: apply-terraform run-collector + +.PHONY: stop +stop: stop-collector destroy-terraform + +.PHONY: get-logs +get-logs: + docker logs azure-collector-registry >& ../../logs.txt + +.PHONY: apply-terraform +apply-terraform: + terraform init && terraform apply --auto-approve + +.PHONY: destroy-terraform +destroy-terraform: + terraform destroy --auto-approve + +.PHONY: run-collector +run-collector: + docker run -d --name=azure-collector-registry -v ./:/conf/ -e AZURE_CLIENT_ID=${AZURE_CLIENT_ID} -e AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} -e AZURE_SUBSCRIPTION_ID=${AZURE_SUBSCRIPTION_ID} -e AZURE_TENANT_ID=${AZURE_TENANT_ID} -e LS_ACCESS_TOKEN=${LS_ACCESS_TOKEN} otel/opentelemetry-collector-contrib:0.81.0 --config=/conf/collector.yaml + +.PHONY: stop-collector +stop-collector: + docker rm -f azure-collector-registry diff --git a/azure/containerservice_managedclusters/example/tf/Makefile b/azure/containerservice_managedclusters/example/tf/Makefile new file mode 100644 index 0000000..adc67d7 --- /dev/null +++ b/azure/containerservice_managedclusters/example/tf/Makefile @@ -0,0 +1,26 @@ + +.PHONY: run +run: apply-terraform run-collector + +.PHONY: stop +stop: stop-collector destroy-terraform + +.PHONY: get-logs +get-logs: + docker logs azure-collector-container-cluster >& ../../logs.txt + +.PHONY: apply-terraform +apply-terraform: + terraform init && terraform apply --auto-approve + +.PHONY: destroy-terraform +destroy-terraform: + terraform destroy --auto-approve + +.PHONY: run-collector +run-collector: + docker run -d --name=azure-collector-container-cluster -v ./:/conf/ -e AZURE_CLIENT_ID=${AZURE_CLIENT_ID} -e AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} -e AZURE_SUBSCRIPTION_ID=${AZURE_SUBSCRIPTION_ID} -e AZURE_TENANT_ID=${AZURE_TENANT_ID} -e LS_ACCESS_TOKEN=${LS_ACCESS_TOKEN} otel/opentelemetry-collector-contrib:0.81.0 --config=/conf/collector.yaml + +.PHONY: stop-collector +stop-collector: + docker rm -f azure-collector-container-cluster diff --git a/azure/dbformariadb_servers/example/tf/Makefile b/azure/dbformariadb_servers/example/tf/Makefile new file mode 100644 index 0000000..5396d25 --- /dev/null +++ b/azure/dbformariadb_servers/example/tf/Makefile @@ -0,0 +1,26 @@ + +.PHONY: run +run: apply-terraform run-collector + +.PHONY: stop +stop: stop-collector destroy-terraform + +.PHONY: get-logs +get-logs: + docker logs azure-collector-maria >& ../../logs.txt + +.PHONY: apply-terraform +apply-terraform: + terraform init && terraform apply --auto-approve + +.PHONY: destroy-terraform +destroy-terraform: + terraform destroy --auto-approve + +.PHONY: run-collector +run-collector: + docker run -d --name=azure-collector-maria -v ./:/conf/ -e AZURE_CLIENT_ID=${AZURE_CLIENT_ID} -e AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} -e AZURE_SUBSCRIPTION_ID=${AZURE_SUBSCRIPTION_ID} -e AZURE_TENANT_ID=${AZURE_TENANT_ID} -e LS_ACCESS_TOKEN=${LS_ACCESS_TOKEN} otel/opentelemetry-collector-contrib:0.81.0 --config=/conf/collector.yaml + +.PHONY: stop-collector +stop-collector: + docker rm -f azure-collector-maria diff --git a/azure/dbformysql_flexibleservers/example/tf/Makefile b/azure/dbformysql_flexibleservers/example/tf/Makefile new file mode 100644 index 0000000..cf14eaa --- /dev/null +++ b/azure/dbformysql_flexibleservers/example/tf/Makefile @@ -0,0 +1,26 @@ + +.PHONY: run +run: apply-terraform run-collector + +.PHONY: stop +stop: stop-collector destroy-terraform + +.PHONY: get-logs +get-logs: + docker logs azure-collector-mysql-flexible >& ../../logs.txt + +.PHONY: apply-terraform +apply-terraform: + terraform init && terraform apply --auto-approve + +.PHONY: destroy-terraform +destroy-terraform: + terraform destroy --auto-approve + +.PHONY: run-collector +run-collector: + docker run -d --name=azure-collector-mysql-flexible -v ./:/conf/ -e AZURE_CLIENT_ID=${AZURE_CLIENT_ID} -e AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} -e AZURE_SUBSCRIPTION_ID=${AZURE_SUBSCRIPTION_ID} -e AZURE_TENANT_ID=${AZURE_TENANT_ID} -e LS_ACCESS_TOKEN=${LS_ACCESS_TOKEN} otel/opentelemetry-collector-contrib:0.81.0 --config=/conf/collector.yaml + +.PHONY: stop-collector +stop-collector: + docker rm -f azure-collector-mysql-flexible diff --git a/azure/dbformysql_servers/example/tf/Makefile b/azure/dbformysql_servers/example/tf/Makefile new file mode 100644 index 0000000..288f449 --- /dev/null +++ b/azure/dbformysql_servers/example/tf/Makefile @@ -0,0 +1,26 @@ + +.PHONY: run +run: apply-terraform run-collector + +.PHONY: stop +stop: stop-collector destroy-terraform + +.PHONY: get-logs +get-logs: + docker logs azure-collector-mysql >& ../../logs.txt + +.PHONY: apply-terraform +apply-terraform: + terraform init && terraform apply --auto-approve + +.PHONY: destroy-terraform +destroy-terraform: + terraform destroy --auto-approve + +.PHONY: run-collector +run-collector: + docker run -d --name=azure-collector-mysql -v ./:/conf/ -e AZURE_CLIENT_ID=${AZURE_CLIENT_ID} -e AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} -e AZURE_SUBSCRIPTION_ID=${AZURE_SUBSCRIPTION_ID} -e AZURE_TENANT_ID=${AZURE_TENANT_ID} -e LS_ACCESS_TOKEN=${LS_ACCESS_TOKEN} otel/opentelemetry-collector-contrib:0.81.0 --config=/conf/collector.yaml + +.PHONY: stop-collector +stop-collector: + docker rm -f azure-collector-mysql diff --git a/azure/dbforpostgresql_flexibleservers/example/tf/Makefile b/azure/dbforpostgresql_flexibleservers/example/tf/Makefile new file mode 100644 index 0000000..f45099e --- /dev/null +++ b/azure/dbforpostgresql_flexibleservers/example/tf/Makefile @@ -0,0 +1,26 @@ + +.PHONY: run +run: apply-terraform run-collector + +.PHONY: stop +stop: stop-collector destroy-terraform + +.PHONY: get-logs +get-logs: + docker logs azure-collector-postgresql-flexible >& ../../logs.txt + +.PHONY: apply-terraform +apply-terraform: + terraform init && terraform apply --auto-approve + +.PHONY: destroy-terraform +destroy-terraform: + terraform destroy --auto-approve + +.PHONY: run-collector +run-collector: + docker run -d --name=azure-collector-postgresql-flexible -v ./:/conf/ -e AZURE_CLIENT_ID=${AZURE_CLIENT_ID} -e AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} -e AZURE_SUBSCRIPTION_ID=${AZURE_SUBSCRIPTION_ID} -e AZURE_TENANT_ID=${AZURE_TENANT_ID} -e LS_ACCESS_TOKEN=${LS_ACCESS_TOKEN} otel/opentelemetry-collector-contrib:0.81.0 --config=/conf/collector.yaml + +.PHONY: stop-collector +stop-collector: + docker rm -f azure-collector-postgresql-flexible diff --git a/azure/dbforpostgresql_servers/example/tf/Makefile b/azure/dbforpostgresql_servers/example/tf/Makefile new file mode 100644 index 0000000..a8f6be2 --- /dev/null +++ b/azure/dbforpostgresql_servers/example/tf/Makefile @@ -0,0 +1,26 @@ + +.PHONY: run +run: apply-terraform run-collector + +.PHONY: stop +stop: stop-collector destroy-terraform + +.PHONY: get-logs +get-logs: + docker logs azure-collector-postgresql >& ../../logs.txt + +.PHONY: apply-terraform +apply-terraform: + terraform init && terraform apply --auto-approve + +.PHONY: destroy-terraform +destroy-terraform: + terraform destroy --auto-approve + +.PHONY: run-collector +run-collector: + docker run -d --name=azure-collector-postgresql -v ./:/conf/ -e AZURE_CLIENT_ID=${AZURE_CLIENT_ID} -e AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} -e AZURE_SUBSCRIPTION_ID=${AZURE_SUBSCRIPTION_ID} -e AZURE_TENANT_ID=${AZURE_TENANT_ID} -e LS_ACCESS_TOKEN=${LS_ACCESS_TOKEN} otel/opentelemetry-collector-contrib:0.81.0 --config=/conf/collector.yaml + +.PHONY: stop-collector +stop-collector: + docker rm -f azure-collector-postgresql diff --git a/azure/documentdb_cassandraclusters/example/tf/Makefile b/azure/documentdb_cassandraclusters/example/tf/Makefile new file mode 100644 index 0000000..cf9df4c --- /dev/null +++ b/azure/documentdb_cassandraclusters/example/tf/Makefile @@ -0,0 +1,26 @@ + +.PHONY: run +run: apply-terraform run-collector + +.PHONY: stop +stop: stop-collector destroy-terraform + +.PHONY: get-logs +get-logs: + docker logs azure-collector-documentdb-cassandra-cluster >& ../../logs.txt + +.PHONY: apply-terraform +apply-terraform: + terraform init && terraform apply --auto-approve + +.PHONY: destroy-terraform +destroy-terraform: + terraform destroy --auto-approve + +.PHONY: run-collector +run-collector: + docker run -d --name=azure-collector-documentdb-cassandra-cluster -v ./:/conf/ -e AZURE_CLIENT_ID=${AZURE_CLIENT_ID} -e AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} -e AZURE_SUBSCRIPTION_ID=${AZURE_SUBSCRIPTION_ID} -e AZURE_TENANT_ID=${AZURE_TENANT_ID} -e LS_ACCESS_TOKEN=${LS_ACCESS_TOKEN} otel/opentelemetry-collector-contrib:0.81.0 --config=/conf/collector.yaml + +.PHONY: stop-collector +stop-collector: + docker rm -f azure-collector-documentdb-cassandra-cluster diff --git a/azure/documentdb_databaseaccounts/example/tf/Makefile b/azure/documentdb_databaseaccounts/example/tf/Makefile new file mode 100644 index 0000000..8906ff5 --- /dev/null +++ b/azure/documentdb_databaseaccounts/example/tf/Makefile @@ -0,0 +1,26 @@ + +.PHONY: run +run: apply-terraform run-collector + +.PHONY: stop +stop: stop-collector destroy-terraform + +.PHONY: get-logs +get-logs: + docker logs azure-collector-documentdb-databaseaccounts >& ../../logs.txt + +.PHONY: apply-terraform +apply-terraform: + terraform init && terraform apply --auto-approve + +.PHONY: destroy-terraform +destroy-terraform: + terraform destroy --auto-approve + +.PHONY: run-collector +run-collector: + docker run -d --name=azure-collector-documentdb-databaseaccounts -v ./:/conf/ -e AZURE_CLIENT_ID=${AZURE_CLIENT_ID} -e AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} -e AZURE_SUBSCRIPTION_ID=${AZURE_SUBSCRIPTION_ID} -e AZURE_TENANT_ID=${AZURE_TENANT_ID} -e LS_ACCESS_TOKEN=${LS_ACCESS_TOKEN} otel/opentelemetry-collector-contrib:0.81.0 --config=/conf/collector.yaml + +.PHONY: stop-collector +stop-collector: + docker rm -f azure-collector-documentdb-databaseaccounts diff --git a/azure/network_networkinterfaces/example/tf/Makefile b/azure/network_networkinterfaces/example/tf/Makefile new file mode 100644 index 0000000..11f4ffa --- /dev/null +++ b/azure/network_networkinterfaces/example/tf/Makefile @@ -0,0 +1,26 @@ + +.PHONY: run +run: apply-terraform run-collector + +.PHONY: stop +stop: stop-collector destroy-terraform + +.PHONY: get-logs +get-logs: + docker logs azure-collector-netint >& ../../logs.txt + +.PHONY: apply-terraform +apply-terraform: + terraform init && terraform apply --auto-approve + +.PHONY: destroy-terraform +destroy-terraform: + terraform destroy --auto-approve + +.PHONY: run-collector +run-collector: + docker run -d --name=azure-collector-netint -v ./:/conf/ -e AZURE_CLIENT_ID=${AZURE_CLIENT_ID} -e AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} -e AZURE_SUBSCRIPTION_ID=${AZURE_SUBSCRIPTION_ID} -e AZURE_TENANT_ID=${AZURE_TENANT_ID} -e LS_ACCESS_TOKEN=${LS_ACCESS_TOKEN} otel/opentelemetry-collector-contrib:0.81.0 --config=/conf/collector.yaml + +.PHONY: stop-collector +stop-collector: + docker rm -f azure-collector-netint diff --git a/azure/sql_managedinstances/example/tf/Makefile b/azure/sql_managedinstances/example/tf/Makefile new file mode 100644 index 0000000..3888305 --- /dev/null +++ b/azure/sql_managedinstances/example/tf/Makefile @@ -0,0 +1,26 @@ + +.PHONY: run +run: apply-terraform run-collector + +.PHONY: stop +stop: stop-collector destroy-terraform + +.PHONY: get-logs +get-logs: + docker logs azure-collector-sql-server-mi >& ../../logs.txt + +.PHONY: apply-terraform +apply-terraform: + terraform init && terraform apply --auto-approve + +.PHONY: destroy-terraform +destroy-terraform: + terraform destroy --auto-approve + +.PHONY: run-collector +run-collector: + docker run -d --name=azure-collector-sql-server-mi -v ./:/conf/ -e AZURE_CLIENT_ID=${AZURE_CLIENT_ID} -e AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} -e AZURE_SUBSCRIPTION_ID=${AZURE_SUBSCRIPTION_ID} -e AZURE_TENANT_ID=${AZURE_TENANT_ID} -e LS_ACCESS_TOKEN=${LS_ACCESS_TOKEN} otel/opentelemetry-collector-contrib:0.81.0 --config=/conf/collector.yaml + +.PHONY: stop-collector +stop-collector: + docker rm -f azure-collector-sql-server-mi diff --git a/azure/sql_servers_databases/example/tf/Makefile b/azure/sql_servers_databases/example/tf/Makefile new file mode 100644 index 0000000..81233b1 --- /dev/null +++ b/azure/sql_servers_databases/example/tf/Makefile @@ -0,0 +1,26 @@ + +.PHONY: run +run: apply-terraform run-collector + +.PHONY: stop +stop: stop-collector destroy-terraform + +.PHONY: get-logs +get-logs: + docker logs azure-collector-sql-srv >& ../../logs.txt + +.PHONY: apply-terraform +apply-terraform: + terraform init && terraform apply --auto-approve + +.PHONY: destroy-terraform +destroy-terraform: + terraform destroy --auto-approve + +.PHONY: run-collector +run-collector: + docker run -d --name=azure-collector-sql-srv -v ./:/conf/ -e AZURE_CLIENT_ID=${AZURE_CLIENT_ID} -e AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} -e AZURE_SUBSCRIPTION_ID=${AZURE_SUBSCRIPTION_ID} -e AZURE_TENANT_ID=${AZURE_TENANT_ID} -e LS_ACCESS_TOKEN=${LS_ACCESS_TOKEN} otel/opentelemetry-collector-contrib:0.81.0 --config=/conf/collector.yaml + +.PHONY: stop-collector +stop-collector: + docker rm -f azure-collector-sql-srv diff --git a/azure/sql_servers_elasticpools/example/tf/Makefile b/azure/sql_servers_elasticpools/example/tf/Makefile new file mode 100644 index 0000000..6932c31 --- /dev/null +++ b/azure/sql_servers_elasticpools/example/tf/Makefile @@ -0,0 +1,26 @@ + +.PHONY: run +run: apply-terraform run-collector + +.PHONY: stop +stop: stop-collector destroy-terraform + +.PHONY: get-logs +get-logs: + docker logs azure-collector-sql-server-elasticpool >& ../../logs.txt + +.PHONY: apply-terraform +apply-terraform: + terraform init && terraform apply --auto-approve + +.PHONY: destroy-terraform +destroy-terraform: + terraform destroy --auto-approve + +.PHONY: run-collector +run-collector: + docker run -d --name=azure-collector-sql-server-elasticpool -v ./:/conf/ -e AZURE_CLIENT_ID=${AZURE_CLIENT_ID} -e AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} -e AZURE_SUBSCRIPTION_ID=${AZURE_SUBSCRIPTION_ID} -e AZURE_TENANT_ID=${AZURE_TENANT_ID} -e LS_ACCESS_TOKEN=${LS_ACCESS_TOKEN} otel/opentelemetry-collector-contrib:0.81.0 --config=/conf/collector.yaml + +.PHONY: stop-collector +stop-collector: + docker rm -f azure-collector-sql-server-elasticpool diff --git a/azure/storage_storageaccounts/example/tf/Makefile b/azure/storage_storageaccounts/examples/tf/Makefile similarity index 92% rename from azure/storage_storageaccounts/example/tf/Makefile rename to azure/storage_storageaccounts/examples/tf/Makefile index c582751..e1de79a 100644 --- a/azure/storage_storageaccounts/example/tf/Makefile +++ b/azure/storage_storageaccounts/examples/tf/Makefile @@ -19,7 +19,7 @@ destroy-terraform: .PHONY: run-collector run-collector: - docker run -d --name=azure-collector-storage -v ./:/conf/ -e AZURE_CLIENT_ID=${AZURE_CLIENT_ID} -e AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} -e AZURE_SUBSCRIPTION_ID=${AZURE_SUBSCRIPTION_ID} -e AZURE_TENANT_ID=${AZURE_TENANT_ID} -e LS_ACCESS_TOKEN=${LS_ACCESS_TOKEN} otel/opentelemetry-collector-contrib:0.79.0 --config=/conf/collector.yaml + docker run -d --name=azure-collector-storage -v ./:/conf/ -e AZURE_CLIENT_ID=${AZURE_CLIENT_ID} -e AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} -e AZURE_SUBSCRIPTION_ID=${AZURE_SUBSCRIPTION_ID} -e AZURE_TENANT_ID=${AZURE_TENANT_ID} -e LS_ACCESS_TOKEN=${LS_ACCESS_TOKEN} otel/opentelemetry-collector-contrib:0.81.0 --config=/conf/collector.yaml .PHONY: stop-collector stop-collector: diff --git a/azure/storage_storageaccounts/example/tf/collector.yaml b/azure/storage_storageaccounts/examples/tf/collector.yaml similarity index 100% rename from azure/storage_storageaccounts/example/tf/collector.yaml rename to azure/storage_storageaccounts/examples/tf/collector.yaml diff --git a/azure/storage_storageaccounts/example/tf/main.tf b/azure/storage_storageaccounts/examples/tf/main.tf similarity index 96% rename from azure/storage_storageaccounts/example/tf/main.tf rename to azure/storage_storageaccounts/examples/tf/main.tf index 729287a..49417d3 100644 --- a/azure/storage_storageaccounts/example/tf/main.tf +++ b/azure/storage_storageaccounts/examples/tf/main.tf @@ -4,7 +4,7 @@ provider "azurerm" { variable "prefix" { description = "A prefix used for all resources in this example" - default = "example-storage-account" + default = "ex-storage-account" } resource "azurerm_resource_group" "example" { diff --git a/azure/storage_storageaccounts_blobservices/dashboards/overview/main.tf b/azure/storage_storageaccounts_blobservices/dashboards/overview/main.tf new file mode 100644 index 0000000..77b01df --- /dev/null +++ b/azure/storage_storageaccounts_blobservices/dashboards/overview/main.tf @@ -0,0 +1,226 @@ +terraform { + required_providers { + lightstep = { + source = "lightstep/lightstep" + version = "~> 1.76.0" + } + } + required_version = ">= v1.0.11" +} + +variable "lightstep_project" { + description = "Lightstep Project Name" + type = string +} + +output "dashboard_url" { + value = "https://app.lightstep.com/${var.lightstep_project}/dashboard/${lightstep_dashboard.otel_collector_dashboard.id}" + description = "OpenTelemetry Collector Storage Blob Services Dashboard URL" +} + +resource "lightstep_dashboard" "otel_collector_dashboard" { + project_name = var.lightstep_project + dashboard_name = "Storage Blob Services Metrics" + dashboard_description = "Monitor Storage Blob Services with this metrics overview dashboard." + + chart { + name = "Availability" + rank = "0" + type = "timeseries" + + query { + query_name = "a" + display = "line" + hidden = false + query_string = <