Initial commit with README and module files
This commit is contained in:
parent
518c7ed71b
commit
553f03285a
0
.github/CODEOWNERS
vendored
Normal file → Executable file
0
.github/CODEOWNERS
vendored
Normal file → Executable file
0
.github/workflows/main.yml
vendored
Normal file → Executable file
0
.github/workflows/main.yml
vendored
Normal file → Executable file
0
.gitignore
vendored
Normal file → Executable file
0
.gitignore
vendored
Normal file → Executable file
0
.gitmodules
vendored
Normal file → Executable file
0
.gitmodules
vendored
Normal file → Executable file
0
.terraform-version
Normal file → Executable file
0
.terraform-version
Normal file → Executable file
0
CHANGELOG.md
Normal file → Executable file
0
CHANGELOG.md
Normal file → Executable file
0
CONTRIBUTING.md
Normal file → Executable file
0
CONTRIBUTING.md
Normal file → Executable file
488
README.md
Normal file → Executable file
488
README.md
Normal file → Executable file
@ -1,243 +1,335 @@
|
||||
# DataDog Monitors
|
||||
[](CHANGELOG.md) [](NOTICE) [](LICENSE) [](https://git.fr.clara.net/claranet/pt-monitoring/projects/datadog/terraform/monitors/commits/master)
|
||||
# Terraform Datadog Old Monitors Module
|
||||
|
||||
This repository aims to provide a base of generic and pre configured monitors for [Datadog](https://www.datadoghq.com/) templated thanks to [Terraform](https://www.terraform.io/) and the [Datadog Provider](https://github.com/terraform-providers/terraform-provider-datadog).
|
||||
## Overview
|
||||
|
||||
## Important notes
|
||||
This is a comprehensive, enterprise-ready monitoring module repository (based on Claranet's Datadog monitors repository) with pre-configured monitors for various infrastructure components including middleware, databases, cloud services, and container platforms.
|
||||
|
||||
* This repository provide multiple Terraform modules which could be imported, you must choose the one(s) you need.
|
||||
* Each of these modules contains the most commons monitors, but they probably do not fulfill all your needs.
|
||||
* You still can create some specific DataDog monitors after importing a module, it's even advisable to complete your needs.
|
||||
* You will find a complete `README.md` on each module, explaining how to use it and its specificities if there.
|
||||
* The `alerting-message` module could be used to easily generate a templating message to re-use and could be used multiple times to suit different use cases.
|
||||
* Some monitors are disabled by default because not generic or "plug and play" enough, if you use them you will need to tweak them or in some cases disabled another one which could "duplicate" the check.
|
||||
## Features
|
||||
|
||||
## Getting started
|
||||
- **Enterprise Monitoring Templates**: Production-ready monitor configurations
|
||||
- **Multi-Platform Support**: AWS, Azure, GCP cloud providers
|
||||
- **Component Coverage**: Middleware, databases, containers, networking
|
||||
- **Flexible Configuration**: Extensive customization options
|
||||
- **Best Practices**: Based on industry standards and real-world deployments
|
||||
|
||||
### Versions
|
||||
## Structure
|
||||
|
||||
Here are the minimum versions required to use these modules of integrations.
|
||||
This module contains multiple sub-modules organized by component type:
|
||||
|
||||
```
|
||||
terraform-datadog-old-monitors/
|
||||
├── middleware/ # Nginx, Kong, Apache, PHP-FPM
|
||||
├── database/ # PostgreSQL, MySQL, Redis, MongoDB, etc.
|
||||
├── system/ # Generic system and unreachable monitors
|
||||
├── network/ # HTTP, DNS, TLS monitoring
|
||||
├── cloud/ # AWS, Azure, GCP specific monitors
|
||||
│ ├── aws/ # ECS, RDS, Lambda, ALB, etc.
|
||||
│ ├── azure/ # App Services, Functions, SQL, etc.
|
||||
│ └── gcp/ # Compute, Cloud SQL, Pub/Sub, etc.
|
||||
├── caas/ # Docker, Kubernetes monitoring
|
||||
└── common/ # Shared alerting and filtering modules
|
||||
```
|
||||
|
||||
## Requirements
|
||||
|
||||
| Name | Version |
|
||||
|------|---------|
|
||||
| terraform | >= 0.12 |
|
||||
| datadog | >= 2.0 |
|
||||
|
||||
## Usage
|
||||
|
||||
### Basic Monitor Configuration
|
||||
|
||||
```hcl
|
||||
terraform {
|
||||
required_providers {
|
||||
datadog = {
|
||||
source = "DataDog/datadog"
|
||||
version = ">= 3.1.0"
|
||||
}
|
||||
}
|
||||
required_version = ">= 0.12.31"
|
||||
}
|
||||
module "nginx_monitor" {
|
||||
source = "./terraform-datadog-old-monitors/middleware/nginx"
|
||||
|
||||
environment = "production"
|
||||
message = "Nginx issue detected @slack-channel"
|
||||
evaluation_delay = 15
|
||||
new_host_delay = 300
|
||||
|
||||
# Enable/disable specific monitors
|
||||
nginx_connect_enabled = "true"
|
||||
nginx_dropped_enabled = "true"
|
||||
|
||||
# Customize thresholds
|
||||
nginx_dropped_connections_critical = 5
|
||||
nginx_dropped_connections_warning = 3
|
||||
}
|
||||
```
|
||||
|
||||
_Note_: if you want to use Datadog provider v2, you need to use version 3 of the modules in this repository.
|
||||
### AWS RDS Monitoring
|
||||
|
||||
### DataDog provider
|
||||
```hcl
|
||||
module "rds_monitor" {
|
||||
source = "./terraform-datadog-old-monitors/cloud/aws/rds/common"
|
||||
|
||||
Here is the last tester terraform provider version for datadog but next versions should work too.
|
||||
|
||||
```
|
||||
provider "datadog" {
|
||||
api_key = var.datadog_api_key
|
||||
app_key = var.datadog_app_key
|
||||
environment = "production"
|
||||
message = "RDS alert @pagerduty"
|
||||
|
||||
# CPU monitoring
|
||||
cpu_enabled = "true"
|
||||
cpu_critical = 90
|
||||
cpu_warning = 75
|
||||
|
||||
# Disk monitoring
|
||||
disk_space_enabled = "true"
|
||||
disk_space_critical = 90
|
||||
disk_space_warning = 80
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
Both of the `datadog_api_key` and `datadog_app_key` are unique to the each datadog account. You can define them in `terraform.tfvars` file:
|
||||
### Kubernetes Monitoring
|
||||
|
||||
```
|
||||
datadog_api_key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
datadog_app_key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
```hcl
|
||||
module "k8s_pod_monitor" {
|
||||
source = "./terraform-datadog-old-monitors/caas/kubernetes/pod"
|
||||
|
||||
environment = "production"
|
||||
message = "Kubernetes pod issue @slack-ops"
|
||||
|
||||
pod_crash_enabled = "true"
|
||||
pod_not_running_enabled = "true"
|
||||
container_restart_enabled = "true"
|
||||
}
|
||||
```
|
||||
|
||||
### Variables
|
||||
## Common Variables
|
||||
|
||||
Some variables need to be declared.
|
||||
Most sub-modules share these common variables:
|
||||
|
||||
```
|
||||
variable "environment" {
|
||||
type = string
|
||||
default = "dev"
|
||||
}
|
||||
| Name | Description | Type | Default |
|
||||
|------|-------------|------|---------|
|
||||
| `environment` | Architecture environment | `string` | Required |
|
||||
| `message` | Alert message with notification channels | `string` | Required |
|
||||
| `evaluation_delay` | Metric evaluation delay (seconds) | `number` | `15` |
|
||||
| `new_host_delay` | Delay before monitoring new resources | `number` | `300` |
|
||||
| `prefix_slug` | Prefix for monitor names | `string` | `""` |
|
||||
| `notify_no_data` | Alert on no data | `bool` | `true` |
|
||||
| `filter_tags_use_defaults` | Use default filter convention | `bool` | `true` |
|
||||
| `filter_tags_custom` | Custom filter tags | `string` | `""` |
|
||||
|
||||
variable "datadog_api_key" {
|
||||
type = string
|
||||
}
|
||||
## Available Monitor Types
|
||||
|
||||
variable "datadog_app_key" {
|
||||
type = string
|
||||
}
|
||||
### Middleware Monitors
|
||||
|
||||
```
|
||||
- **Nginx**: Connection, dropped connections, workers
|
||||
- **Apache**: Server status, connections
|
||||
- **Kong**: API gateway health and performance
|
||||
- **PHP-FPM**: Pool status, slow requests
|
||||
|
||||
### Modules declaration example
|
||||
### Database Monitors
|
||||
|
||||
A quick example of alerting message module declaration:
|
||||
- **PostgreSQL**: Connections, replication lag, locks
|
||||
- **MySQL**: Connections, slow queries, replication
|
||||
- **Redis**: Memory, connections, evictions
|
||||
- **MongoDB**: Connections, replication lag, operations
|
||||
- **Elasticsearch**: Cluster health, JVM heap
|
||||
- **SQL Server**: Connections, locks, performance
|
||||
|
||||
```
|
||||
locals {
|
||||
oncall_24x7 = "@pagerduty-MyPagerService_NBH"
|
||||
oncall_office_hours = "@pagerduty-MyPagerService_BH"
|
||||
}
|
||||
### Cloud Services
|
||||
|
||||
module "datadog-message-alerting" {
|
||||
source = "claranet/monitors/datadog//common/alerting-message"
|
||||
version = "{revision}"
|
||||
#### AWS
|
||||
- RDS (Aurora PostgreSQL, Aurora MySQL, common)
|
||||
- EC2 / ECS (Fargate, EC2 cluster)
|
||||
- Lambda
|
||||
- ALB / ELB / NLB
|
||||
- ElastiCache (Redis, Memcached)
|
||||
- SQS
|
||||
- API Gateway
|
||||
- Elasticsearch
|
||||
|
||||
message_alert = local.oncall_24x7
|
||||
message_warning = local.oncall_office_hours
|
||||
message_nodata = local.oncall_24x7
|
||||
}
|
||||
#### Azure
|
||||
- App Services
|
||||
- Functions
|
||||
- SQL Database / Elastic Pool
|
||||
- PostgreSQL
|
||||
- Storage
|
||||
- Key Vault
|
||||
- Event Hub
|
||||
- Service Bus
|
||||
|
||||
module "datadog-message-alerting-bh-only" {
|
||||
source = "claranet/monitors/datadog//common/alerting-message"
|
||||
version = "{revision}"
|
||||
#### GCP
|
||||
- Compute Engine
|
||||
- Cloud SQL (MySQL, common)
|
||||
- Pub/Sub (topics, subscriptions)
|
||||
- Load Balancer
|
||||
- Memorystore Redis
|
||||
|
||||
message_alert = local.oncall_office_hours
|
||||
message_warning = local.oncall_office_hours
|
||||
message_nodata = local.oncall_office_hours
|
||||
}
|
||||
### Container Platforms
|
||||
|
||||
module "datadog-monitors-system-generic" {
|
||||
source = "claranet/monitors/datadog//system/generic"
|
||||
version = "{revision}"
|
||||
- **Docker**: Container status, resource usage
|
||||
- **Kubernetes**:
|
||||
- Pod monitors (crash, restart, not running)
|
||||
- Node monitors (resource usage, status)
|
||||
- Cluster monitors (API server, scheduler)
|
||||
- Workload monitors (deployments, statefulsets)
|
||||
- Velero/Ark backup monitors
|
||||
|
||||
### Network Monitors
|
||||
|
||||
- **HTTP**: Webcheck, SSL certificate expiry
|
||||
- **DNS**: Query response time, availability
|
||||
- **TLS**: Certificate expiration
|
||||
|
||||
## Monitor Configuration Pattern
|
||||
|
||||
Each monitor module follows this pattern:
|
||||
|
||||
```hcl
|
||||
module "service_monitor" {
|
||||
source = "./path/to/monitor"
|
||||
|
||||
# Environment and messaging
|
||||
environment = var.environment
|
||||
message = module.datadog-message-alerting.alerting-message
|
||||
|
||||
memory_message = module.datadog-message-alerting-bh-only.alerting-message
|
||||
# Use variables to customize monitors configuration
|
||||
message = var.alert_message
|
||||
|
||||
# Timing configuration
|
||||
evaluation_delay = 15
|
||||
new_host_delay = 300
|
||||
|
||||
# Enable/disable monitors
|
||||
monitor_name_enabled = "true"
|
||||
|
||||
# Thresholds
|
||||
monitor_name_critical = 90
|
||||
monitor_name_warning = 75
|
||||
|
||||
# Filtering
|
||||
filter_tags_custom = "env:production,team:platform"
|
||||
}
|
||||
|
||||
# Other monitors modules to declare ...
|
||||
#module "datadog-monitors-my-monitors-set" {
|
||||
# source = "claranet/monitors/datadog//my/monitors/set"
|
||||
# version = "{revision}"
|
||||
#
|
||||
# environment = var.environment
|
||||
# message = module.datadog-message-alerting.alerting-message
|
||||
#}
|
||||
|
||||
```
|
||||
|
||||
* Replace `{revision}` to the last git tag available on this repository.
|
||||
* The `//` is very important, it's a terraform specific syntax used to separate git url and folder path.
|
||||
* `my/monitors/set` represents the path to a monitors set sub directory listed below.
|
||||
## Alerting Integration
|
||||
|
||||
## Contributions
|
||||
The `common/alerting-message` module provides templates for:
|
||||
- PagerDuty integration
|
||||
- Slack notifications
|
||||
- Email alerts
|
||||
- Webhook notifications
|
||||
|
||||
Contributions are always welcome.
|
||||
Example:
|
||||
```hcl
|
||||
module "alerting" {
|
||||
source = "./terraform-datadog-old-monitors/common/alerting-message"
|
||||
|
||||
message_alert = "@pagerduty-critical"
|
||||
message_warning = "@slack-warnings"
|
||||
message_nodata = "@slack-monitoring"
|
||||
}
|
||||
```
|
||||
|
||||
The easiest way is to fork the repository, duplicate a module as "template" and work on it.
|
||||
## Filter Tags
|
||||
|
||||
An internal CI will run the `auto_update.sh` script to compare with proposed changes and check if everything is up to date.
|
||||
The `common/filter-tags` module helps with tag-based filtering:
|
||||
|
||||
So, when PR is ready you will need to run this script and push its changes to pass the CI, see [scripts repository](https://github.com/claranet/terraform-datadog-scripts/) for more information.
|
||||
```hcl
|
||||
module "filter_tags" {
|
||||
source = "./terraform-datadog-old-monitors/common/filter-tags"
|
||||
|
||||
environment = "production"
|
||||
filter_tags_use_defaults = true
|
||||
filter_tags_custom = "service:api,tier:backend"
|
||||
}
|
||||
```
|
||||
|
||||
For example, this will regenerate every READMEs thanks to [terraform-docs](https://github.com/segmentio/terraform-docs) currently in v0.9.1.
|
||||
## Best Practices
|
||||
|
||||
## Monitors summary
|
||||
1. **Start with defaults**: Use default thresholds first, then customize
|
||||
2. **Gradual rollout**: Enable monitors incrementally
|
||||
3. **Tag strategy**: Use consistent tagging across infrastructure
|
||||
4. **Alert fatigue**: Tune thresholds to reduce false positives
|
||||
5. **Documentation**: Document custom threshold decisions
|
||||
6. **Testing**: Test monitors in non-production first
|
||||
|
||||
- [caas](https://github.com/claranet/terraform-datadog-monitors/tree/master/caas/)
|
||||
- [docker](https://github.com/claranet/terraform-datadog-monitors/tree/master/caas/docker/)
|
||||
- [kubernetes](https://github.com/claranet/terraform-datadog-monitors/tree/master/caas/kubernetes/)
|
||||
- [ark](https://github.com/claranet/terraform-datadog-monitors/tree/master/caas/kubernetes/ark/)
|
||||
- [cluster](https://github.com/claranet/terraform-datadog-monitors/tree/master/caas/kubernetes/cluster/)
|
||||
- [ingress](https://github.com/claranet/terraform-datadog-monitors/tree/master/caas/kubernetes/ingress/)
|
||||
- [vts](https://github.com/claranet/terraform-datadog-monitors/tree/master/caas/kubernetes/ingress/vts/)
|
||||
- [node](https://github.com/claranet/terraform-datadog-monitors/tree/master/caas/kubernetes/node/)
|
||||
- [pod](https://github.com/claranet/terraform-datadog-monitors/tree/master/caas/kubernetes/pod/)
|
||||
- [velero](https://github.com/claranet/terraform-datadog-monitors/tree/master/caas/kubernetes/velero/)
|
||||
- [workload](https://github.com/claranet/terraform-datadog-monitors/tree/master/caas/kubernetes/workload/)
|
||||
- [cloud](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/)
|
||||
- [aws](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/aws/)
|
||||
- [alb](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/aws/alb/)
|
||||
- [apigateway](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/aws/apigateway/)
|
||||
- [beanstalk](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/aws/beanstalk/)
|
||||
- [ecs](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/aws/ecs/)
|
||||
- [common](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/aws/ecs/common/)
|
||||
- [ec2-cluster](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/aws/ecs/ec2-cluster/)
|
||||
- [fargate](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/aws/ecs/fargate/)
|
||||
- [elasticache](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/aws/elasticache/)
|
||||
- [common](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/aws/elasticache/common/)
|
||||
- [memcached](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/aws/elasticache/memcached/)
|
||||
- [redis](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/aws/elasticache/redis/)
|
||||
- [elasticsearch](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/aws/elasticsearch/)
|
||||
- [elb](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/aws/elb/)
|
||||
- [kinesis-firehose](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/aws/kinesis-firehose/)
|
||||
- [lambda](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/aws/lambda/)
|
||||
- [nlb](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/aws/nlb/)
|
||||
- [rds](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/aws/rds/)
|
||||
- [aurora](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/aws/rds/aurora/)
|
||||
- [mysql](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/aws/rds/aurora/mysql/)
|
||||
- [postgresql](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/aws/rds/aurora/postgresql/)
|
||||
- [common](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/aws/rds/common/)
|
||||
- [sqs](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/aws/sqs/)
|
||||
- [vpn](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/aws/vpn/)
|
||||
- [azure](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/azure/)
|
||||
- [apimanagement](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/azure/apimanagement/)
|
||||
- [app-gateway](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/azure/app-gateway/)
|
||||
- [app-services](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/azure/app-services/)
|
||||
- [azure-search](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/azure/azure-search/)
|
||||
- [cosmosdb](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/azure/cosmosdb/)
|
||||
- [datalakestore](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/azure/datalakestore/)
|
||||
- [eventgrid](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/azure/eventgrid/)
|
||||
- [eventhub](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/azure/eventhub/)
|
||||
- [functions](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/azure/functions/)
|
||||
- [iothubs](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/azure/iothubs/)
|
||||
- [keyvault](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/azure/keyvault/)
|
||||
- [load-balancer](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/azure/load-balancer/)
|
||||
- [mysql](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/azure/mysql/)
|
||||
- [postgresql](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/azure/postgresql/)
|
||||
- [redis](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/azure/redis/)
|
||||
- [serverfarms](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/azure/serverfarms/)
|
||||
- [servicebus](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/azure/servicebus/)
|
||||
- [sql-database](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/azure/sql-database/)
|
||||
- [sql-elasticpool](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/azure/sql-elasticpool/)
|
||||
- [storage](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/azure/storage/)
|
||||
- [stream-analytics](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/azure/stream-analytics/)
|
||||
- [virtual-machine](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/azure/virtual-machine/)
|
||||
- [gcp](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/gcp/)
|
||||
- [big-query](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/gcp/big-query/)
|
||||
- [cloud-sql](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/gcp/cloud-sql/)
|
||||
- [common](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/gcp/cloud-sql/common/)
|
||||
- [mysql](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/gcp/cloud-sql/mysql/)
|
||||
- [gce](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/gcp/gce/)
|
||||
- [instance](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/gcp/gce/instance/)
|
||||
- [lb](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/gcp/lb/)
|
||||
- [memorystore](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/gcp/memorystore/)
|
||||
- [redis](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/gcp/memorystore/redis/)
|
||||
- [pubsub](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/gcp/pubsub/)
|
||||
- [subscription](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/gcp/pubsub/subscription/)
|
||||
- [topic](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/gcp/pubsub/topic/)
|
||||
- [common](https://github.com/claranet/terraform-datadog-monitors/tree/master/common/)
|
||||
- [alerting-message](https://github.com/claranet/terraform-datadog-monitors/tree/master/common/alerting-message/)
|
||||
- [filter-tags](https://github.com/claranet/terraform-datadog-monitors/tree/master/common/filter-tags/)
|
||||
- [database](https://github.com/claranet/terraform-datadog-monitors/tree/master/database/)
|
||||
- [elasticsearch](https://github.com/claranet/terraform-datadog-monitors/tree/master/database/elasticsearch/)
|
||||
- [mongodb](https://github.com/claranet/terraform-datadog-monitors/tree/master/database/mongodb/)
|
||||
- [mysql](https://github.com/claranet/terraform-datadog-monitors/tree/master/database/mysql/)
|
||||
- [postgresql](https://github.com/claranet/terraform-datadog-monitors/tree/master/database/postgresql/)
|
||||
- [proxysql](https://github.com/claranet/terraform-datadog-monitors/tree/master/database/proxysql/)
|
||||
- [redis](https://github.com/claranet/terraform-datadog-monitors/tree/master/database/redis/)
|
||||
- [solr](https://github.com/claranet/terraform-datadog-monitors/tree/master/database/solr/)
|
||||
- [sqlserver](https://github.com/claranet/terraform-datadog-monitors/tree/master/database/sqlserver/)
|
||||
- [zookeeper](https://github.com/claranet/terraform-datadog-monitors/tree/master/database/zookeeper/)
|
||||
- [middleware](https://github.com/claranet/terraform-datadog-monitors/tree/master/middleware/)
|
||||
- [apache](https://github.com/claranet/terraform-datadog-monitors/tree/master/middleware/apache/)
|
||||
- [kong](https://github.com/claranet/terraform-datadog-monitors/tree/master/middleware/kong/)
|
||||
- [nginx](https://github.com/claranet/terraform-datadog-monitors/tree/master/middleware/nginx/)
|
||||
- [php-fpm](https://github.com/claranet/terraform-datadog-monitors/tree/master/middleware/php-fpm/)
|
||||
- [network](https://github.com/claranet/terraform-datadog-monitors/tree/master/network/)
|
||||
- [dns](https://github.com/claranet/terraform-datadog-monitors/tree/master/network/dns/)
|
||||
- [http](https://github.com/claranet/terraform-datadog-monitors/tree/master/network/http/)
|
||||
- [ssl](https://github.com/claranet/terraform-datadog-monitors/tree/master/network/http/ssl/)
|
||||
- [webcheck](https://github.com/claranet/terraform-datadog-monitors/tree/master/network/http/webcheck/)
|
||||
- [tls](https://github.com/claranet/terraform-datadog-monitors/tree/master/network/tls/)
|
||||
- [saas](https://github.com/claranet/terraform-datadog-monitors/tree/master/saas/)
|
||||
- [new-relic](https://github.com/claranet/terraform-datadog-monitors/tree/master/saas/new-relic/)
|
||||
- [system](https://github.com/claranet/terraform-datadog-monitors/tree/master/system/)
|
||||
- [generic](https://github.com/claranet/terraform-datadog-monitors/tree/master/system/generic/)
|
||||
- [unreachable](https://github.com/claranet/terraform-datadog-monitors/tree/master/system/unreachable/)
|
||||
## Customization Examples
|
||||
|
||||
### Custom Thresholds
|
||||
|
||||
```hcl
|
||||
# More aggressive CPU monitoring
|
||||
cpu_critical = 85
|
||||
cpu_warning = 70
|
||||
|
||||
# Relaxed disk space monitoring
|
||||
disk_space_critical = 95
|
||||
disk_space_warning = 90
|
||||
```
|
||||
|
||||
### Conditional Monitoring
|
||||
|
||||
```hcl
|
||||
# Only monitor specific services
|
||||
filter_tags_custom = "service:critical-app"
|
||||
|
||||
# Skip new hosts for longer period
|
||||
new_host_delay = 600 # 10 minutes
|
||||
```
|
||||
|
||||
### Custom Alert Messages
|
||||
|
||||
```hcl
|
||||
message = <<-EOT
|
||||
{{#is_alert}}
|
||||
CRITICAL: {{check}} on {{host.name}}
|
||||
@pagerduty-critical
|
||||
{{/is_alert}}
|
||||
|
||||
{{#is_warning}}
|
||||
WARNING: {{check}} on {{host.name}}
|
||||
@slack-warnings
|
||||
{{/is_warning}}
|
||||
EOT
|
||||
```
|
||||
|
||||
## Maintenance
|
||||
|
||||
This module appears to be a legacy/archived version (hence "old-monitors" name). Consider:
|
||||
- Reviewing for updates from Claranet repository
|
||||
- Migrating to newer monitoring solutions if available
|
||||
- Documenting which monitors are actively used
|
||||
- Deprecating unused monitor configurations
|
||||
|
||||
## Outputs
|
||||
|
||||
Each sub-module may export:
|
||||
- Monitor IDs
|
||||
- Monitor names
|
||||
- Alert status
|
||||
|
||||
Check individual module outputs.tf files for specifics.
|
||||
|
||||
## Notes
|
||||
|
||||
- This is a comprehensive library of monitor templates
|
||||
- Based on Claranet's open-source Datadog monitors
|
||||
- Covers most common infrastructure components
|
||||
- Highly customizable with sensible defaults
|
||||
- May contain more monitors than needed for your use case
|
||||
- Review and enable only required monitors to avoid alert fatigue
|
||||
|
||||
## Migration Path
|
||||
|
||||
If migrating from this module:
|
||||
1. Audit currently active monitors
|
||||
2. Document custom thresholds
|
||||
3. Test new monitoring solutions in parallel
|
||||
4. Gradually migrate monitor by monitor
|
||||
5. Keep this module for reference
|
||||
|
||||
## Resources
|
||||
|
||||
- Original Claranet repository: [terraform-datadog-monitors](https://github.com/claranet/terraform-datadog-monitors)
|
||||
- Datadog monitor documentation: [Datadog Monitors](https://docs.datadoghq.com/monitors/)
|
||||
|
||||
## License
|
||||
|
||||
Based on Claranet's open-source work.
|
||||
Internal use: Sanoma/WeBuildYourCloud
|
||||
|
||||
## Authors
|
||||
|
||||
- Original: Claranet team
|
||||
- Maintained by: Platform Engineering team
|
||||
|
||||
0
TEMPLATING.md
Normal file → Executable file
0
TEMPLATING.md
Normal file → Executable file
0
caas/docker/README.md
Normal file → Executable file
0
caas/docker/README.md
Normal file → Executable file
0
caas/docker/inputs.tf
Normal file → Executable file
0
caas/docker/inputs.tf
Normal file → Executable file
0
caas/docker/modules.tf
Normal file → Executable file
0
caas/docker/modules.tf
Normal file → Executable file
0
caas/docker/monitors-docker.tf
Normal file → Executable file
0
caas/docker/monitors-docker.tf
Normal file → Executable file
0
caas/docker/outputs.tf
Normal file → Executable file
0
caas/docker/outputs.tf
Normal file → Executable file
0
caas/docker/versions.tf
Normal file → Executable file
0
caas/docker/versions.tf
Normal file → Executable file
0
caas/kubernetes/ark/README.md
Normal file → Executable file
0
caas/kubernetes/ark/README.md
Normal file → Executable file
0
caas/kubernetes/ark/inputs.tf
Normal file → Executable file
0
caas/kubernetes/ark/inputs.tf
Normal file → Executable file
0
caas/kubernetes/ark/modules.tf
Normal file → Executable file
0
caas/kubernetes/ark/modules.tf
Normal file → Executable file
0
caas/kubernetes/ark/monitors-ark.tf
Normal file → Executable file
0
caas/kubernetes/ark/monitors-ark.tf
Normal file → Executable file
0
caas/kubernetes/ark/outputs.tf
Normal file → Executable file
0
caas/kubernetes/ark/outputs.tf
Normal file → Executable file
0
caas/kubernetes/ark/versions.tf
Normal file → Executable file
0
caas/kubernetes/ark/versions.tf
Normal file → Executable file
0
caas/kubernetes/cluster/README.md
Normal file → Executable file
0
caas/kubernetes/cluster/README.md
Normal file → Executable file
0
caas/kubernetes/cluster/inputs.tf
Normal file → Executable file
0
caas/kubernetes/cluster/inputs.tf
Normal file → Executable file
0
caas/kubernetes/cluster/modules.tf
Normal file → Executable file
0
caas/kubernetes/cluster/modules.tf
Normal file → Executable file
0
caas/kubernetes/cluster/monitors-k8s-cluster.tf
Normal file → Executable file
0
caas/kubernetes/cluster/monitors-k8s-cluster.tf
Normal file → Executable file
0
caas/kubernetes/cluster/outputs.tf
Normal file → Executable file
0
caas/kubernetes/cluster/outputs.tf
Normal file → Executable file
0
caas/kubernetes/cluster/versions.tf
Normal file → Executable file
0
caas/kubernetes/cluster/versions.tf
Normal file → Executable file
0
caas/kubernetes/ingress/vts/MANIFEST.txt
Normal file → Executable file
0
caas/kubernetes/ingress/vts/MANIFEST.txt
Normal file → Executable file
0
caas/kubernetes/ingress/vts/README.md
Normal file → Executable file
0
caas/kubernetes/ingress/vts/README.md
Normal file → Executable file
0
caas/kubernetes/ingress/vts/inputs.tf
Normal file → Executable file
0
caas/kubernetes/ingress/vts/inputs.tf
Normal file → Executable file
0
caas/kubernetes/ingress/vts/modules.tf
Normal file → Executable file
0
caas/kubernetes/ingress/vts/modules.tf
Normal file → Executable file
0
caas/kubernetes/ingress/vts/monitors-ingress.tf
Normal file → Executable file
0
caas/kubernetes/ingress/vts/monitors-ingress.tf
Normal file → Executable file
0
caas/kubernetes/ingress/vts/outputs.tf
Normal file → Executable file
0
caas/kubernetes/ingress/vts/outputs.tf
Normal file → Executable file
0
caas/kubernetes/ingress/vts/versions.tf
Normal file → Executable file
0
caas/kubernetes/ingress/vts/versions.tf
Normal file → Executable file
0
caas/kubernetes/node/README.md
Normal file → Executable file
0
caas/kubernetes/node/README.md
Normal file → Executable file
0
caas/kubernetes/node/inputs.tf
Normal file → Executable file
0
caas/kubernetes/node/inputs.tf
Normal file → Executable file
0
caas/kubernetes/node/modules.tf
Normal file → Executable file
0
caas/kubernetes/node/modules.tf
Normal file → Executable file
0
caas/kubernetes/node/monitors-k8s-node.tf
Normal file → Executable file
0
caas/kubernetes/node/monitors-k8s-node.tf
Normal file → Executable file
0
caas/kubernetes/node/outputs.tf
Normal file → Executable file
0
caas/kubernetes/node/outputs.tf
Normal file → Executable file
0
caas/kubernetes/node/versions.tf
Normal file → Executable file
0
caas/kubernetes/node/versions.tf
Normal file → Executable file
0
caas/kubernetes/pod/README.md
Normal file → Executable file
0
caas/kubernetes/pod/README.md
Normal file → Executable file
0
caas/kubernetes/pod/inputs.tf
Normal file → Executable file
0
caas/kubernetes/pod/inputs.tf
Normal file → Executable file
0
caas/kubernetes/pod/modules.tf
Normal file → Executable file
0
caas/kubernetes/pod/modules.tf
Normal file → Executable file
0
caas/kubernetes/pod/monitors-k8s-pod.tf
Normal file → Executable file
0
caas/kubernetes/pod/monitors-k8s-pod.tf
Normal file → Executable file
0
caas/kubernetes/pod/outputs.tf
Normal file → Executable file
0
caas/kubernetes/pod/outputs.tf
Normal file → Executable file
0
caas/kubernetes/pod/versions.tf
Normal file → Executable file
0
caas/kubernetes/pod/versions.tf
Normal file → Executable file
0
caas/kubernetes/velero/README.md
Normal file → Executable file
0
caas/kubernetes/velero/README.md
Normal file → Executable file
0
caas/kubernetes/velero/inputs.tf
Normal file → Executable file
0
caas/kubernetes/velero/inputs.tf
Normal file → Executable file
0
caas/kubernetes/velero/modules.tf
Normal file → Executable file
0
caas/kubernetes/velero/modules.tf
Normal file → Executable file
0
caas/kubernetes/velero/monitors-velero.tf
Normal file → Executable file
0
caas/kubernetes/velero/monitors-velero.tf
Normal file → Executable file
0
caas/kubernetes/velero/outputs.tf
Normal file → Executable file
0
caas/kubernetes/velero/outputs.tf
Normal file → Executable file
0
caas/kubernetes/velero/versions.tf
Normal file → Executable file
0
caas/kubernetes/velero/versions.tf
Normal file → Executable file
0
caas/kubernetes/workload/README.md
Normal file → Executable file
0
caas/kubernetes/workload/README.md
Normal file → Executable file
0
caas/kubernetes/workload/inputs.tf
Normal file → Executable file
0
caas/kubernetes/workload/inputs.tf
Normal file → Executable file
0
caas/kubernetes/workload/modules.tf
Normal file → Executable file
0
caas/kubernetes/workload/modules.tf
Normal file → Executable file
0
caas/kubernetes/workload/monitors-k8s-workload.tf
Normal file → Executable file
0
caas/kubernetes/workload/monitors-k8s-workload.tf
Normal file → Executable file
0
caas/kubernetes/workload/outputs.tf
Normal file → Executable file
0
caas/kubernetes/workload/outputs.tf
Normal file → Executable file
0
caas/kubernetes/workload/versions.tf
Normal file → Executable file
0
caas/kubernetes/workload/versions.tf
Normal file → Executable file
BIN
cloud/aws/.DS_Store
vendored
Normal file
BIN
cloud/aws/.DS_Store
vendored
Normal file
Binary file not shown.
0
cloud/aws/alb/README.md
Normal file → Executable file
0
cloud/aws/alb/README.md
Normal file → Executable file
0
cloud/aws/alb/inputs.tf
Normal file → Executable file
0
cloud/aws/alb/inputs.tf
Normal file → Executable file
0
cloud/aws/alb/modules.tf
Normal file → Executable file
0
cloud/aws/alb/modules.tf
Normal file → Executable file
0
cloud/aws/alb/monitors-alb.tf
Normal file → Executable file
0
cloud/aws/alb/monitors-alb.tf
Normal file → Executable file
0
cloud/aws/alb/outputs.tf
Normal file → Executable file
0
cloud/aws/alb/outputs.tf
Normal file → Executable file
0
cloud/aws/alb/versions.tf
Normal file → Executable file
0
cloud/aws/alb/versions.tf
Normal file → Executable file
0
cloud/aws/apigateway/README.md
Normal file → Executable file
0
cloud/aws/apigateway/README.md
Normal file → Executable file
0
cloud/aws/apigateway/inputs.tf
Normal file → Executable file
0
cloud/aws/apigateway/inputs.tf
Normal file → Executable file
0
cloud/aws/apigateway/monitors-api.tf
Normal file → Executable file
0
cloud/aws/apigateway/monitors-api.tf
Normal file → Executable file
0
cloud/aws/apigateway/outputs.tf
Normal file → Executable file
0
cloud/aws/apigateway/outputs.tf
Normal file → Executable file
0
cloud/aws/apigateway/versions.tf
Normal file → Executable file
0
cloud/aws/apigateway/versions.tf
Normal file → Executable file
0
cloud/aws/beanstalk/README.md
Normal file → Executable file
0
cloud/aws/beanstalk/README.md
Normal file → Executable file
0
cloud/aws/beanstalk/inputs.tf
Normal file → Executable file
0
cloud/aws/beanstalk/inputs.tf
Normal file → Executable file
0
cloud/aws/beanstalk/modules.tf
Normal file → Executable file
0
cloud/aws/beanstalk/modules.tf
Normal file → Executable file
0
cloud/aws/beanstalk/monitors-beanstalk.tf
Normal file → Executable file
0
cloud/aws/beanstalk/monitors-beanstalk.tf
Normal file → Executable file
0
cloud/aws/beanstalk/outputs.tf
Normal file → Executable file
0
cloud/aws/beanstalk/outputs.tf
Normal file → Executable file
0
cloud/aws/beanstalk/versions.tf
Normal file → Executable file
0
cloud/aws/beanstalk/versions.tf
Normal file → Executable file
0
cloud/aws/ecs/common/MANIFEST.txt
Normal file → Executable file
0
cloud/aws/ecs/common/MANIFEST.txt
Normal file → Executable file
0
cloud/aws/ecs/common/README.md
Normal file → Executable file
0
cloud/aws/ecs/common/README.md
Normal file → Executable file
0
cloud/aws/ecs/common/inputs.tf
Normal file → Executable file
0
cloud/aws/ecs/common/inputs.tf
Normal file → Executable file
0
cloud/aws/ecs/common/modules.tf
Normal file → Executable file
0
cloud/aws/ecs/common/modules.tf
Normal file → Executable file
0
cloud/aws/ecs/common/monitors-ecs-common.tf
Normal file → Executable file
0
cloud/aws/ecs/common/monitors-ecs-common.tf
Normal file → Executable file
0
cloud/aws/ecs/common/outputs.tf
Normal file → Executable file
0
cloud/aws/ecs/common/outputs.tf
Normal file → Executable file
0
cloud/aws/ecs/common/versions.tf
Normal file → Executable file
0
cloud/aws/ecs/common/versions.tf
Normal file → Executable file
0
cloud/aws/ecs/ec2-cluster/MANIFEST.txt
Normal file → Executable file
0
cloud/aws/ecs/ec2-cluster/MANIFEST.txt
Normal file → Executable file
0
cloud/aws/ecs/ec2-cluster/README.md
Normal file → Executable file
0
cloud/aws/ecs/ec2-cluster/README.md
Normal file → Executable file
0
cloud/aws/ecs/ec2-cluster/inputs.tf
Normal file → Executable file
0
cloud/aws/ecs/ec2-cluster/inputs.tf
Normal file → Executable file
0
cloud/aws/ecs/ec2-cluster/modules.tf
Normal file → Executable file
0
cloud/aws/ecs/ec2-cluster/modules.tf
Normal file → Executable file
0
cloud/aws/ecs/ec2-cluster/monitors-ecs-ec2-cluster.tf
Normal file → Executable file
0
cloud/aws/ecs/ec2-cluster/monitors-ecs-ec2-cluster.tf
Normal file → Executable file
0
cloud/aws/ecs/ec2-cluster/outputs.tf
Normal file → Executable file
0
cloud/aws/ecs/ec2-cluster/outputs.tf
Normal file → Executable file
0
cloud/aws/ecs/ec2-cluster/versions.tf
Normal file → Executable file
0
cloud/aws/ecs/ec2-cluster/versions.tf
Normal file → Executable file
0
cloud/aws/ecs/fargate/MANIFEST.txt
Normal file → Executable file
0
cloud/aws/ecs/fargate/MANIFEST.txt
Normal file → Executable file
0
cloud/aws/ecs/fargate/README.md
Normal file → Executable file
0
cloud/aws/ecs/fargate/README.md
Normal file → Executable file
0
cloud/aws/ecs/fargate/inputs.tf
Normal file → Executable file
0
cloud/aws/ecs/fargate/inputs.tf
Normal file → Executable file
0
cloud/aws/ecs/fargate/modules.tf
Normal file → Executable file
0
cloud/aws/ecs/fargate/modules.tf
Normal file → Executable file
0
cloud/aws/ecs/fargate/monitors-ecs-fargate.tf
Normal file → Executable file
0
cloud/aws/ecs/fargate/monitors-ecs-fargate.tf
Normal file → Executable file
0
cloud/aws/ecs/fargate/outputs.tf
Normal file → Executable file
0
cloud/aws/ecs/fargate/outputs.tf
Normal file → Executable file
0
cloud/aws/ecs/fargate/versions.tf
Normal file → Executable file
0
cloud/aws/ecs/fargate/versions.tf
Normal file → Executable file
0
cloud/aws/elasticache/common/MANIFEST.txt
Normal file → Executable file
0
cloud/aws/elasticache/common/MANIFEST.txt
Normal file → Executable file
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user