feat(observability): implement cert and http checks
Description
This PR introduces http and cert_check Terraform support. Once an HTTP or certificate check is created, you can query thanos within the observability stack for metrics (e.g http_response_result_code) and create alerts based on them.
APIs: https://docs.api.stackit.cloud/documentation/argus/version/v1#tag/http-check https://docs.api.stackit.cloud/documentation/argus/version/v1#tag/cert-check
E2E Tests
resource "stackit_observability_instance" "example" {
project_id = var.stackit_project_id
name = "example-instance"
plan_name = "Observability-Medium-EU01"
alert_config = null
}
resource "stackit_observability_http_check" "http_check" {
project_id = var.stackit_project_id
instance_id = stackit_observability_instance.example.instance_id
url = "https://www.example.de"
}
data "stackit_observability_http_check" "test" {
project_id = var.stackit_project_id
instance_id = stackit_observability_instance.example.instance_id
http_check_id = stackit_observability_http_check.http_check.http_check_id
}
resource "stackit_observability_http_check" "http_check_2" {
project_id = var.stackit_project_id
instance_id = stackit_observability_instance.example.instance_id
url = "https://www.stackit.de"
}
resource "stackit_observability_cert_check" "cert_check" {
project_id = var.stackit_project_id
instance_id = stackit_observability_instance.example.instance_id
source = "tcp://stackit.de:443"
}
data "stackit_observability_cert_check" "test" {
project_id = var.stackit_project_id
instance_id = stackit_observability_instance.example.instance_id
cert_check_id = stackit_observability_cert_check.cert_check.cert_check_id
}
Checklist
- [x] Issue was linked above
- [x] Code format was applied:
make fmt - [x] Examples were added / adjusted (see
examples/directory) - [x] Docs are up-to-date:
make generate-docs(will be checked by CI) - [x] Unit tests got implemented or updated
- [x] Acceptance tests got implemented or updated (see e.g. here)
- [x] Unit tests are passing:
make test(will be checked by CI) - [x] No linter issues:
make lint(will be checked by CI)
E2E Test Result:
This PR was marked as stale after 7 days of inactivity and will be closed after another 7 days of further inactivity. If this PR should be kept open, just add a comment, remove the stale label or push new commits to it.
This PR was marked as stale after 7 days of inactivity and will be closed after another 7 days of further inactivity. If this PR should be kept open, just add a comment, remove the stale label or push new commits to it.
Waiting for answer from obs-team
This PR was marked as stale after 7 days of inactivity and will be closed after another 7 days of further inactivity. If this PR should be kept open, just add a comment, remove the stale label or push new commits to it.
This PR was marked as stale after 7 days of inactivity and will be closed after another 7 days of further inactivity. If this PR should be kept open, just add a comment, remove the stale label or push new commits to it.