Skip to content

Commit

Permalink
Merge branch 'main' into content-encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
aditsachde authored Sep 19, 2024
2 parents 870dc1e + 199c96c commit 5178510
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6
uses: github/codeql-action/init@8214744c546c1e5c8f03dde8fab3a7353211988d # v3.26.7
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -60,7 +60,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6
uses: github/codeql-action/autobuild@8214744c546c1e5c8f03dde8fab3a7353211988d # v3.26.7

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand All @@ -73,6 +73,6 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6
uses: github/codeql-action/analyze@8214744c546c1e5c8f03dde8fab3a7353211988d # v3.26.7
with:
category: "/language:${{matrix.language}}"
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6
uses: github/codeql-action/upload-sarif@8214744c546c1e5c8f03dde8fab3a7353211988d # v3.26.7
with:
sarif_file: results.sarif
1 change: 1 addition & 0 deletions deployment/live/monitoring/ci/terragrunt.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ inputs = merge(
include.root.locals,
{
alert_lt_num_witness_threshold = 0
num_expected_devices = 5
}
)

1 change: 1 addition & 0 deletions deployment/live/monitoring/dev/terragrunt.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ inputs = merge(
include.root.locals,
{
alert_lt_num_witness_threshold = 0
num_expected_devices = 2
}
)

1 change: 1 addition & 0 deletions deployment/live/monitoring/prod/terragrunt.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ inputs = merge(
{
alert_lt_num_witness_threshold = 10
alert_enable_num_witness = false
num_expected_devices = 15
}
)

35 changes: 35 additions & 0 deletions deployment/modules/monitoring/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,41 @@ resource "google_monitoring_dashboard" "witness_dashboard" {
}
}
},
{
"title": "Devices seen online",
"xyChart": {
"dataSets": [{
"timeSeriesQuery": {
"prometheusQuery": "count by (witness_id) (max by (instance_id, witness_id) (rate(distributor_update_checkpoint_request{configuration_name='distributor-service-${var.env}'}[$${__interval}]) > bool 0))"
},
"plotType": "STACKED_AREA"
}],
"timeshiftDuration": "0s",
"yAxis": {
"label": "Devices",
"scale": "LINEAR"
}
}
},
{
"title": "% online (assuming ${var.num_expected_devices} devices)",
"xyChart": {
"dataSets": [{
"timeSeriesQuery": {
"prometheusQuery": "count by (instance_id) (max by (instance_id, witness_id) (rate(distributor_update_checkpoint_request{configuration_name='distributor-service-${var.env}'}[$${__interval}]) > bool 0)) * 100 / ${var.num_expected_devices}"
},
"plotType": "STACKED_AREA"
}],
"thresholds": [{
"value": 51
}],
"timeshiftDuration": "0s",
"yAxis": {
"label": "%",
"scale": "LINEAR"
}
}
},
{
"title": "Witness liveness alert chart",
"alertChart": {
Expand Down
7 changes: 6 additions & 1 deletion deployment/modules/monitoring/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ variable "env" {
type = string
}

variable "num_expected_devices" {
description = "Number of expected devices"
type = number
}

variable "alert_lt_num_witness_threshold" {
description = "The lower bound alert threshold for the number of live witnesses, as measured by the distributor_update_checkpoint_success Prometheus metric."
type = number
Expand All @@ -37,4 +42,4 @@ variable "alert_lt_num_witness_threshold" {
variable "alert_enable_num_witness" {
description = "Whether to enable alert_lt_num_witness_threshold."
type = bool
}
}

0 comments on commit 5178510

Please sign in to comment.