The purpose of this repository is to automate the creation of Synthetic Monitors, Management Zones, SLOS and Dashboards within Dynatrace, by querying Ingress objects in each environment on the CFT Kubernetes clusters
- Terraform
Components defined in Terraform to build associated infrastructure - Python and Bash scripts
These scripts are used to:- Autogenerate yaml files per-environment based on Ingress objects withiin clusters, to update Terraform configuration files
- Create Pull Requests if there are changes to Ingress objects within clusters
- Azure pipelines
- Daily - Runs each morning at 7AM to fetch latest changes
- Deployment - Deploy infrastructure changes and update dahsboards
- Github Actions
We use Github Actions to run:- Pre-Commit checks
- Unit Tests
- Renovate
Renovate is configured to keep our dependencies up-to-date and keep a running dashboard
Name | Version |
---|---|
terraform | 1.4.0 |
dynatrace | 1.21.0 |
Name | Version |
---|---|
dynatrace | 1.21.0 |
time | n/a |
Name | Type |
---|---|
dynatrace_dashboard.availability | resource |
dynatrace_http_monitor.availability | resource |
dynatrace_maintenance.auto_shutdown_blackout | resource |
dynatrace_maintenance.auto_shutdown_weekends | resource |
dynatrace_maintenance.planned_blackout | resource |
dynatrace_management_zone.availability | resource |
dynatrace_slo.availability | resource |
time_sleep.management_zones | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
auto_window_end_date | This is the date that the cluster-shutdown maintenance window (stopped alerting) should end | string |
"2030-01-01" |
no |
auto_window_end_time | This is the time that the cluster-shutdown maintenance window (stopped alerting) should end | string |
"08:30:00" |
no |
auto_window_start_date | This is the date that the cluster-shutdown maintenance window (stopped alerting) should begin | string |
"2023-01-31" |
no |
auto_window_start_time | This is the time that the cluster-shutdown maintenance window (stopped alerting) should begin | string |
"20:00:00" |
no |
automated_weekday_maintenance | This is a toggle to enable or disable the automatic maintenance window for an environment on weekdays, defaults to true as we have cluster shutdowns. | bool |
true |
no |
automated_weekend_maintenance | This is a toggle to enable or disable the automatic maintenance window for an environment on the weekend, defaults to true as we have cluster shutdowns. | bool |
true |
no |
builtFrom | builtFrom variable required by cnp terraform template. Not in use by terraform | string |
null |
no |
dt_env_url | Dynatrace environment URL | string |
n/a | yes |
dynatrace_platops_api_key | Dynatrace API access key | string |
n/a | yes |
env | Name of the environment to build in | string |
n/a | yes |
planned_maintenance | This is a toggle to enable or disable a planned maintenance window for an environment | bool |
false |
no |
planned_window_end_time | End time of the planned maintenance window | string |
"2023-01-30T20:00:00" |
no |
planned_window_start_time | Start time of the planned maintenance window | string |
"2023-01-30T19:00:00" |
no |
product | product variable required by cnp terraform template. Not in use by terraform | string |
null |
no |
weekend_window_end_time | This is the time that the cluster-shutdown maintenance window (stopped alerting) should end during the weekend | string |
"23:59:59" |
no |
weekend_window_start_time | This is the time that the cluster-shutdown maintenance window (stopped alerting) should begin during the weekend | string |
"00:00:00" |
no |
Name | Description |
---|---|
ado_dashboard_url | Used to display created dashboard URLs as vso[task.logissue type=warning] |
dashboard_url | Dynatrace Dashboard URL |
There are two types of Maintenance Windows being handled by this repository:
- Automated
- Created here and used to turn off our HTTP monitors and alerting for the nonprod environments that are shut down during the evenings, and restarted in the morning. To change the settings for a specific environment, edit the {env}.tfvars file.
- Manual
- Created here and should be enabled in a case where we have a planned suspected outage for one or more environments, i.e a cluster switchover. To achieve this: