Skip to content

Commit

Permalink
Scrape custom metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
johnake committed Jul 31, 2024
1 parent 9e0d8e6 commit 8027839
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 11 deletions.
24 changes: 13 additions & 11 deletions terraform/aks/app.tf
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,13 @@ module "ui_application" {
kubernetes_config_map_name = module.ui_application_configuration.kubernetes_config_map_name
kubernetes_secret_name = module.ui_application_configuration.kubernetes_secret_name

docker_image = var.docker_image
command = ["/bin/ash", "-c", "cd /Apps/SupportUi/; dotnet TeachingRecordSystem.SupportUi.dll;"]
web_port = 80
probe_path = "/health"
replicas = var.ui_replicas
enable_logit = var.enable_logit
docker_image = var.docker_image
command = ["/bin/ash", "-c", "cd /Apps/SupportUi/; dotnet TeachingRecordSystem.SupportUi.dll;"]
web_port = 80
probe_path = "/health"
replicas = var.ui_replicas
enable_logit = var.enable_logit
enable_prometheus_monitoring = var.enable_prometheus_monitoring
}

module "worker_application_configuration" {
Expand Down Expand Up @@ -242,9 +243,10 @@ module "worker_application" {
kubernetes_config_map_name = module.worker_application_configuration.kubernetes_config_map_name
kubernetes_secret_name = module.worker_application_configuration.kubernetes_secret_name

docker_image = var.docker_image
command = ["/bin/ash", "-c", "cd /Apps/Worker/; dotnet TeachingRecordSystem.Worker.dll;"]
replicas = var.worker_replicas
max_memory = var.worker_max_memory
enable_logit = var.enable_logit
docker_image = var.docker_image
command = ["/bin/ash", "-c", "cd /Apps/Worker/; dotnet TeachingRecordSystem.Worker.dll;"]
replicas = var.worker_replicas
max_memory = var.worker_max_memory
enable_logit = var.enable_logit
enable_prometheus_monitoring = var.enable_prometheus_monitoring
}
5 changes: 5 additions & 0 deletions terraform/aks/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ variable "enable_monitoring" {

variable "enable_logit" { default = false }

variable "enable_prometheus_monitoring" {
type = bool
default = false
}

variable "deploy_azure_backing_services" {
type = string
default = true
Expand Down
1 change: 1 addition & 0 deletions terraform/aks/workspace_variables/dev.tfvars.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"namespace": "tra-development",
"resource_group_name": "s189t01-trs-dv-rg",
"enable_monitoring": false,
"enable_prometheus_monitoring": true,
"deploy_dqt_reporting_server": true,
"run_dqt_reporting_service": true,
"run_recurring_jobs": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"namespace": "tra-test",
"resource_group_name": "s189t01-trs-pp-rg",
"enable_monitoring": false,
"enable_prometheus_monitoring": true,
"deploy_dqt_reporting_server": false,
"run_dqt_reporting_service": true,
"run_recurring_jobs": true,
Expand Down
1 change: 1 addition & 0 deletions terraform/aks/workspace_variables/production.tfvars.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"namespace": "tra-production",
"resource_group_name": "s189p01-trs-pd-rg",
"enable_monitoring": true,
"enable_prometheus_monitoring": true,
"deploy_dqt_reporting_server": false,
"run_dqt_reporting_service": true,
"run_recurring_jobs": true,
Expand Down
1 change: 1 addition & 0 deletions terraform/aks/workspace_variables/test.tfvars.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"namespace": "tra-test",
"resource_group_name": "s189t01-trs-ts-rg",
"enable_monitoring": false,
"enable_prometheus_monitoring": true,
"deploy_dqt_reporting_server": true,
"run_dqt_reporting_service": true,
"run_recurring_jobs": false,
Expand Down

0 comments on commit 8027839

Please sign in to comment.