├── .github ├── CODEOWNERS └── workflows │ └── main.yml ├── .gitignore ├── .gitmodules ├── .terraform-version ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE ├── NOTICE ├── README.md ├── TEMPLATING.md ├── caas ├── docker │ ├── README.md │ ├── common-inputs.tf │ ├── common-locals.tf │ ├── inputs.tf │ ├── modules.tf │ ├── monitors-docker.tf │ ├── outputs.tf │ └── versions.tf └── kubernetes │ ├── ark │ ├── README.md │ ├── common-inputs.tf │ ├── common-locals.tf │ ├── inputs.tf │ ├── modules.tf │ ├── monitors-ark.tf │ ├── outputs.tf │ └── versions.tf │ ├── cluster │ ├── README.md │ ├── common-inputs.tf │ ├── common-locals.tf │ ├── inputs.tf │ ├── modules.tf │ ├── monitors-k8s-cluster.tf │ ├── outputs.tf │ └── versions.tf │ ├── ingress │ └── vts │ │ ├── MANIFEST.txt │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── modules.tf │ │ ├── monitors-ingress.tf │ │ ├── outputs.tf │ │ └── versions.tf │ ├── node │ ├── README.md │ ├── common-inputs.tf │ ├── common-locals.tf │ ├── inputs.tf │ ├── modules.tf │ ├── monitors-k8s-node.tf │ ├── outputs.tf │ └── versions.tf │ ├── pod │ ├── README.md │ ├── common-inputs.tf │ ├── common-locals.tf │ ├── inputs.tf │ ├── locals.tf │ ├── modules.tf │ ├── monitors-k8s-pod.tf │ ├── outputs.tf │ └── versions.tf │ ├── velero │ ├── README.md │ ├── common-inputs.tf │ ├── common-locals.tf │ ├── inputs.tf │ ├── modules.tf │ ├── monitors-velero.tf │ ├── outputs.tf │ └── versions.tf │ └── workload │ ├── README.md │ ├── common-inputs.tf │ ├── common-locals.tf │ ├── inputs.tf │ ├── locals.tf │ ├── modules.tf │ ├── monitors-k8s-workload.tf │ ├── outputs.tf │ └── versions.tf ├── cloud ├── aws │ ├── alb │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── modules.tf │ │ ├── monitors-alb.tf │ │ ├── outputs.tf │ │ └── versions.tf │ ├── apigateway │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── monitors-api.tf │ │ ├── outputs.tf │ │ └── versions.tf │ ├── beanstalk │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── modules.tf │ │ ├── monitors-beanstalk.tf │ │ ├── outputs.tf │ │ └── versions.tf │ ├── ecs │ │ ├── common │ │ │ ├── MANIFEST.txt │ │ │ ├── README.md │ │ │ ├── common-inputs.tf │ │ │ ├── common-locals.tf │ │ │ ├── inputs.tf │ │ │ ├── modules.tf │ │ │ ├── monitors-ecs-common.tf │ │ │ ├── outputs.tf │ │ │ └── versions.tf │ │ ├── ec2-cluster │ │ │ ├── MANIFEST.txt │ │ │ ├── README.md │ │ │ ├── common-inputs.tf │ │ │ ├── common-locals.tf │ │ │ ├── inputs.tf │ │ │ ├── modules.tf │ │ │ ├── monitors-ecs-ec2-cluster.tf │ │ │ ├── outputs.tf │ │ │ └── versions.tf │ │ └── fargate │ │ │ ├── MANIFEST.txt │ │ │ ├── README.md │ │ │ ├── common-inputs.tf │ │ │ ├── common-locals.tf │ │ │ ├── inputs.tf │ │ │ ├── modules.tf │ │ │ ├── monitors-ecs-fargate.tf │ │ │ ├── outputs.tf │ │ │ └── versions.tf │ ├── elasticache │ │ ├── common │ │ │ ├── MANIFEST.txt │ │ │ ├── README.md │ │ │ ├── common-inputs.tf │ │ │ ├── common-locals.tf │ │ │ ├── inputs.tf │ │ │ ├── modules.tf │ │ │ ├── monitors-elasticache.tf │ │ │ ├── outputs.tf │ │ │ └── versions.tf │ │ ├── memcached │ │ │ ├── MANIFEST.txt │ │ │ ├── README.md │ │ │ ├── common-inputs.tf │ │ │ ├── common-locals.tf │ │ │ ├── inputs.tf │ │ │ ├── modules.tf │ │ │ ├── monitors-memcached.tf │ │ │ ├── outputs.tf │ │ │ └── versions.tf │ │ └── redis │ │ │ ├── MANIFEST.txt │ │ │ ├── README.md │ │ │ ├── common-inputs.tf │ │ │ ├── common-locals.tf │ │ │ ├── inputs.tf │ │ │ ├── modules.tf │ │ │ ├── monitors-redis.tf │ │ │ ├── outputs.tf │ │ │ └── versions.tf │ ├── elasticsearch │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── modules.tf │ │ ├── monitors-elasticsearch.tf │ │ ├── outputs.tf │ │ └── versions.tf │ ├── elb │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── modules.tf │ │ ├── monitors-elb.tf │ │ ├── outputs.tf │ │ └── versions.tf │ ├── kinesis-firehose │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── modules.tf │ │ ├── monitors-kinesis-firehose.tf │ │ ├── outputs.tf │ │ └── versions.tf │ ├── lambda │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── modules.tf │ │ ├── monitors-lambda.tf │ │ ├── outputs.tf │ │ └── versions.tf │ ├── nlb │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── modules.tf │ │ ├── monitors-nlb.tf │ │ ├── outputs.tf │ │ └── versions.tf │ ├── rds │ │ ├── aurora │ │ │ ├── mysql │ │ │ │ ├── MANIFEST.txt │ │ │ │ ├── README.md │ │ │ │ ├── common-inputs.tf │ │ │ │ ├── common-locals.tf │ │ │ │ ├── inputs.tf │ │ │ │ ├── modules.tf │ │ │ │ ├── monitors-rds-aurora-mysql.tf │ │ │ │ ├── outputs.tf │ │ │ │ └── versions.tf │ │ │ └── postgresql │ │ │ │ ├── MANIFEST.txt │ │ │ │ ├── README.md │ │ │ │ ├── common-inputs.tf │ │ │ │ ├── common-locals.tf │ │ │ │ ├── inputs.tf │ │ │ │ ├── modules.tf │ │ │ │ ├── monitors-rds-aurora-postgresql.tf │ │ │ │ ├── outputs.tf │ │ │ │ └── versions.tf │ │ └── common │ │ │ ├── MANIFEST.txt │ │ │ ├── README.md │ │ │ ├── common-inputs.tf │ │ │ ├── common-locals.tf │ │ │ ├── inputs.tf │ │ │ ├── modules.tf │ │ │ ├── monitors-rds-common.tf │ │ │ ├── outputs.tf │ │ │ └── versions.tf │ ├── sqs │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── modules.tf │ │ ├── monitors-sqs.tf │ │ ├── outputs.tf │ │ └── versions.tf │ └── vpn │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── monitors-vpn.tf │ │ ├── outputs.tf │ │ └── versions.tf ├── azure │ ├── apimanagement │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── modules.tf │ │ ├── monitors-azure-apimanagement.tf │ │ ├── outputs.tf │ │ └── versions.tf │ ├── app-gateway │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── modules.tf │ │ ├── monitors-app-gateway.tf │ │ ├── outputs.tf │ │ └── versions.tf │ ├── app-services │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── modules.tf │ │ ├── monitors-app_services.tf │ │ ├── outputs.tf │ │ └── versions.tf │ ├── azure-search │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── modules.tf │ │ ├── monitors-azure-search.tf │ │ ├── outputs.tf │ │ └── versions.tf │ ├── backup-vault │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── modules.tf │ │ ├── monitors-backup-vault.tf │ │ ├── outputs.tf │ │ └── versions.tf │ ├── cosmosdb │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── modules.tf │ │ ├── monitors-cosmosdb.tf │ │ ├── outputs.tf │ │ └── versions.tf │ ├── datalakestore │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── modules.tf │ │ ├── monitors-datalakestore.tf │ │ ├── outputs.tf │ │ └── versions.tf │ ├── eventgrid │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── modules.tf │ │ ├── monitors-eventgrid.tf │ │ ├── outputs.tf │ │ └── versions.tf │ ├── eventhub │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── modules.tf │ │ ├── monitors-eventhub.tf │ │ ├── outputs.tf │ │ └── versions.tf │ ├── functions │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── modules.tf │ │ ├── monitors-functions.tf │ │ ├── outputs.tf │ │ └── versions.tf │ ├── iothubs │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── modules.tf │ │ ├── monitors-iothubs.tf │ │ ├── outputs.tf │ │ └── versions.tf │ ├── keyvault │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── modules.tf │ │ ├── monitors-keyvault.tf │ │ ├── outputs.tf │ │ └── versions.tf │ ├── load-balancer │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── modules.tf │ │ ├── monitors-load-balancer.tf │ │ ├── outputs.tf │ │ └── versions.tf │ ├── mysql │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── locals.tf │ │ ├── modules.tf │ │ ├── monitors-mysql.tf │ │ ├── outputs.tf │ │ └── versions.tf │ ├── postgresql │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── locals.tf │ │ ├── modules.tf │ │ ├── monitors-postgresql.tf │ │ ├── outputs.tf │ │ └── versions.tf │ ├── recovery-services-vault │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── modules.tf │ │ ├── monitors-recovery-services-vault.tf │ │ ├── outputs.tf │ │ └── versions.tf │ ├── redis │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── modules.tf │ │ ├── monitors-azure-redis.tf │ │ ├── outputs.tf │ │ └── versions.tf │ ├── serverfarms │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── modules.tf │ │ ├── monitors-azure-serverfarms.tf │ │ ├── outputs.tf │ │ └── versions.tf │ ├── servicebus │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── modules.tf │ │ ├── monitors-service-bus.tf │ │ ├── outputs.tf │ │ └── versions.tf │ ├── sql-database │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── modules.tf │ │ ├── monitors-sql-database.tf │ │ ├── outputs.tf │ │ └── versions.tf │ ├── sql-elasticpool │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── modules.tf │ │ ├── monitors-sql-elasticpool.tf │ │ ├── outputs.tf │ │ └── versions.tf │ ├── storage │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── modules.tf │ │ ├── monitors-azure-storage.tf │ │ ├── outputs.tf │ │ └── versions.tf │ ├── stream-analytics │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── modules.tf │ │ ├── monitors-stream-analytics.tf │ │ ├── outputs.tf │ │ └── versions.tf │ └── virtual-machine │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── modules.tf │ │ ├── monitors-virtual-machine.tf │ │ ├── outputs.tf │ │ └── versions.tf └── gcp │ ├── big-query │ ├── README.md │ ├── common-inputs.tf │ ├── common-locals.tf │ ├── inputs.tf │ ├── monitors-big-query.tf │ ├── outputs.tf │ └── versions.tf │ ├── cloud-sql │ ├── common │ │ ├── MANIFEST.txt │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── monitors-cloud-sql-common.tf │ │ ├── outputs.tf │ │ └── versions.tf │ └── mysql │ │ ├── MANIFEST.txt │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── monitors-cloudsql-mysql.tf │ │ ├── outputs.tf │ │ └── versions.tf │ ├── gce │ └── instance │ │ ├── MANIFEST.txt │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── monitors-gce-instance.tf │ │ ├── outputs.tf │ │ └── versions.tf │ ├── lb │ ├── README.md │ ├── common-inputs.tf │ ├── common-locals.tf │ ├── inputs.tf │ ├── monitors-lb.tf │ ├── outputs.tf │ └── versions.tf │ ├── memorystore │ └── redis │ │ ├── MANIFEST.txt │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── monitors-memorystore-redis.tf │ │ ├── outputs.tf │ │ └── versions.tf │ └── pubsub │ ├── subscription │ ├── MANIFEST.txt │ ├── README.md │ ├── common-inputs.tf │ ├── common-locals.tf │ ├── inputs.tf │ ├── monitors-subscription.tf │ ├── outputs.tf │ └── versions.tf │ └── topic │ ├── MANIFEST.txt │ ├── README.md │ ├── common-inputs.tf │ ├── common-locals.tf │ ├── inputs.tf │ ├── monitors-topics.tf │ ├── outputs.tf │ └── versions.tf ├── common ├── alerting-message │ ├── README.md │ ├── inputs.tf │ ├── main.tf │ ├── outputs.tf │ └── templates │ │ └── alerting-message.tftpl ├── filter-tags │ ├── README.md │ ├── inputs.tf │ ├── locals.tf │ └── outputs.tf └── module │ ├── inputs.tf │ ├── locals.tf │ └── versions.tf ├── database ├── elasticsearch │ ├── README.md │ ├── common-inputs.tf │ ├── common-locals.tf │ ├── inputs.tf │ ├── modules.tf │ ├── monitors-elasticsearch.tf │ ├── outputs.tf │ └── versions.tf ├── mongodb │ ├── README.md │ ├── common-inputs.tf │ ├── common-locals.tf │ ├── inputs.tf │ ├── modules.tf │ ├── monitors-mongo.tf │ ├── outputs.tf │ └── versions.tf ├── mysql │ ├── README.md │ ├── common-inputs.tf │ ├── common-locals.tf │ ├── inputs.tf │ ├── modules.tf │ ├── monitors-mysql.tf │ ├── outputs.tf │ └── versions.tf ├── pgbouncer │ ├── README.md │ ├── common-inputs.tf │ ├── common-locals.tf │ ├── inputs.tf │ ├── modules.tf │ ├── monitors-pgbouncer.tf │ ├── outputs.tf │ └── versions.tf ├── postgresql │ ├── README.md │ ├── common-inputs.tf │ ├── common-locals.tf │ ├── inputs.tf │ ├── modules.tf │ ├── monitors-postgresql.tf │ ├── outputs.tf │ └── versions.tf ├── proxysql │ ├── README.md │ ├── common-inputs.tf │ ├── common-locals.tf │ ├── inputs.tf │ ├── modules.tf │ ├── monitors-proxysql.tf │ ├── outputs.tf │ └── versions.tf ├── redis │ ├── README.md │ ├── common-inputs.tf │ ├── common-locals.tf │ ├── inputs.tf │ ├── modules.tf │ ├── monitors-redis.tf │ ├── outputs.tf │ └── versions.tf ├── solr │ ├── README.md │ ├── common-inputs.tf │ ├── common-locals.tf │ ├── inputs.tf │ ├── modules.tf │ ├── monitors-solr.tf │ ├── outputs.tf │ └── versions.tf ├── sqlserver │ ├── README.md │ ├── common-inputs.tf │ ├── common-locals.tf │ ├── inputs.tf │ ├── modules.tf │ ├── monitors-sqlserver.tf │ ├── outputs.tf │ └── versions.tf └── zookeeper │ ├── README.md │ ├── common-inputs.tf │ ├── common-locals.tf │ ├── inputs.tf │ ├── modules.tf │ ├── monitors-zookeeper.tf │ ├── outputs.tf │ └── versions.tf ├── middleware ├── apache │ ├── README.md │ ├── common-inputs.tf │ ├── common-locals.tf │ ├── inputs.tf │ ├── modules.tf │ ├── monitors-apache.tf │ ├── outputs.tf │ └── versions.tf ├── kong │ ├── README.md │ ├── common-inputs.tf │ ├── common-locals.tf │ ├── inputs.tf │ ├── modules.tf │ ├── monitors-kong.tf │ ├── outputs.tf │ └── versions.tf ├── nginx │ ├── README.md │ ├── common-inputs.tf │ ├── common-locals.tf │ ├── inputs.tf │ ├── modules.tf │ ├── monitors-nginx.tf │ ├── outputs.tf │ └── versions.tf └── php-fpm │ ├── README.md │ ├── common-inputs.tf │ ├── common-locals.tf │ ├── inputs.tf │ ├── modules.tf │ ├── monitors-fpm.tf │ ├── outputs.tf │ └── versions.tf ├── network ├── dns │ ├── README.md │ ├── common-inputs.tf │ ├── common-locals.tf │ ├── inputs.tf │ ├── modules.tf │ ├── monitors-dns.tf │ ├── outputs.tf │ └── versions.tf ├── http │ ├── ssl │ │ ├── MANIFEST.txt │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── modules.tf │ │ ├── monitors-ssl.tf │ │ ├── outputs.tf │ │ └── versions.tf │ └── webcheck │ │ ├── MANIFEST.txt │ │ ├── README.md │ │ ├── common-inputs.tf │ │ ├── common-locals.tf │ │ ├── inputs.tf │ │ ├── modules.tf │ │ ├── monitors-webcheck.tf │ │ ├── outputs.tf │ │ └── versions.tf └── tls │ ├── README.md │ ├── common-inputs.tf │ ├── common-locals.tf │ ├── inputs.tf │ ├── modules.tf │ ├── monitors-tls.tf │ ├── outputs.tf │ └── versions.tf ├── saas └── new-relic │ ├── README.md │ ├── common-inputs.tf │ ├── common-locals.tf │ ├── inputs.tf │ ├── modules.tf │ ├── monitors-new-relic.tf │ ├── outputs.tf │ └── versions.tf └── system ├── generic ├── README.md ├── common-inputs.tf ├── common-locals.tf ├── inputs.tf ├── modules.tf ├── monitors-system.tf ├── outputs.tf └── versions.tf └── unreachable ├── README.md ├── common-inputs.tf ├── common-locals.tf ├── inputs.tf ├── modules.tf ├── monitors-unreachable.tf ├── outputs.tf └── versions.tf /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @jphilaine @Aohzan 2 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: Monitors 4 | 5 | # Controls when the action will run. Triggers the workflow on push or pull request 6 | # events but only for the master branch 7 | on: [push, pull_request] 8 | 9 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 10 | jobs: 11 | pre_job: 12 | # continue-on-error: true # Uncomment once integration is finished 13 | runs-on: ubuntu-latest 14 | # Map a step output to a job output 15 | outputs: 16 | should_skip: ${{ steps.skip_check.outputs.should_skip }} 17 | steps: 18 | - id: skip_check 19 | name: Skip Duplicate Actions 20 | uses: fkirc/skip-duplicate-actions@v3.4.0 21 | with: 22 | concurrent_skipping: 'same_content' 23 | do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' 24 | 25 | check: 26 | # The type of runner that the job will run on 27 | needs: pre_job 28 | if: ${{ needs.pre_job.outputs.should_skip != 'true' }} 29 | #runs-on: hashicorp/terraform:full 30 | runs-on: ubuntu-latest 31 | container: 32 | image: "claranet/terraform-ci:1.1.5" 33 | 34 | # Steps represent a sequence of tasks that will be executed as part of the job 35 | steps: 36 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 37 | - name: Checkout 38 | uses: actions/checkout@v2 39 | with: 40 | submodules: recursive 41 | 42 | - name: Setup Terraform 43 | uses: hashicorp/setup-terraform@v1 44 | with: 45 | terraform_version: 1.1.5 46 | terraform_wrapper: false 47 | 48 | - name: Run auto update 49 | run: ./scripts/auto_update.sh 50 | 51 | - name: Check git diff 52 | run: ./scripts/auto_update.sh 53 | 54 | - name: Run auto update 55 | run: ./scripts/auto_update.sh 56 | 57 | - name: Check for changes 58 | run: git diff --exit-code 59 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .terraform 2 | terraform.tfvars 3 | /.env.sh 4 | .idea 5 | **/.terraform.lock.hcl 6 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "scripts"] 2 | path = scripts 3 | url = https://github.com/claranet/terraform-datadog-scripts.git 4 | -------------------------------------------------------------------------------- /.terraform-version: -------------------------------------------------------------------------------- 1 | 0.12.17 2 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018-2019 Claranet 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /TEMPLATING.md: -------------------------------------------------------------------------------- 1 | # Templating 2 | 3 | This documentation aims to help contributors to build their monitors: 4 | * working with datadog and using some tips or advices. 5 | * respect guideline to keep this base generic and usable for everybody. 6 | * preserve homogeneity over every modules provided on this repository. 7 | 8 | ## TODO 9 | 10 | To migrate from confluence 11 | -------------------------------------------------------------------------------- /caas/docker/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../common/module/inputs.tf -------------------------------------------------------------------------------- /caas/docker/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../common/module/locals.tf -------------------------------------------------------------------------------- /caas/docker/modules.tf: -------------------------------------------------------------------------------- 1 | module "filter-tags" { 2 | source = "../../common/filter-tags" 3 | 4 | environment = var.environment 5 | resource = "docker" 6 | filter_tags_use_defaults = var.filter_tags_use_defaults 7 | filter_tags_custom = var.filter_tags_custom 8 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 9 | } 10 | -------------------------------------------------------------------------------- /caas/docker/outputs.tf: -------------------------------------------------------------------------------- 1 | output "memory_used_id" { 2 | description = "id for monitor memory_used" 3 | value = datadog_monitor.memory_used.*.id 4 | } 5 | 6 | output "not_responding_id" { 7 | description = "id for monitor not_responding" 8 | value = datadog_monitor.not_responding.*.id 9 | } 10 | 11 | -------------------------------------------------------------------------------- /caas/docker/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /caas/kubernetes/ark/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../../common/module/inputs.tf -------------------------------------------------------------------------------- /caas/kubernetes/ark/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../../common/module/locals.tf -------------------------------------------------------------------------------- /caas/kubernetes/ark/modules.tf: -------------------------------------------------------------------------------- 1 | module "filter-tags" { 2 | source = "../../../common/filter-tags" 3 | 4 | environment = var.environment 5 | resource = "ark" 6 | filter_tags_use_defaults = var.filter_tags_use_defaults 7 | filter_tags_custom = var.filter_tags_custom 8 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 9 | } 10 | 11 | -------------------------------------------------------------------------------- /caas/kubernetes/ark/monitors-ark.tf: -------------------------------------------------------------------------------- 1 | resource "datadog_monitor" "ark_schedules_monitor" { 2 | count = var.ark_schedules_enabled == "true" ? 1 : 0 3 | name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Ark backup failed" 4 | type = "query alert" 5 | message = coalesce(var.ark_schedules_monitor_message, var.message) 6 | 7 | query = < 1 9 | EOQ 10 | 11 | monitor_thresholds { 12 | critical = 1 13 | warning = 0 14 | } 15 | 16 | evaluation_delay = var.evaluation_delay 17 | new_group_delay = var.new_group_delay 18 | no_data_timeframe = var.ark_schedules_monitor_no_data_timeframe 19 | 20 | notify_no_data = var.notify_no_data 21 | renotify_interval = 0 22 | notify_audit = false 23 | timeout_h = var.timeout_h 24 | include_tags = true 25 | require_full_window = false 26 | priority = var.priority 27 | 28 | tags = concat(local.common_tags, var.tags, var.ark_schedules_extra_tags) 29 | } 30 | -------------------------------------------------------------------------------- /caas/kubernetes/ark/outputs.tf: -------------------------------------------------------------------------------- 1 | output "ark_schedules_monitor_id" { 2 | description = "id for monitor ark_schedules_monitor" 3 | value = datadog_monitor.ark_schedules_monitor.*.id 4 | } 5 | 6 | -------------------------------------------------------------------------------- /caas/kubernetes/ark/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /caas/kubernetes/cluster/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../../common/module/inputs.tf -------------------------------------------------------------------------------- /caas/kubernetes/cluster/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../../common/module/locals.tf -------------------------------------------------------------------------------- /caas/kubernetes/cluster/modules.tf: -------------------------------------------------------------------------------- 1 | module "filter-tags" { 2 | source = "../../../common/filter-tags" 3 | 4 | environment = var.environment 5 | resource = "kubernetes" 6 | filter_tags_use_defaults = var.filter_tags_use_defaults 7 | filter_tags_custom = var.filter_tags_custom 8 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 9 | filter_tags_separator = var.filter_tags_separator 10 | } 11 | 12 | -------------------------------------------------------------------------------- /caas/kubernetes/cluster/monitors-k8s-cluster.tf: -------------------------------------------------------------------------------- 1 | resource "datadog_monitor" "apiserver" { 2 | count = var.apiserver_enabled == "true" ? 1 : 0 3 | name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Kubernetes API server does not respond on {{kube_cluster_name}}" 4 | message = coalesce(var.apiserver_message, var.message) 5 | 6 | type = "service check" 7 | 8 | query = < 1000000 39 | EOQ 40 | 41 | monitor_thresholds { 42 | critical = 1000000 # high threshold to handle no data only 43 | } 44 | 45 | new_group_delay = var.new_group_delay 46 | notify_no_data = true 47 | no_data_timeframe = var.heartbeat_no_data_timeframe 48 | renotify_interval = 0 49 | notify_audit = false 50 | timeout_h = var.timeout_h 51 | include_tags = true 52 | require_full_window = true 53 | priority = var.priority 54 | 55 | tags = concat(local.common_tags, var.tags, var.heartbeat_extra_tags) 56 | } 57 | -------------------------------------------------------------------------------- /caas/kubernetes/cluster/outputs.tf: -------------------------------------------------------------------------------- 1 | output "apiserver_id" { 2 | description = "id for monitor apiserver" 3 | value = datadog_monitor.apiserver.*.id 4 | } 5 | 6 | output "heartbeat_id" { 7 | description = "id for monitor heartbeat" 8 | value = datadog_monitor.heartbeat.*.id 9 | } 10 | 11 | -------------------------------------------------------------------------------- /caas/kubernetes/cluster/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /caas/kubernetes/ingress/vts/MANIFEST.txt: -------------------------------------------------------------------------------- 1 | caas-kubernetes 2 | -------------------------------------------------------------------------------- /caas/kubernetes/ingress/vts/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../../../common/module/inputs.tf -------------------------------------------------------------------------------- /caas/kubernetes/ingress/vts/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../../../common/module/locals.tf -------------------------------------------------------------------------------- /caas/kubernetes/ingress/vts/modules.tf: -------------------------------------------------------------------------------- 1 | module "filter-tags" { 2 | source = "../../../../common/filter-tags" 3 | 4 | environment = var.environment 5 | resource = "ingress" 6 | filter_tags_use_defaults = var.filter_tags_use_defaults 7 | filter_tags_custom = var.filter_tags_custom 8 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 9 | filter_tags_separator = var.filter_tags_separator 10 | extra_tags_excluded = ["upstream:upstream-default-backend"] 11 | } 12 | 13 | module "filter-tags-5xx" { 14 | source = "../../../../common/filter-tags" 15 | 16 | environment = var.environment 17 | resource = "ingress" 18 | filter_tags_use_defaults = var.filter_tags_use_defaults 19 | filter_tags_custom = var.filter_tags_custom 20 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 21 | filter_tags_separator = var.filter_tags_separator 22 | extra_tags = ["status_code:5xx"] 23 | extra_tags_excluded = ["upstream:upstream-default-backend"] 24 | } 25 | 26 | module "filter-tags-4xx" { 27 | source = "../../../../common/filter-tags" 28 | 29 | environment = var.environment 30 | resource = "ingress" 31 | filter_tags_use_defaults = var.filter_tags_use_defaults 32 | filter_tags_custom = var.filter_tags_custom 33 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 34 | filter_tags_separator = var.filter_tags_separator 35 | extra_tags = ["status_code:4xx"] 36 | extra_tags_excluded = ["upstream:upstream-default-backend"] 37 | } 38 | 39 | -------------------------------------------------------------------------------- /caas/kubernetes/ingress/vts/outputs.tf: -------------------------------------------------------------------------------- 1 | output "nginx_ingress_is_down_id" { 2 | description = "id for monitor nginx_ingress_is_down" 3 | value = datadog_monitor.nginx_ingress_is_down.*.id 4 | } 5 | 6 | output "nginx_ingress_too_many_4xx_id" { 7 | description = "id for monitor nginx_ingress_too_many_4xx" 8 | value = datadog_monitor.nginx_ingress_too_many_4xx.*.id 9 | } 10 | 11 | output "nginx_ingress_too_many_5xx_id" { 12 | description = "id for monitor nginx_ingress_too_many_5xx" 13 | value = datadog_monitor.nginx_ingress_too_many_5xx.*.id 14 | } 15 | 16 | -------------------------------------------------------------------------------- /caas/kubernetes/ingress/vts/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /caas/kubernetes/node/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../../common/module/inputs.tf -------------------------------------------------------------------------------- /caas/kubernetes/node/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../../common/module/locals.tf -------------------------------------------------------------------------------- /caas/kubernetes/node/modules.tf: -------------------------------------------------------------------------------- 1 | module "filter-tags" { 2 | source = "../../../common/filter-tags" 3 | 4 | environment = var.environment 5 | resource = "kubernetes" 6 | filter_tags_use_defaults = var.filter_tags_use_defaults 7 | filter_tags_custom = var.filter_tags_custom 8 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 9 | filter_tags_separator = var.filter_tags_separator 10 | } 11 | 12 | module "filter-tags-unschedulable" { 13 | source = "../../../common/filter-tags" 14 | 15 | environment = var.environment 16 | resource = "kubernetes" 17 | filter_tags_use_defaults = var.filter_tags_use_defaults 18 | filter_tags_custom = var.filter_tags_custom 19 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 20 | filter_tags_separator = var.filter_tags_separator 21 | extra_tags = ["status:unschedulable"] 22 | } 23 | 24 | -------------------------------------------------------------------------------- /caas/kubernetes/node/outputs.tf: -------------------------------------------------------------------------------- 1 | output "disk_pressure_id" { 2 | description = "id for monitor disk_pressure" 3 | value = datadog_monitor.disk_pressure.*.id 4 | } 5 | 6 | output "kubelet_ping_id" { 7 | description = "id for monitor kubelet_ping" 8 | value = datadog_monitor.kubelet_ping.*.id 9 | } 10 | 11 | output "kubelet_syncloop_id" { 12 | description = "id for monitor kubelet_syncloop" 13 | value = datadog_monitor.kubelet_syncloop.*.id 14 | } 15 | 16 | output "memory_pressure_id" { 17 | description = "id for monitor memory_pressure" 18 | value = datadog_monitor.memory_pressure.*.id 19 | } 20 | 21 | output "node_unschedulable_id" { 22 | description = "id for monitor node_unschedulable" 23 | value = datadog_monitor.node_unschedulable.*.id 24 | } 25 | 26 | output "ready_id" { 27 | description = "id for monitor ready" 28 | value = datadog_monitor.ready.*.id 29 | } 30 | 31 | output "unregister_net_device_id" { 32 | description = "id for monitor unregister_net_device" 33 | value = datadog_monitor.unregister_net_device.*.id 34 | } 35 | 36 | output "volume_inodes_id" { 37 | description = "id for monitor volume_inodes" 38 | value = datadog_monitor.volume_inodes.*.id 39 | } 40 | 41 | output "volume_space_id" { 42 | description = "id for monitor volume_space" 43 | value = datadog_monitor.volume_space.*.id 44 | } 45 | 46 | -------------------------------------------------------------------------------- /caas/kubernetes/node/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /caas/kubernetes/pod/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../../common/module/inputs.tf -------------------------------------------------------------------------------- /caas/kubernetes/pod/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../../common/module/locals.tf -------------------------------------------------------------------------------- /caas/kubernetes/pod/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | pod_group_by = join(", ", var.pod_group_by) 3 | pod_status_group_by = join(", ", var.pod_status_group_by) 4 | } -------------------------------------------------------------------------------- /caas/kubernetes/pod/modules.tf: -------------------------------------------------------------------------------- 1 | module "filter-tags" { 2 | source = "../../../common/filter-tags" 3 | 4 | environment = var.environment 5 | resource = "kubernetes" 6 | filter_tags_use_defaults = var.filter_tags_use_defaults 7 | filter_tags_custom = var.filter_tags_custom 8 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 9 | filter_tags_separator = var.filter_tags_separator 10 | } 11 | 12 | module "filter-tags-phase" { 13 | source = "../../../common/filter-tags" 14 | 15 | environment = var.environment 16 | resource = "kubernetes" 17 | filter_tags_use_defaults = var.filter_tags_use_defaults 18 | filter_tags_custom = var.filter_tags_custom 19 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 20 | filter_tags_separator = var.filter_tags_separator 21 | extra_tags_excluded = ["pod_phase:pending", "pod_phase:running", "pod_phase:succeeded", "pod_phase:unknown"] 22 | } 23 | 24 | module "filter-tags-nocontainercreating" { 25 | source = "../../../common/filter-tags" 26 | 27 | environment = var.environment 28 | resource = "kubernetes" 29 | filter_tags_use_defaults = var.filter_tags_use_defaults 30 | filter_tags_custom = var.filter_tags_custom 31 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 32 | filter_tags_separator = var.filter_tags_separator 33 | extra_tags_excluded = ["reason:containercreating"] 34 | } 35 | 36 | -------------------------------------------------------------------------------- /caas/kubernetes/pod/outputs.tf: -------------------------------------------------------------------------------- 1 | output "error_id" { 2 | description = "id for monitor error" 3 | value = datadog_monitor.error.*.id 4 | } 5 | 6 | output "pod_container_killed_by_oom_id" { 7 | description = "id for monitor pod_container_killed_by_oom" 8 | value = datadog_monitor.pod_container_killed_by_oom.*.id 9 | } 10 | 11 | output "pod_frequently_restarted_id" { 12 | description = "id for monitor pod_frequently_restarted" 13 | value = datadog_monitor.pod_frequently_restarted.*.id 14 | } 15 | 16 | output "pod_phase_status_id" { 17 | description = "id for monitor pod_phase_status" 18 | value = datadog_monitor.pod_phase_status.*.id 19 | } 20 | 21 | output "terminated_id" { 22 | description = "id for monitor terminated" 23 | value = datadog_monitor.terminated.*.id 24 | } 25 | 26 | -------------------------------------------------------------------------------- /caas/kubernetes/pod/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /caas/kubernetes/velero/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../../common/module/inputs.tf -------------------------------------------------------------------------------- /caas/kubernetes/velero/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../../common/module/locals.tf -------------------------------------------------------------------------------- /caas/kubernetes/velero/modules.tf: -------------------------------------------------------------------------------- 1 | module "filter-tags" { 2 | source = "../../../common/filter-tags" 3 | 4 | environment = var.environment 5 | resource = "velero" 6 | filter_tags_use_defaults = var.filter_tags_use_defaults 7 | filter_tags_custom = var.filter_tags_custom 8 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 9 | filter_tags_separator = var.filter_tags_separator 10 | } 11 | 12 | module "filter-tags-scheduled-backup" { 13 | source = "../../../common/filter-tags" 14 | 15 | environment = var.environment 16 | resource = "velero" 17 | filter_tags_use_defaults = var.filter_tags_use_defaults 18 | filter_tags_custom = var.filter_tags_custom 19 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 20 | filter_tags_separator = var.filter_tags_separator 21 | extra_tags_excluded = ["schedule:"] 22 | } 23 | -------------------------------------------------------------------------------- /caas/kubernetes/velero/outputs.tf: -------------------------------------------------------------------------------- 1 | output "velero_backup_deletion_failure_id" { 2 | description = "id for monitor velero_backup_deletion_failure" 3 | value = datadog_monitor.velero_backup_deletion_failure.*.id 4 | } 5 | 6 | output "velero_backup_failure_id" { 7 | description = "id for monitor velero_backup_failure" 8 | value = datadog_monitor.velero_backup_failure.*.id 9 | } 10 | 11 | output "velero_backup_partial_failure_id" { 12 | description = "id for monitor velero_backup_partial_failure" 13 | value = datadog_monitor.velero_backup_partial_failure.*.id 14 | } 15 | 16 | output "velero_scheduled_backup_missing_id" { 17 | description = "id for monitor velero_scheduled_backup_missing" 18 | value = datadog_monitor.velero_scheduled_backup_missing.*.id 19 | } 20 | 21 | output "velero_volume_snapshot_failure_id" { 22 | description = "id for monitor velero_volume_snapshot_failure" 23 | value = datadog_monitor.velero_volume_snapshot_failure.*.id 24 | } 25 | 26 | -------------------------------------------------------------------------------- /caas/kubernetes/velero/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /caas/kubernetes/workload/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../../common/module/inputs.tf -------------------------------------------------------------------------------- /caas/kubernetes/workload/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../../common/module/locals.tf -------------------------------------------------------------------------------- /caas/kubernetes/workload/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | replica_group_by = join(", ", var.replica_group_by) 3 | deployment_group_by = join(", ", var.deployment_group_by) 4 | jobfailed_group_by = join(", ", [for i in var.jobfailed_group_by : format("%q", i)]) 5 | cronjobfailed_group_by = join(", ", [for i in var.cronjobfailed_group_by : format("%q", i)]) 6 | } 7 | -------------------------------------------------------------------------------- /caas/kubernetes/workload/modules.tf: -------------------------------------------------------------------------------- 1 | module "filter-tags" { 2 | source = "../../../common/filter-tags" 3 | 4 | environment = var.environment 5 | resource = "kubernetes" 6 | filter_tags_use_defaults = var.filter_tags_use_defaults 7 | filter_tags_custom = var.filter_tags_custom 8 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 9 | filter_tags_separator = var.filter_tags_separator 10 | } 11 | 12 | -------------------------------------------------------------------------------- /caas/kubernetes/workload/outputs.tf: -------------------------------------------------------------------------------- 1 | output "cronjob_id" { 2 | description = "id for monitor cronjob" 3 | value = datadog_monitor.cronjob.*.id 4 | } 5 | 6 | output "daemonset_pods_not_ready_id" { 7 | description = "id for monitor daemonset_pods_not_ready" 8 | value = datadog_monitor.daemonset_pods_not_ready.*.id 9 | } 10 | 11 | output "deployments_replica_too_low_id" { 12 | description = "id for monitor deployments_replica_too_low" 13 | value = datadog_monitor.deployments_replica_too_low.*.id 14 | } 15 | 16 | output "hpa_cannot_scaleup_further_id" { 17 | description = "id for monitor hpa_cannot_scaleup_further" 18 | value = datadog_monitor.hpa_cannot_scaleup_further.*.id 19 | } 20 | 21 | output "job_id" { 22 | description = "id for monitor job" 23 | value = datadog_monitor.job.*.id 24 | } 25 | 26 | output "pod_disruption_budget_not_respected_id" { 27 | description = "id for monitor pod_disruption_budget_not_respected" 28 | value = datadog_monitor.pod_disruption_budget_not_respected.*.id 29 | } 30 | 31 | output "replica_available_id" { 32 | description = "id for monitor replica_available" 33 | value = datadog_monitor.replica_available.*.id 34 | } 35 | 36 | output "replica_current_id" { 37 | description = "id for monitor replica_current" 38 | value = datadog_monitor.replica_current.*.id 39 | } 40 | 41 | output "replica_ready_id" { 42 | description = "id for monitor replica_ready" 43 | value = datadog_monitor.replica_ready.*.id 44 | } 45 | 46 | output "statefulset_pods_not_ready_id" { 47 | description = "id for monitor statefulset_pods_not_ready" 48 | value = datadog_monitor.statefulset_pods_not_ready.*.id 49 | } 50 | 51 | -------------------------------------------------------------------------------- /caas/kubernetes/workload/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /cloud/aws/alb/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../../common/module/inputs.tf -------------------------------------------------------------------------------- /cloud/aws/alb/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../../common/module/locals.tf -------------------------------------------------------------------------------- /cloud/aws/alb/modules.tf: -------------------------------------------------------------------------------- 1 | module "filter-tags" { 2 | source = "../../../common/filter-tags" 3 | 4 | environment = var.environment 5 | resource = "aws_alb" 6 | filter_tags_use_defaults = var.filter_tags_use_defaults 7 | filter_tags_custom = var.filter_tags_custom 8 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 9 | filter_tags_separator = var.filter_tags_separator 10 | } 11 | 12 | -------------------------------------------------------------------------------- /cloud/aws/alb/outputs.tf: -------------------------------------------------------------------------------- 1 | output "ALB_httpcode_4xx_id" { 2 | description = "id for monitor ALB_httpcode_4xx" 3 | value = datadog_monitor.ALB_httpcode_4xx.*.id 4 | } 5 | 6 | output "ALB_httpcode_5xx_id" { 7 | description = "id for monitor ALB_httpcode_5xx" 8 | value = datadog_monitor.ALB_httpcode_5xx.*.id 9 | } 10 | 11 | output "ALB_httpcode_target_4xx_id" { 12 | description = "id for monitor ALB_httpcode_target_4xx" 13 | value = datadog_monitor.ALB_httpcode_target_4xx.*.id 14 | } 15 | 16 | output "ALB_httpcode_target_5xx_id" { 17 | description = "id for monitor ALB_httpcode_target_5xx" 18 | value = datadog_monitor.ALB_httpcode_target_5xx.*.id 19 | } 20 | 21 | output "ALB_latency_id" { 22 | description = "id for monitor ALB_latency" 23 | value = datadog_monitor.ALB_latency.*.id 24 | } 25 | 26 | output "ALB_no_healthy_instances_id" { 27 | description = "id for monitor ALB_no_healthy_instances" 28 | value = datadog_monitor.ALB_no_healthy_instances.*.id 29 | } 30 | 31 | -------------------------------------------------------------------------------- /cloud/aws/alb/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /cloud/aws/apigateway/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../../common/module/inputs.tf -------------------------------------------------------------------------------- /cloud/aws/apigateway/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../../common/module/locals.tf -------------------------------------------------------------------------------- /cloud/aws/apigateway/outputs.tf: -------------------------------------------------------------------------------- 1 | output "API_Gateway_latency_id" { 2 | description = "id for monitor API_Gateway_latency" 3 | value = datadog_monitor.API_Gateway_latency.*.id 4 | } 5 | 6 | output "API_http_4xx_errors_count_id" { 7 | description = "id for monitor API_http_4xx_errors_count" 8 | value = datadog_monitor.API_http_4xx_errors_count.*.id 9 | } 10 | 11 | output "API_http_5xx_errors_count_id" { 12 | description = "id for monitor API_http_5xx_errors_count" 13 | value = datadog_monitor.API_http_5xx_errors_count.*.id 14 | } 15 | 16 | -------------------------------------------------------------------------------- /cloud/aws/apigateway/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /cloud/aws/beanstalk/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../../common/module/inputs.tf -------------------------------------------------------------------------------- /cloud/aws/beanstalk/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../../common/module/locals.tf -------------------------------------------------------------------------------- /cloud/aws/beanstalk/modules.tf: -------------------------------------------------------------------------------- 1 | module "filter-tags" { 2 | source = "../../../common/filter-tags" 3 | 4 | environment = var.environment 5 | resource = "aws_beanstalk" 6 | filter_tags_use_defaults = var.filter_tags_use_defaults 7 | filter_tags_custom = var.filter_tags_custom 8 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 9 | } 10 | 11 | # With AWS beanstalk some metrics are send per host and per beanstalk env. 12 | # This is particularly the case for all the ApplicationLatency metrics and 13 | # the ApplicationRequests (not for the health and the cpu/disk metrics). 14 | # The best way to find this out is to go on the monitoring configuration page 15 | # of your beanstalk environment. 16 | # 17 | # In order to differentiate those metrics we need to do some exclusion to 18 | # to find out which values has been sent for the host and the one sent for 19 | # the environment itself. 20 | # Some automatic tags are added on the instances by AWS, this seems to be 21 | # the only way to filter at the moment. 22 | # 23 | # This filter exclude the metrics sent for the hosts. 24 | module "filter-tags-no-host" { 25 | source = "../../../common/filter-tags" 26 | 27 | environment = var.environment 28 | resource = "aws_beanstalk" 29 | filter_tags_use_defaults = var.filter_tags_use_defaults 30 | filter_tags_custom = var.filter_tags_custom 31 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 32 | extra_tags_excluded = ["aws_cloudformation_logical-id:awsebautoscalinggroup"] 33 | } 34 | 35 | -------------------------------------------------------------------------------- /cloud/aws/beanstalk/outputs.tf: -------------------------------------------------------------------------------- 1 | output "application_5xx_error_rate_id" { 2 | description = "id for monitor application_5xx_error_rate" 3 | value = datadog_monitor.application_5xx_error_rate.*.id 4 | } 5 | 6 | output "application_latency_p90_id" { 7 | description = "id for monitor application_latency_p90" 8 | value = datadog_monitor.application_latency_p90.*.id 9 | } 10 | 11 | output "health_id" { 12 | description = "id for monitor health" 13 | value = datadog_monitor.health.*.id 14 | } 15 | 16 | output "root_filesystem_usage_id" { 17 | description = "id for monitor root_filesystem_usage" 18 | value = datadog_monitor.root_filesystem_usage.*.id 19 | } 20 | 21 | -------------------------------------------------------------------------------- /cloud/aws/beanstalk/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /cloud/aws/ecs/common/MANIFEST.txt: -------------------------------------------------------------------------------- 1 | cloud-aws 2 | -------------------------------------------------------------------------------- /cloud/aws/ecs/common/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../../../common/module/inputs.tf -------------------------------------------------------------------------------- /cloud/aws/ecs/common/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../../../common/module/locals.tf -------------------------------------------------------------------------------- /cloud/aws/ecs/common/modules.tf: -------------------------------------------------------------------------------- 1 | module "filter-tags" { 2 | source = "../../../../common/filter-tags" 3 | 4 | environment = var.environment 5 | resource = "aws_ecs" 6 | filter_tags_use_defaults = var.filter_tags_use_defaults 7 | filter_tags_custom = var.filter_tags_custom 8 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 9 | filter_tags_separator = var.filter_tags_separator 10 | } 11 | 12 | -------------------------------------------------------------------------------- /cloud/aws/ecs/common/outputs.tf: -------------------------------------------------------------------------------- 1 | output "service_cpu_utilization_id" { 2 | description = "id for monitor service_cpu_utilization" 3 | value = datadog_monitor.service_cpu_utilization.*.id 4 | } 5 | 6 | output "service_memory_utilization_id" { 7 | description = "id for monitor service_memory_utilization" 8 | value = datadog_monitor.service_memory_utilization.*.id 9 | } 10 | 11 | output "service_missing_tasks_id" { 12 | description = "id for monitor service_missing_tasks" 13 | value = datadog_monitor.service_missing_tasks.*.id 14 | } 15 | 16 | -------------------------------------------------------------------------------- /cloud/aws/ecs/common/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /cloud/aws/ecs/ec2-cluster/MANIFEST.txt: -------------------------------------------------------------------------------- 1 | cloud-aws 2 | -------------------------------------------------------------------------------- /cloud/aws/ecs/ec2-cluster/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../../../common/module/inputs.tf -------------------------------------------------------------------------------- /cloud/aws/ecs/ec2-cluster/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../../../common/module/locals.tf -------------------------------------------------------------------------------- /cloud/aws/ecs/ec2-cluster/modules.tf: -------------------------------------------------------------------------------- 1 | module "filter-tags" { 2 | source = "../../../../common/filter-tags" 3 | 4 | environment = var.environment 5 | resource = "aws_ecs" 6 | filter_tags_use_defaults = var.filter_tags_use_defaults 7 | filter_tags_custom = var.filter_tags_custom 8 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 9 | } 10 | 11 | -------------------------------------------------------------------------------- /cloud/aws/ecs/ec2-cluster/outputs.tf: -------------------------------------------------------------------------------- 1 | output "cluster_cpu_utilization_id" { 2 | description = "id for monitor cluster_cpu_utilization" 3 | value = datadog_monitor.cluster_cpu_utilization.*.id 4 | } 5 | 6 | output "cluster_memory_reservation_id" { 7 | description = "id for monitor cluster_memory_reservation" 8 | value = datadog_monitor.cluster_memory_reservation.*.id 9 | } 10 | 11 | output "ecs_agent_status_id" { 12 | description = "id for monitor ecs_agent_status" 13 | value = datadog_monitor.ecs_agent_status.*.id 14 | } 15 | 16 | -------------------------------------------------------------------------------- /cloud/aws/ecs/ec2-cluster/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /cloud/aws/ecs/fargate/MANIFEST.txt: -------------------------------------------------------------------------------- 1 | cloud-aws 2 | -------------------------------------------------------------------------------- /cloud/aws/ecs/fargate/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../../../common/module/inputs.tf -------------------------------------------------------------------------------- /cloud/aws/ecs/fargate/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../../../common/module/locals.tf -------------------------------------------------------------------------------- /cloud/aws/ecs/fargate/modules.tf: -------------------------------------------------------------------------------- 1 | module "filter-tags" { 2 | 3 | source = "../../../../common/filter-tags" 4 | 5 | environment = var.environment 6 | resource = "aws_ecs" 7 | extra_tags_excluded = [ 8 | "ecs_container_name:datadog-agent", 9 | "ecs_container_name:_internal_ecs_pause" 10 | ] 11 | filter_tags_use_defaults = var.filter_tags_use_defaults 12 | filter_tags_custom = var.filter_tags_custom 13 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 14 | filter_tags_separator = var.filter_tags_separator 15 | } 16 | -------------------------------------------------------------------------------- /cloud/aws/ecs/fargate/outputs.tf: -------------------------------------------------------------------------------- 1 | output "cpu_utilization_id" { 2 | description = "id for monitor cpu_utilization" 3 | value = datadog_monitor.cpu_utilization.*.id 4 | } 5 | 6 | output "memory_utilization_id" { 7 | description = "id for monitor memory_utilization" 8 | value = datadog_monitor.memory_utilization.*.id 9 | } 10 | 11 | output "service_check_id" { 12 | description = "id for monitor service_check" 13 | value = datadog_monitor.service_check.*.id 14 | } 15 | 16 | -------------------------------------------------------------------------------- /cloud/aws/ecs/fargate/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /cloud/aws/elasticache/common/MANIFEST.txt: -------------------------------------------------------------------------------- 1 | cloud-aws 2 | -------------------------------------------------------------------------------- /cloud/aws/elasticache/common/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../../../common/module/inputs.tf -------------------------------------------------------------------------------- /cloud/aws/elasticache/common/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../../../common/module/locals.tf -------------------------------------------------------------------------------- /cloud/aws/elasticache/common/modules.tf: -------------------------------------------------------------------------------- 1 | module "filter-tags" { 2 | source = "../../../../common/filter-tags" 3 | 4 | environment = var.environment 5 | resource = "aws_elasticache" 6 | filter_tags_use_defaults = var.filter_tags_use_defaults 7 | filter_tags_custom = var.filter_tags_custom 8 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 9 | filter_tags_separator = var.filter_tags_separator 10 | } 11 | 12 | -------------------------------------------------------------------------------- /cloud/aws/elasticache/common/outputs.tf: -------------------------------------------------------------------------------- 1 | output "elasticache_eviction_id" { 2 | description = "id for monitor elasticache_eviction" 3 | value = datadog_monitor.elasticache_eviction.*.id 4 | } 5 | 6 | output "elasticache_eviction_growing_id" { 7 | description = "id for monitor elasticache_eviction_growing" 8 | value = datadog_monitor.elasticache_eviction_growing.*.id 9 | } 10 | 11 | output "elasticache_free_memory_id" { 12 | description = "id for monitor elasticache_free_memory" 13 | value = datadog_monitor.elasticache_free_memory.*.id 14 | } 15 | 16 | output "elasticache_max_connection_id" { 17 | description = "id for monitor elasticache_max_connection" 18 | value = datadog_monitor.elasticache_max_connection.*.id 19 | } 20 | 21 | output "elasticache_no_connection_id" { 22 | description = "id for monitor elasticache_no_connection" 23 | value = datadog_monitor.elasticache_no_connection.*.id 24 | } 25 | 26 | output "elasticache_swap_id" { 27 | description = "id for monitor elasticache_swap" 28 | value = datadog_monitor.elasticache_swap.*.id 29 | } 30 | 31 | -------------------------------------------------------------------------------- /cloud/aws/elasticache/common/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /cloud/aws/elasticache/memcached/MANIFEST.txt: -------------------------------------------------------------------------------- 1 | cloud-aws 2 | -------------------------------------------------------------------------------- /cloud/aws/elasticache/memcached/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../../../common/module/inputs.tf -------------------------------------------------------------------------------- /cloud/aws/elasticache/memcached/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../../../common/module/locals.tf -------------------------------------------------------------------------------- /cloud/aws/elasticache/memcached/modules.tf: -------------------------------------------------------------------------------- 1 | module "filter-tags" { 2 | source = "../../../../common/filter-tags" 3 | 4 | environment = var.environment 5 | resource = "aws_elasticache" 6 | filter_tags_use_defaults = var.filter_tags_use_defaults 7 | filter_tags_custom = var.filter_tags_custom 8 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 9 | } 10 | 11 | -------------------------------------------------------------------------------- /cloud/aws/elasticache/memcached/outputs.tf: -------------------------------------------------------------------------------- 1 | output "memcached_cpu_high_id" { 2 | description = "id for monitor memcached_cpu_high" 3 | value = datadog_monitor.memcached_cpu_high.*.id 4 | } 5 | 6 | output "memcached_get_hits_id" { 7 | description = "id for monitor memcached_get_hits" 8 | value = datadog_monitor.memcached_get_hits.*.id 9 | } 10 | 11 | -------------------------------------------------------------------------------- /cloud/aws/elasticache/memcached/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /cloud/aws/elasticache/redis/MANIFEST.txt: -------------------------------------------------------------------------------- 1 | cloud-aws 2 | -------------------------------------------------------------------------------- /cloud/aws/elasticache/redis/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../../../common/module/inputs.tf -------------------------------------------------------------------------------- /cloud/aws/elasticache/redis/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../../../common/module/locals.tf -------------------------------------------------------------------------------- /cloud/aws/elasticache/redis/modules.tf: -------------------------------------------------------------------------------- 1 | module "filter-tags" { 2 | source = "../../../../common/filter-tags" 3 | 4 | environment = var.environment 5 | resource = "aws_elasticache" 6 | filter_tags_use_defaults = var.filter_tags_use_defaults 7 | filter_tags_custom = var.filter_tags_custom 8 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 9 | filter_tags_separator = var.filter_tags_separator 10 | } 11 | 12 | -------------------------------------------------------------------------------- /cloud/aws/elasticache/redis/outputs.tf: -------------------------------------------------------------------------------- 1 | output "redis_cache_hits_id" { 2 | description = "id for monitor redis_cache_hits" 3 | value = datadog_monitor.redis_cache_hits.*.id 4 | } 5 | 6 | output "redis_commands_id" { 7 | description = "id for monitor redis_commands" 8 | value = datadog_monitor.redis_commands.*.id 9 | } 10 | 11 | output "redis_cpu_high_id" { 12 | description = "id for monitor redis_cpu_high" 13 | value = datadog_monitor.redis_cpu_high.*.id 14 | } 15 | 16 | output "redis_replication_lag_id" { 17 | description = "id for monitor redis_replication_lag" 18 | value = datadog_monitor.redis_replication_lag.*.id 19 | } 20 | 21 | -------------------------------------------------------------------------------- /cloud/aws/elasticache/redis/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /cloud/aws/elasticsearch/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../../common/module/inputs.tf -------------------------------------------------------------------------------- /cloud/aws/elasticsearch/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../../common/module/locals.tf -------------------------------------------------------------------------------- /cloud/aws/elasticsearch/modules.tf: -------------------------------------------------------------------------------- 1 | module "filter-tags" { 2 | source = "../../../common/filter-tags" 3 | 4 | environment = var.environment 5 | resource = "aws_elasticsearch" 6 | filter_tags_use_defaults = var.filter_tags_use_defaults 7 | filter_tags_custom = var.filter_tags_custom 8 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 9 | } 10 | 11 | -------------------------------------------------------------------------------- /cloud/aws/elasticsearch/outputs.tf: -------------------------------------------------------------------------------- 1 | output "es_cluster_status_id" { 2 | description = "id for monitor es_cluster_status" 3 | value = datadog_monitor.es_cluster_status.*.id 4 | } 5 | 6 | output "es_cpu_90_15min_id" { 7 | description = "id for monitor es_cpu_90_15min" 8 | value = datadog_monitor.es_cpu_90_15min.*.id 9 | } 10 | 11 | output "es_free_space_low_id" { 12 | description = "id for monitor es_free_space_low" 13 | value = datadog_monitor.es_free_space_low.*.id 14 | } 15 | 16 | -------------------------------------------------------------------------------- /cloud/aws/elasticsearch/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /cloud/aws/elb/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../../common/module/inputs.tf -------------------------------------------------------------------------------- /cloud/aws/elb/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../../common/module/locals.tf -------------------------------------------------------------------------------- /cloud/aws/elb/modules.tf: -------------------------------------------------------------------------------- 1 | module "filter-tags" { 2 | source = "../../../common/filter-tags" 3 | 4 | environment = var.environment 5 | resource = "aws_elb" 6 | filter_tags_use_defaults = var.filter_tags_use_defaults 7 | filter_tags_custom = var.filter_tags_custom 8 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 9 | } 10 | 11 | -------------------------------------------------------------------------------- /cloud/aws/elb/outputs.tf: -------------------------------------------------------------------------------- 1 | output "ELB_backend_latency_id" { 2 | description = "id for monitor ELB_backend_latency" 3 | value = datadog_monitor.ELB_backend_latency.*.id 4 | } 5 | 6 | output "ELB_no_healthy_instances_id" { 7 | description = "id for monitor ELB_no_healthy_instances" 8 | value = datadog_monitor.ELB_no_healthy_instances.*.id 9 | } 10 | 11 | output "ELB_too_much_4xx_id" { 12 | description = "id for monitor ELB_too_much_4xx" 13 | value = datadog_monitor.ELB_too_much_4xx.*.id 14 | } 15 | 16 | output "ELB_too_much_4xx_backend_id" { 17 | description = "id for monitor ELB_too_much_4xx_backend" 18 | value = datadog_monitor.ELB_too_much_4xx_backend.*.id 19 | } 20 | 21 | output "ELB_too_much_5xx_id" { 22 | description = "id for monitor ELB_too_much_5xx" 23 | value = datadog_monitor.ELB_too_much_5xx.*.id 24 | } 25 | 26 | output "ELB_too_much_5xx_backend_id" { 27 | description = "id for monitor ELB_too_much_5xx_backend" 28 | value = datadog_monitor.ELB_too_much_5xx_backend.*.id 29 | } 30 | 31 | -------------------------------------------------------------------------------- /cloud/aws/elb/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /cloud/aws/kinesis-firehose/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../../common/module/inputs.tf -------------------------------------------------------------------------------- /cloud/aws/kinesis-firehose/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../../common/module/locals.tf -------------------------------------------------------------------------------- /cloud/aws/kinesis-firehose/modules.tf: -------------------------------------------------------------------------------- 1 | module "filter-tags" { 2 | source = "../../../common/filter-tags" 3 | 4 | environment = var.environment 5 | resource = "aws_kinesis-firehose" 6 | filter_tags_use_defaults = var.filter_tags_use_defaults 7 | filter_tags_custom = var.filter_tags_custom 8 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 9 | } 10 | 11 | -------------------------------------------------------------------------------- /cloud/aws/kinesis-firehose/monitors-kinesis-firehose.tf: -------------------------------------------------------------------------------- 1 | ### Kinesis Firehose Incoming records ### 2 | resource "datadog_monitor" "firehose_incoming_records" { 3 | count = var.incoming_records_enabled == "true" ? 1 : 0 4 | name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Kinesis Firehose No incoming records" 5 | message = coalesce(var.incoming_records_message, var.message) 6 | type = "query alert" 7 | 8 | query = < ${var.aurora_replicalag_threshold_critical} 12 | EOQ 13 | 14 | monitor_thresholds { 15 | warning = var.aurora_replicalag_threshold_warning 16 | critical = var.aurora_replicalag_threshold_critical 17 | } 18 | 19 | evaluation_delay = var.evaluation_delay 20 | new_group_delay = var.new_group_delay 21 | notify_no_data = var.notify_no_data 22 | no_data_timeframe = var.rds_aurora_mysql_replica_lag_no_data_timeframe 23 | notify_audit = false 24 | timeout_h = var.timeout_h 25 | include_tags = true 26 | require_full_window = false 27 | priority = var.priority 28 | 29 | tags = concat(local.common_tags, var.tags, var.aurora_replicalag_extra_tags) 30 | } 31 | -------------------------------------------------------------------------------- /cloud/aws/rds/aurora/mysql/outputs.tf: -------------------------------------------------------------------------------- 1 | output "rds_aurora_mysql_replica_lag_id" { 2 | description = "id for monitor rds_aurora_mysql_replica_lag" 3 | value = datadog_monitor.rds_aurora_mysql_replica_lag.*.id 4 | } 5 | 6 | -------------------------------------------------------------------------------- /cloud/aws/rds/aurora/mysql/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /cloud/aws/rds/aurora/postgresql/MANIFEST.txt: -------------------------------------------------------------------------------- 1 | cloud-aws 2 | -------------------------------------------------------------------------------- /cloud/aws/rds/aurora/postgresql/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../../../../common/module/inputs.tf -------------------------------------------------------------------------------- /cloud/aws/rds/aurora/postgresql/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../../../../common/module/locals.tf -------------------------------------------------------------------------------- /cloud/aws/rds/aurora/postgresql/modules.tf: -------------------------------------------------------------------------------- 1 | module "filter-tags" { 2 | source = "../../../../../common/filter-tags" 3 | 4 | environment = var.environment 5 | resource = "aws_rds" 6 | filter_tags_use_defaults = var.filter_tags_use_defaults 7 | filter_tags_custom = var.filter_tags_custom 8 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 9 | } 10 | 11 | -------------------------------------------------------------------------------- /cloud/aws/rds/aurora/postgresql/monitors-rds-aurora-postgresql.tf: -------------------------------------------------------------------------------- 1 | ### RDS Aurora Postgresql Replica Lag monitor ### 2 | resource "datadog_monitor" "rds_aurora_postgresql_replica_lag" { 3 | count = var.aurora_replicalag_enabled == "true" ? 1 : 0 4 | name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] RDS Aurora PostgreSQL replica lag {{#is_alert}}{{{comparator}}} {{threshold}} ms ({{value}}ms){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ms ({{value}}ms){{/is_warning}}" 5 | message = coalesce(var.aurora_replicalag_message, var.message) 6 | type = "query alert" 7 | 8 | query = < ${var.aurora_replicalag_threshold_critical} 12 | EOQ 13 | 14 | monitor_thresholds { 15 | warning = var.aurora_replicalag_threshold_warning 16 | critical = var.aurora_replicalag_threshold_critical 17 | } 18 | 19 | evaluation_delay = var.evaluation_delay 20 | new_group_delay = var.new_group_delay 21 | notify_no_data = var.notify_no_data 22 | no_data_timeframe = var.rds_aurora_postgresql_replica_lag_no_data_timeframe 23 | notify_audit = false 24 | timeout_h = var.timeout_h 25 | include_tags = true 26 | require_full_window = false 27 | priority = var.priority 28 | 29 | tags = concat(local.common_tags, var.tags, var.aurora_replicalag_extra_tags) 30 | } 31 | -------------------------------------------------------------------------------- /cloud/aws/rds/aurora/postgresql/outputs.tf: -------------------------------------------------------------------------------- 1 | output "rds_aurora_postgresql_replica_lag_id" { 2 | description = "id for monitor rds_aurora_postgresql_replica_lag" 3 | value = datadog_monitor.rds_aurora_postgresql_replica_lag.*.id 4 | } 5 | 6 | -------------------------------------------------------------------------------- /cloud/aws/rds/aurora/postgresql/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /cloud/aws/rds/common/MANIFEST.txt: -------------------------------------------------------------------------------- 1 | cloud-aws 2 | -------------------------------------------------------------------------------- /cloud/aws/rds/common/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../../../common/module/inputs.tf -------------------------------------------------------------------------------- /cloud/aws/rds/common/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../../../common/module/locals.tf -------------------------------------------------------------------------------- /cloud/aws/rds/common/modules.tf: -------------------------------------------------------------------------------- 1 | module "filter-tags" { 2 | source = "../../../../common/filter-tags" 3 | 4 | environment = var.environment 5 | resource = "aws_rds" 6 | filter_tags_use_defaults = var.filter_tags_use_defaults 7 | filter_tags_custom = var.filter_tags_custom 8 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 9 | filter_tags_separator = var.filter_tags_separator 10 | } 11 | 12 | -------------------------------------------------------------------------------- /cloud/aws/rds/common/outputs.tf: -------------------------------------------------------------------------------- 1 | output "rds_connection_variance_id" { 2 | description = "id for monitor rds_connection_variance" 3 | value = datadog_monitor.rds_connection_variance.*.id 4 | } 5 | 6 | output "rds_cpu_90_15min_id" { 7 | description = "id for monitor rds_cpu_90_15min" 8 | value = datadog_monitor.rds_cpu_90_15min.*.id 9 | } 10 | 11 | output "rds_free_space_low_id" { 12 | description = "id for monitor rds_free_space_low" 13 | value = datadog_monitor.rds_free_space_low.*.id 14 | } 15 | 16 | output "rds_replica_lag_id" { 17 | description = "id for monitor rds_replica_lag" 18 | value = datadog_monitor.rds_replica_lag.*.id 19 | } 20 | 21 | -------------------------------------------------------------------------------- /cloud/aws/rds/common/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /cloud/aws/sqs/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../../common/module/inputs.tf -------------------------------------------------------------------------------- /cloud/aws/sqs/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../../common/module/locals.tf -------------------------------------------------------------------------------- /cloud/aws/sqs/modules.tf: -------------------------------------------------------------------------------- 1 | module "filter-tags" { 2 | source = "../../../common/filter-tags" 3 | 4 | environment = var.environment 5 | resource = "aws_sqs" 6 | filter_tags_use_defaults = var.filter_tags_use_defaults 7 | filter_tags_custom = var.filter_tags_custom 8 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 9 | filter_tags_separator = var.filter_tags_separator 10 | } 11 | -------------------------------------------------------------------------------- /cloud/aws/sqs/outputs.tf: -------------------------------------------------------------------------------- 1 | output "age_of_oldest_message_id" { 2 | description = "id for monitor age_of_oldest_message" 3 | value = datadog_monitor.age_of_oldest_message.*.id 4 | } 5 | 6 | output "visible_messages_id" { 7 | description = "id for monitor visible_messages" 8 | value = datadog_monitor.visible_messages.*.id 9 | } 10 | 11 | -------------------------------------------------------------------------------- /cloud/aws/sqs/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /cloud/aws/vpn/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../../common/module/inputs.tf -------------------------------------------------------------------------------- /cloud/aws/vpn/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../../common/module/locals.tf -------------------------------------------------------------------------------- /cloud/aws/vpn/inputs.tf: -------------------------------------------------------------------------------- 1 | # Global variables 2 | variable "tags" { 3 | type = list(string) 4 | default = ["type:cloud", "provider:aws", "resource:vpn"] 5 | } 6 | 7 | # Global DataDog 8 | variable "evaluation_delay" { 9 | description = "Delay in seconds for the metric evaluation" 10 | default = 900 11 | } 12 | 13 | 14 | variable "new_group_delay" { 15 | description = "Delay in seconds before monitor new resource" 16 | default = 300 17 | } 18 | 19 | variable "timeout_h" { 20 | description = "Default auto-resolving state (in hours)" 21 | default = 0 22 | } 23 | 24 | variable "prefix_slug" { 25 | description = "Prefix string to prepend between brackets on every monitors names" 26 | default = "" 27 | } 28 | 29 | variable "notify_no_data" { 30 | description = "Will raise no data alert if set to true" 31 | default = true 32 | } 33 | 34 | variable "vpn_status_no_data_timeframe" { 35 | description = "Number of minutes before reporting no data" 36 | type = string 37 | default = 10 38 | } 39 | 40 | variable "message" { 41 | description = "Message sent when an alert is triggered" 42 | } 43 | 44 | variable "filter_tags" { 45 | description = "Tags used for metrics filtering" 46 | default = "*" 47 | } 48 | 49 | variable "vpn_status_enabled" { 50 | description = "Flag to enable VPN status monitor" 51 | type = string 52 | default = "true" 53 | } 54 | 55 | variable "vpn_status_extra_tags" { 56 | description = "Extra tags for VPN status monitor" 57 | type = list(string) 58 | default = [] 59 | } 60 | 61 | variable "vpn_status_message" { 62 | description = "Custom message for VPN status monitor" 63 | type = string 64 | default = "" 65 | } 66 | 67 | variable "vpn_status_time_aggregator" { 68 | description = "Monitor aggregator for VPN status [available values: min, max or avg]" 69 | type = string 70 | default = "max" 71 | } 72 | 73 | variable "vpn_status_timeframe" { 74 | description = "Monitor timeframe for VPN status [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" 75 | type = string 76 | default = "last_5m" 77 | } 78 | 79 | -------------------------------------------------------------------------------- /cloud/aws/vpn/monitors-vpn.tf: -------------------------------------------------------------------------------- 1 | resource "datadog_monitor" "VPN_status" { 2 | count = var.vpn_status_enabled == "true" ? 1 : 0 3 | name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] VPN tunnel down" 4 | message = coalesce(var.vpn_status_message, var.message) 5 | type = "query alert" 6 | 7 | query = < 0 11 | EOQ 12 | 13 | evaluation_delay = var.evaluation_delay 14 | new_group_delay = var.new_group_delay 15 | notify_no_data = var.notify_no_data 16 | no_data_timeframe = var.no_data_timeframe 17 | renotify_interval = 0 18 | notify_audit = false 19 | timeout_h = var.timeout_h 20 | include_tags = true 21 | require_full_window = false 22 | priority = var.priority 23 | 24 | tags = concat(local.common_tags, var.tags, var.backup_unhealthy_event_extra_tags) 25 | } 26 | 27 | resource "datadog_monitor" "backup_vault_restore_unhealthy_event" { 28 | count = var.restore_unhealthy_event_enabled == "true" ? 1 : 0 29 | name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Backup Vault {{name}} has a backup unhealthy event" 30 | message = coalesce(var.restore_unhealthy_event_message, var.message) 31 | type = "query alert" 32 | 33 | query = < 0 37 | EOQ 38 | 39 | evaluation_delay = var.evaluation_delay 40 | new_group_delay = var.new_group_delay 41 | notify_no_data = false 42 | renotify_interval = 0 43 | notify_audit = false 44 | timeout_h = var.timeout_h 45 | include_tags = true 46 | require_full_window = false 47 | priority = var.priority 48 | 49 | tags = concat(local.common_tags, var.tags, var.restore_unhealthy_event_extra_tags) 50 | } 51 | -------------------------------------------------------------------------------- /cloud/azure/backup-vault/outputs.tf: -------------------------------------------------------------------------------- 1 | output "backup_vault_backup_unhealthy_event_id" { 2 | description = "id for monitor backup_vault_backup_unhealthy_event" 3 | value = datadog_monitor.backup_vault_backup_unhealthy_event.*.id 4 | } 5 | 6 | output "backup_vault_restore_unhealthy_event_id" { 7 | description = "id for monitor backup_vault_restore_unhealthy_event" 8 | value = datadog_monitor.backup_vault_restore_unhealthy_event.*.id 9 | } 10 | 11 | -------------------------------------------------------------------------------- /cloud/azure/backup-vault/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /cloud/azure/cosmosdb/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../../common/module/inputs.tf -------------------------------------------------------------------------------- /cloud/azure/cosmosdb/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../../common/module/locals.tf -------------------------------------------------------------------------------- /cloud/azure/cosmosdb/modules.tf: -------------------------------------------------------------------------------- 1 | module "filter-tags" { 2 | source = "../../../common/filter-tags" 3 | 4 | environment = var.environment 5 | resource = "azure_cosmosdb" 6 | filter_tags_use_defaults = var.filter_tags_use_defaults 7 | filter_tags_custom = var.filter_tags_custom 8 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 9 | } 10 | 11 | module "filter-tags-statuscode" { 12 | source = "../../../common/filter-tags" 13 | 14 | environment = var.environment 15 | resource = "azure_cosmosdb" 16 | filter_tags_use_defaults = var.filter_tags_use_defaults 17 | filter_tags_custom = var.filter_tags_custom 18 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 19 | extra_tags = ["statuscode:%s"] 20 | } 21 | 22 | -------------------------------------------------------------------------------- /cloud/azure/cosmosdb/outputs.tf: -------------------------------------------------------------------------------- 1 | output "cosmos_db_4xx_requests_id" { 2 | description = "id for monitor cosmos_db_4xx_requests" 3 | value = datadog_monitor.cosmos_db_4xx_requests.*.id 4 | } 5 | 6 | output "cosmos_db_5xx_requests_id" { 7 | description = "id for monitor cosmos_db_5xx_requests" 8 | value = datadog_monitor.cosmos_db_5xx_requests.*.id 9 | } 10 | 11 | output "cosmos_db_scaling_id" { 12 | description = "id for monitor cosmos_db_scaling" 13 | value = datadog_monitor.cosmos_db_scaling.*.id 14 | } 15 | 16 | output "cosmos_db_status_id" { 17 | description = "id for monitor cosmos_db_status" 18 | value = datadog_monitor.cosmos_db_status.*.id 19 | } 20 | 21 | -------------------------------------------------------------------------------- /cloud/azure/cosmosdb/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /cloud/azure/datalakestore/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../../common/module/inputs.tf -------------------------------------------------------------------------------- /cloud/azure/datalakestore/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../../common/module/locals.tf -------------------------------------------------------------------------------- /cloud/azure/datalakestore/modules.tf: -------------------------------------------------------------------------------- 1 | module "filter-tags" { 2 | source = "../../../common/filter-tags" 3 | 4 | environment = var.environment 5 | resource = "azure_datalakestore" 6 | filter_tags_use_defaults = var.filter_tags_use_defaults 7 | filter_tags_custom = var.filter_tags_custom 8 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 9 | } 10 | 11 | -------------------------------------------------------------------------------- /cloud/azure/datalakestore/monitors-datalakestore.tf: -------------------------------------------------------------------------------- 1 | resource "datadog_monitor" "datalakestore_status" { 2 | count = var.status_enabled == "true" ? 1 : 0 3 | name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Datalake Store is down" 4 | message = coalesce(var.status_message, var.message) 5 | type = "query alert" 6 | 7 | query = < ${var.replication_lag_threshold_critical} 14 | EOQ 15 | 16 | monitor_thresholds { 17 | critical = var.replication_lag_threshold_critical 18 | warning = var.replication_lag_threshold_warning 19 | } 20 | 21 | evaluation_delay = var.evaluation_delay 22 | new_group_delay = var.new_group_delay 23 | notify_audit = false 24 | timeout_h = var.timeout_h 25 | include_tags = true 26 | require_full_window = false 27 | notify_no_data = var.notify_no_data 28 | no_data_timeframe = var.replication_lag_no_data_timeframe 29 | renotify_interval = 0 30 | priority = var.priority 31 | 32 | tags = concat(local.common_tags, var.tags, var.replication_lag_extra_tags) 33 | } 34 | -------------------------------------------------------------------------------- /cloud/gcp/cloud-sql/mysql/outputs.tf: -------------------------------------------------------------------------------- 1 | output "replication_lag_id" { 2 | description = "id for monitor replication_lag" 3 | value = datadog_monitor.replication_lag.*.id 4 | } 5 | 6 | -------------------------------------------------------------------------------- /cloud/gcp/cloud-sql/mysql/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /cloud/gcp/gce/instance/MANIFEST.txt: -------------------------------------------------------------------------------- 1 | cloud-gcp 2 | -------------------------------------------------------------------------------- /cloud/gcp/gce/instance/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../../../common/module/inputs.tf -------------------------------------------------------------------------------- /cloud/gcp/gce/instance/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../../../common/module/locals.tf -------------------------------------------------------------------------------- /cloud/gcp/gce/instance/outputs.tf: -------------------------------------------------------------------------------- 1 | output "cpu_utilization_id" { 2 | description = "id for monitor cpu_utilization" 3 | value = datadog_monitor.cpu_utilization.*.id 4 | } 5 | 6 | output "disk_throttled_bps_id" { 7 | description = "id for monitor disk_throttled_bps" 8 | value = datadog_monitor.disk_throttled_bps.*.id 9 | } 10 | 11 | output "disk_throttled_ops_id" { 12 | description = "id for monitor disk_throttled_ops" 13 | value = datadog_monitor.disk_throttled_ops.*.id 14 | } 15 | 16 | -------------------------------------------------------------------------------- /cloud/gcp/gce/instance/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /cloud/gcp/lb/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../../common/module/inputs.tf -------------------------------------------------------------------------------- /cloud/gcp/lb/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../../common/module/locals.tf -------------------------------------------------------------------------------- /cloud/gcp/lb/outputs.tf: -------------------------------------------------------------------------------- 1 | output "backend_latency_bucket_id" { 2 | description = "id for monitor backend_latency_bucket" 3 | value = datadog_monitor.backend_latency_bucket.*.id 4 | } 5 | 6 | output "backend_latency_service_id" { 7 | description = "id for monitor backend_latency_service" 8 | value = datadog_monitor.backend_latency_service.*.id 9 | } 10 | 11 | output "error_rate_4xx_id" { 12 | description = "id for monitor error_rate_4xx" 13 | value = datadog_monitor.error_rate_4xx.*.id 14 | } 15 | 16 | output "error_rate_5xx_id" { 17 | description = "id for monitor error_rate_5xx" 18 | value = datadog_monitor.error_rate_5xx.*.id 19 | } 20 | 21 | output "request_count_id" { 22 | description = "id for monitor request_count" 23 | value = datadog_monitor.request_count.*.id 24 | } 25 | 26 | -------------------------------------------------------------------------------- /cloud/gcp/lb/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /cloud/gcp/memorystore/redis/MANIFEST.txt: -------------------------------------------------------------------------------- 1 | cloud-gcp 2 | -------------------------------------------------------------------------------- /cloud/gcp/memorystore/redis/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../../../common/module/inputs.tf -------------------------------------------------------------------------------- /cloud/gcp/memorystore/redis/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../../../common/module/locals.tf -------------------------------------------------------------------------------- /cloud/gcp/memorystore/redis/monitors-memorystore-redis.tf: -------------------------------------------------------------------------------- 1 | # 2 | # System memory usage ratio 3 | # 4 | resource "datadog_monitor" "system_memory_usage_ratio" { 5 | count = var.system_memory_usage_ratio_enabled == "true" ? 1 : 0 6 | name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Memorystore Redis system memory usage ratio {{#is_alert}}{{{comparator}}} {{threshold}}s ({{value}}s){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}s ({{value}}s){{/is_warning}}" 7 | message = coalesce(var.system_memory_usage_ratio_message, var.message) 8 | type = "metric alert" 9 | 10 | query = < ${var.system_memory_usage_ratio_threshold_critical} 14 | EOQ 15 | 16 | monitor_thresholds { 17 | critical = var.system_memory_usage_ratio_threshold_critical 18 | warning = var.system_memory_usage_ratio_threshold_warning 19 | } 20 | 21 | evaluation_delay = var.evaluation_delay 22 | new_group_delay = var.new_group_delay 23 | notify_audit = false 24 | timeout_h = var.timeout_h 25 | include_tags = true 26 | require_full_window = false 27 | notify_no_data = var.notify_no_data 28 | no_data_timeframe = var.system_memory_usage_ratio_no_data_timeframe 29 | renotify_interval = 0 30 | priority = var.priority 31 | 32 | tags = concat(local.common_tags, var.tags, var.system_memory_usage_ratio_extra_tags) 33 | } 34 | -------------------------------------------------------------------------------- /cloud/gcp/memorystore/redis/outputs.tf: -------------------------------------------------------------------------------- 1 | output "system_memory_usage_ratio_id" { 2 | description = "id for monitor system_memory_usage_ratio" 3 | value = datadog_monitor.system_memory_usage_ratio.*.id 4 | } 5 | 6 | -------------------------------------------------------------------------------- /cloud/gcp/memorystore/redis/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /cloud/gcp/pubsub/subscription/MANIFEST.txt: -------------------------------------------------------------------------------- 1 | cloud-gcp 2 | -------------------------------------------------------------------------------- /cloud/gcp/pubsub/subscription/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../../../common/module/inputs.tf -------------------------------------------------------------------------------- /cloud/gcp/pubsub/subscription/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../../../common/module/locals.tf -------------------------------------------------------------------------------- /cloud/gcp/pubsub/subscription/outputs.tf: -------------------------------------------------------------------------------- 1 | output "oldest_unacked_message_age_id" { 2 | description = "id for monitor oldest_unacked_message_age" 3 | value = datadog_monitor.oldest_unacked_message_age.*.id 4 | } 5 | 6 | output "subscription_push_latency_id" { 7 | description = "id for monitor subscription_push_latency" 8 | value = datadog_monitor.subscription_push_latency.*.id 9 | } 10 | 11 | output "subscription_push_latency_anomaly_id" { 12 | description = "id for monitor subscription_push_latency_anomaly" 13 | value = datadog_monitor.subscription_push_latency_anomaly.*.id 14 | } 15 | 16 | -------------------------------------------------------------------------------- /cloud/gcp/pubsub/subscription/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /cloud/gcp/pubsub/topic/MANIFEST.txt: -------------------------------------------------------------------------------- 1 | cloud-gcp 2 | -------------------------------------------------------------------------------- /cloud/gcp/pubsub/topic/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../../../common/module/inputs.tf -------------------------------------------------------------------------------- /cloud/gcp/pubsub/topic/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../../../common/module/locals.tf -------------------------------------------------------------------------------- /cloud/gcp/pubsub/topic/outputs.tf: -------------------------------------------------------------------------------- 1 | output "sending_operations_count_id" { 2 | description = "id for monitor sending_operations_count" 3 | value = datadog_monitor.sending_operations_count.*.id 4 | } 5 | 6 | output "unavailable_sending_operations_count_id" { 7 | description = "id for monitor unavailable_sending_operations_count" 8 | value = datadog_monitor.unavailable_sending_operations_count.*.id 9 | } 10 | 11 | output "unavailable_sending_operations_ratio_id" { 12 | description = "id for monitor unavailable_sending_operations_ratio" 13 | value = datadog_monitor.unavailable_sending_operations_ratio.*.id 14 | } 15 | 16 | -------------------------------------------------------------------------------- /cloud/gcp/pubsub/topic/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /common/alerting-message/inputs.tf: -------------------------------------------------------------------------------- 1 | variable "message_alert" { 2 | description = "Define a broadcast channel for critical alerts" 3 | type = string 4 | } 5 | 6 | variable "message_warning" { 7 | description = "Define a broadcast channel for warning alerts" 8 | type = string 9 | default = null 10 | } 11 | 12 | variable "message_nodata" { 13 | description = "Define a broadcast channel for nodata alerts" 14 | type = string 15 | default = null 16 | } 17 | 18 | variable "prepend_text" { 19 | description = "Optional free text string to prepend to alert" 20 | type = string 21 | default = "" 22 | } 23 | 24 | variable "append_text" { 25 | description = "Optional free text string to append to alert" 26 | type = string 27 | default = "" 28 | } 29 | 30 | 31 | -------------------------------------------------------------------------------- /common/alerting-message/main.tf: -------------------------------------------------------------------------------- 1 | 2 | locals { 3 | alerting-message = templatefile( 4 | "${path.module}/templates/alerting-message.tftpl", 5 | { 6 | message_alert = var.message_alert, 7 | message_warning = var.message_warning == null ? var.message_alert : var.message_warning, 8 | message_nodata = var.message_nodata == null ? var.message_alert : var.message_nodata, 9 | message_recovery = join(" ", compact(distinct([var.message_alert, var.message_warning, var.message_nodata]))), 10 | prepend_text = var.prepend_text, 11 | append_text = var.append_text 12 | }) 13 | } 14 | -------------------------------------------------------------------------------- /common/alerting-message/outputs.tf: -------------------------------------------------------------------------------- 1 | output "alerting-message" { 2 | description = "The generated message string" 3 | value = local.alerting-message 4 | } 5 | 6 | -------------------------------------------------------------------------------- /common/alerting-message/templates/alerting-message.tftpl: -------------------------------------------------------------------------------- 1 | ${prepend_text} 2 | {{#is_alert}} ${message_alert} {{/is_alert}} 3 | {{#is_warning}} ${message_warning} {{/is_warning}} 4 | {{#is_no_data}} ${message_nodata} {{/is_no_data}} 5 | {{#is_recovery}} ${message_recovery} {{/is_recovery}} 6 | ${append_text} 7 | -------------------------------------------------------------------------------- /common/filter-tags/inputs.tf: -------------------------------------------------------------------------------- 1 | variable "environment" { 2 | description = "Architecture Environment" 3 | type = string 4 | } 5 | 6 | variable "resource" { 7 | description = "The dedicated tag for the resource" 8 | type = string 9 | } 10 | 11 | variable "filter_tags_use_defaults" { 12 | description = "Use default filter tags convention" 13 | default = "true" 14 | } 15 | 16 | variable "filter_tags_custom" { 17 | description = "Tags used for custom filtering when filter_tags_use_defaults is false (i.e. \"tag1:val1,tag2:val2\")" 18 | default = "*" 19 | } 20 | 21 | variable "filter_tags_custom_excluded" { 22 | description = "Tags excluded for custom filtering when filter_tags_use_defaults is false (i.e. \"tag1:val1,tag2:val2\")" 23 | default = "" 24 | } 25 | 26 | variable "filter_tags_separator" { 27 | description = "Set the query separator (, or AND)" 28 | type = string 29 | default = "," 30 | } 31 | 32 | variable "extra_tags" { 33 | description = "Extra optional tags added to include filtering in any case (i.e. [\"tag1:val1\", \"tag2:val2\"])" 34 | type = list(string) 35 | default = [] 36 | } 37 | 38 | variable "extra_tags_excluded" { 39 | description = "Extra optional tags added to exclude filtering in any case (i.e. [\"tag1:val1\", \"tag2:val2\"])" 40 | type = list(string) 41 | default = [] 42 | } -------------------------------------------------------------------------------- /common/filter-tags/outputs.tf: -------------------------------------------------------------------------------- 1 | # Inputs example values: 2 | #TF_VAR_environment='prod' TF_VAR_resource='nginx' TF_VAR_filter_tags_use_defaults=false TF_VAR_filter_tags_custom="tag:val,tag2:val2" TF_VAR_filter_tags_custom_excluded="excludedtag:value,exludedtag2:value2" terraform apply 3 | 4 | # query_alert = {tag:val,tag2:val2,!excludedtag:value,!exludedtag2:value2} 5 | output "query_alert" { 6 | description = "The full filtering pattern including parentheses for service check monitor type" 7 | value = "{${local.query_alert}}" 8 | } 9 | 10 | # service_check = .over("tag:val","tag2:val2").exclude("excludedtag:value","exludedtag2:value2") 11 | output "service_check" { 12 | description = "The full filtering pattern including braces for query alert monitor type" 13 | value = local.service_check_sanitized 14 | } 15 | 16 | # event_alert = tags:tag:val,tag2:val2 excluded_tags:excludedtag:value,exludedtag2:value2 17 | output "event_alert" { 18 | description = "The full filtering pattern for event alert monitor type" 19 | value = "${local.event_including_string}${local.event_excluding_string == "" ? "" : local.event_excluding_string}" 20 | } 21 | -------------------------------------------------------------------------------- /common/module/inputs.tf: -------------------------------------------------------------------------------- 1 | variable "environment" { 2 | description = "Architecture Environment" 3 | type = string 4 | } 5 | 6 | variable "team" { 7 | type = string 8 | default = "claranet" 9 | } 10 | 11 | variable "priority" { 12 | description = "Alert severity of monitors from 1 (high) to 5 (low)" 13 | type = number 14 | default = null 15 | 16 | validation { 17 | condition = var.priority == null ? true : (var.priority >= 1 && var.priority <= 5) 18 | error_message = "Priority must be between 1 and 5." 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /common/module/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | common_tags = ["env:${var.environment}", "team:${var.team}", "created-by:terraform"] 3 | } 4 | -------------------------------------------------------------------------------- /common/module/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /database/elasticsearch/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../common/module/inputs.tf -------------------------------------------------------------------------------- /database/elasticsearch/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../common/module/locals.tf -------------------------------------------------------------------------------- /database/elasticsearch/modules.tf: -------------------------------------------------------------------------------- 1 | module "filter-tags" { 2 | source = "../../common/filter-tags" 3 | 4 | environment = var.environment 5 | resource = "elasticsearch" 6 | filter_tags_use_defaults = var.filter_tags_use_defaults 7 | filter_tags_custom = var.filter_tags_custom 8 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 9 | } 10 | 11 | -------------------------------------------------------------------------------- /database/elasticsearch/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /database/mongodb/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../common/module/inputs.tf -------------------------------------------------------------------------------- /database/mongodb/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../common/module/locals.tf -------------------------------------------------------------------------------- /database/mongodb/modules.tf: -------------------------------------------------------------------------------- 1 | module "filter-tags" { 2 | source = "../../common/filter-tags" 3 | 4 | environment = var.environment 5 | resource = "mongodb" 6 | filter_tags_use_defaults = var.filter_tags_use_defaults 7 | filter_tags_custom = var.filter_tags_custom 8 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 9 | filter_tags_separator = var.filter_tags_separator 10 | } 11 | 12 | module "filter-tags-secondary" { 13 | source = "../../common/filter-tags" 14 | 15 | environment = var.environment 16 | resource = "mongodb" 17 | filter_tags_use_defaults = var.filter_tags_use_defaults 18 | filter_tags_custom = var.filter_tags_custom 19 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 20 | extra_tags = ["replset_state:secondary"] 21 | filter_tags_separator = var.filter_tags_separator 22 | } 23 | 24 | -------------------------------------------------------------------------------- /database/mongodb/outputs.tf: -------------------------------------------------------------------------------- 1 | output "mongodb_primary_id" { 2 | description = "id for monitor mongodb_primary" 3 | value = datadog_monitor.mongodb_primary.*.id 4 | } 5 | 6 | output "mongodb_replication_id" { 7 | description = "id for monitor mongodb_replication" 8 | value = datadog_monitor.mongodb_replication.*.id 9 | } 10 | 11 | output "mongodb_secondary_id" { 12 | description = "id for monitor mongodb_secondary" 13 | value = datadog_monitor.mongodb_secondary.*.id 14 | } 15 | 16 | output "mongodb_server_count_id" { 17 | description = "id for monitor mongodb_server_count" 18 | value = datadog_monitor.mongodb_server_count.*.id 19 | } 20 | 21 | -------------------------------------------------------------------------------- /database/mongodb/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /database/mysql/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../common/module/inputs.tf -------------------------------------------------------------------------------- /database/mysql/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../common/module/locals.tf -------------------------------------------------------------------------------- /database/mysql/modules.tf: -------------------------------------------------------------------------------- 1 | module "filter-tags" { 2 | source = "../../common/filter-tags" 3 | 4 | environment = var.environment 5 | resource = "mysql" 6 | filter_tags_use_defaults = var.filter_tags_use_defaults 7 | filter_tags_custom = var.filter_tags_custom 8 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 9 | } 10 | 11 | -------------------------------------------------------------------------------- /database/mysql/outputs.tf: -------------------------------------------------------------------------------- 1 | output "mysql_aborted_id" { 2 | description = "id for monitor mysql_aborted" 3 | value = datadog_monitor.mysql_aborted.*.id 4 | } 5 | 6 | output "mysql_availability_id" { 7 | description = "id for monitor mysql_availability" 8 | value = datadog_monitor.mysql_availability.*.id 9 | } 10 | 11 | output "mysql_connection_id" { 12 | description = "id for monitor mysql_connection" 13 | value = datadog_monitor.mysql_connection.*.id 14 | } 15 | 16 | output "mysql_pool_efficiency_id" { 17 | description = "id for monitor mysql_pool_efficiency" 18 | value = datadog_monitor.mysql_pool_efficiency.*.id 19 | } 20 | 21 | output "mysql_pool_utilization_id" { 22 | description = "id for monitor mysql_pool_utilization" 23 | value = datadog_monitor.mysql_pool_utilization.*.id 24 | } 25 | 26 | output "mysql_questions_anomaly_id" { 27 | description = "id for monitor mysql_questions_anomaly" 28 | value = datadog_monitor.mysql_questions_anomaly.*.id 29 | } 30 | 31 | output "mysql_replication_lag_id" { 32 | description = "id for monitor mysql_replication_lag" 33 | value = datadog_monitor.mysql_replication_lag.*.id 34 | } 35 | 36 | output "mysql_replication_status_id" { 37 | description = "id for monitor mysql_replication_status" 38 | value = datadog_monitor.mysql_replication_status.*.id 39 | } 40 | 41 | output "mysql_slow_id" { 42 | description = "id for monitor mysql_slow" 43 | value = datadog_monitor.mysql_slow.*.id 44 | } 45 | 46 | output "mysql_threads_anomaly_id" { 47 | description = "id for monitor mysql_threads_anomaly" 48 | value = datadog_monitor.mysql_threads_anomaly.*.id 49 | } 50 | 51 | -------------------------------------------------------------------------------- /database/mysql/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /database/pgbouncer/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../common/module/inputs.tf -------------------------------------------------------------------------------- /database/pgbouncer/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../common/module/locals.tf -------------------------------------------------------------------------------- /database/pgbouncer/modules.tf: -------------------------------------------------------------------------------- 1 | module "filter-tags" { 2 | source = "../../common/filter-tags" 3 | 4 | environment = var.environment 5 | resource = "pgbouncer" 6 | filter_tags_use_defaults = var.filter_tags_use_defaults 7 | filter_tags_custom = var.filter_tags_custom 8 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 9 | } 10 | 11 | -------------------------------------------------------------------------------- /database/pgbouncer/outputs.tf: -------------------------------------------------------------------------------- 1 | output "pgbouncer_availability_id" { 2 | description = "id for monitor pgbouncer_availability" 3 | value = datadog_monitor.pgbouncer_availability.*.id 4 | } 5 | 6 | output "pgbouncer_database_connection_limit_id" { 7 | description = "id for monitor pgbouncer_database_connection_limit" 8 | value = datadog_monitor.pgbouncer_database_connection_limit.*.id 9 | } 10 | 11 | output "pgbouncer_pool_connection_limit_id" { 12 | description = "id for monitor pgbouncer_pool_connection_limit" 13 | value = datadog_monitor.pgbouncer_pool_connection_limit.*.id 14 | } 15 | 16 | output "pgbouncer_wait_time_id" { 17 | description = "id for monitor pgbouncer_wait_time" 18 | value = datadog_monitor.pgbouncer_wait_time.*.id 19 | } 20 | 21 | -------------------------------------------------------------------------------- /database/pgbouncer/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /database/postgresql/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../common/module/inputs.tf -------------------------------------------------------------------------------- /database/postgresql/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../common/module/locals.tf -------------------------------------------------------------------------------- /database/postgresql/modules.tf: -------------------------------------------------------------------------------- 1 | module "filter-tags" { 2 | source = "../../common/filter-tags" 3 | 4 | environment = var.environment 5 | resource = "postgres" 6 | filter_tags_use_defaults = var.filter_tags_use_defaults 7 | filter_tags_custom = var.filter_tags_custom 8 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 9 | } 10 | 11 | -------------------------------------------------------------------------------- /database/postgresql/outputs.tf: -------------------------------------------------------------------------------- 1 | output "postgresql_availability_id" { 2 | description = "id for monitor postgresql_availability" 3 | value = datadog_monitor.postgresql_availability.*.id 4 | } 5 | 6 | output "postgresql_connection_too_high_id" { 7 | description = "id for monitor postgresql_connection_too_high" 8 | value = datadog_monitor.postgresql_connection_too_high.*.id 9 | } 10 | 11 | output "postgresql_disk_queue_depth_id" { 12 | description = "id for monitor postgresql_disk_queue_depth" 13 | value = datadog_monitor.postgresql_disk_queue_depth.*.id 14 | } 15 | 16 | output "postgresql_replication_delay_id" { 17 | description = "id for monitor postgresql_replication_delay" 18 | value = datadog_monitor.postgresql_replication_delay.*.id 19 | } 20 | 21 | output "postgresql_too_many_locks_id" { 22 | description = "id for monitor postgresql_too_many_locks" 23 | value = datadog_monitor.postgresql_too_many_locks.*.id 24 | } 25 | 26 | -------------------------------------------------------------------------------- /database/postgresql/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /database/proxysql/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../common/module/inputs.tf -------------------------------------------------------------------------------- /database/proxysql/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../common/module/locals.tf -------------------------------------------------------------------------------- /database/proxysql/modules.tf: -------------------------------------------------------------------------------- 1 | module "filter-tags" { 2 | source = "../../common/filter-tags" 3 | 4 | environment = var.environment 5 | resource = "proxysql" 6 | filter_tags_use_defaults = var.filter_tags_use_defaults 7 | filter_tags_custom = var.filter_tags_custom 8 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 9 | } 10 | 11 | -------------------------------------------------------------------------------- /database/proxysql/outputs.tf: -------------------------------------------------------------------------------- 1 | output "proxysql_client_conn_aborted_id" { 2 | description = "id for monitor proxysql_client_conn_aborted" 3 | value = datadog_monitor.proxysql_client_conn_aborted.*.id 4 | } 5 | 6 | output "proxysql_pool_conn_failure_id" { 7 | description = "id for monitor proxysql_pool_conn_failure" 8 | value = datadog_monitor.proxysql_pool_conn_failure.*.id 9 | } 10 | 11 | output "proxysql_server_conn_aborted_id" { 12 | description = "id for monitor proxysql_server_conn_aborted" 13 | value = datadog_monitor.proxysql_server_conn_aborted.*.id 14 | } 15 | 16 | output "proxysql_slow_id" { 17 | description = "id for monitor proxysql_slow" 18 | value = datadog_monitor.proxysql_slow.*.id 19 | } 20 | 21 | output "proxysql_thread_worker_id" { 22 | description = "id for monitor proxysql_thread_worker" 23 | value = datadog_monitor.proxysql_thread_worker.*.id 24 | } 25 | 26 | -------------------------------------------------------------------------------- /database/proxysql/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /database/redis/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../common/module/inputs.tf -------------------------------------------------------------------------------- /database/redis/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../common/module/locals.tf -------------------------------------------------------------------------------- /database/redis/modules.tf: -------------------------------------------------------------------------------- 1 | module "filter-tags" { 2 | source = "../../common/filter-tags" 3 | 4 | environment = var.environment 5 | resource = "redis" 6 | filter_tags_use_defaults = var.filter_tags_use_defaults 7 | filter_tags_custom = var.filter_tags_custom 8 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 9 | } 10 | 11 | -------------------------------------------------------------------------------- /database/redis/outputs.tf: -------------------------------------------------------------------------------- 1 | output "blocked_clients_id" { 2 | description = "id for monitor blocked_clients" 3 | value = datadog_monitor.blocked_clients.*.id 4 | } 5 | 6 | output "evicted_keys_id" { 7 | description = "id for monitor evicted_keys" 8 | value = datadog_monitor.evicted_keys.*.id 9 | } 10 | 11 | output "expirations_id" { 12 | description = "id for monitor expirations" 13 | value = datadog_monitor.expirations.*.id 14 | } 15 | 16 | output "hitrate_id" { 17 | description = "id for monitor hitrate" 18 | value = datadog_monitor.hitrate.*.id 19 | } 20 | 21 | output "keyspace_full_id" { 22 | description = "id for monitor keyspace_full" 23 | value = datadog_monitor.keyspace_full.*.id 24 | } 25 | 26 | output "latency_id" { 27 | description = "id for monitor latency" 28 | value = datadog_monitor.latency.*.id 29 | } 30 | 31 | output "memory_frag_id" { 32 | description = "id for monitor memory_frag" 33 | value = datadog_monitor.memory_frag.*.id 34 | } 35 | 36 | output "memory_used_id" { 37 | description = "id for monitor memory_used" 38 | value = datadog_monitor.memory_used.*.id 39 | } 40 | 41 | output "not_responding_id" { 42 | description = "id for monitor not_responding" 43 | value = datadog_monitor.not_responding.*.id 44 | } 45 | 46 | output "rejected_connections_id" { 47 | description = "id for monitor rejected_connections" 48 | value = datadog_monitor.rejected_connections.*.id 49 | } 50 | 51 | -------------------------------------------------------------------------------- /database/redis/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /database/solr/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../common/module/inputs.tf -------------------------------------------------------------------------------- /database/solr/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../common/module/locals.tf -------------------------------------------------------------------------------- /database/solr/modules.tf: -------------------------------------------------------------------------------- 1 | module "filter-tags" { 2 | source = "../../common/filter-tags" 3 | 4 | environment = var.environment 5 | resource = "solr" 6 | filter_tags_use_defaults = var.filter_tags_use_defaults 7 | filter_tags_custom = var.filter_tags_custom 8 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 9 | } -------------------------------------------------------------------------------- /database/solr/outputs.tf: -------------------------------------------------------------------------------- 1 | output "not_responding_id" { 2 | description = "id for monitor not_responding" 3 | value = datadog_monitor.not_responding.*.id 4 | } 5 | 6 | output "search_handler_errors_id" { 7 | description = "id for monitor search_handler_errors" 8 | value = datadog_monitor.search_handler_errors.*.id 9 | } 10 | 11 | output "searcher_warmup_time_id" { 12 | description = "id for monitor searcher_warmup_time" 13 | value = datadog_monitor.searcher_warmup_time.*.id 14 | } 15 | 16 | -------------------------------------------------------------------------------- /database/solr/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /database/sqlserver/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../common/module/inputs.tf -------------------------------------------------------------------------------- /database/sqlserver/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../common/module/locals.tf -------------------------------------------------------------------------------- /database/sqlserver/modules.tf: -------------------------------------------------------------------------------- 1 | module "filter-tags" { 2 | source = "../../common/filter-tags" 3 | 4 | environment = var.environment 5 | resource = "sqlserver" 6 | filter_tags_use_defaults = var.filter_tags_use_defaults 7 | filter_tags_custom = var.filter_tags_custom 8 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 9 | } 10 | 11 | -------------------------------------------------------------------------------- /database/sqlserver/monitors-sqlserver.tf: -------------------------------------------------------------------------------- 1 | resource "datadog_monitor" "sqlserver_availability" { 2 | count = var.sqlserver_availability_enabled == "true" ? 1 : 0 3 | name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] SQL Server server does not respond" 4 | message = coalesce(var.sqlserver_availability_message, var.message) 5 | type = "service check" 6 | 7 | query = < ${var.nginx_dropped_threshold_critical} 39 | EOQ 40 | 41 | monitor_thresholds { 42 | critical = var.nginx_dropped_threshold_critical 43 | } 44 | 45 | evaluation_delay = var.evaluation_delay 46 | new_group_delay = var.new_group_delay 47 | notify_no_data = false 48 | notify_audit = false 49 | timeout_h = var.timeout_h 50 | include_tags = true 51 | require_full_window = true 52 | priority = var.priority 53 | 54 | tags = concat(local.common_tags, var.tags, var.nginx_dropped_extra_tags) 55 | } 56 | -------------------------------------------------------------------------------- /middleware/nginx/outputs.tf: -------------------------------------------------------------------------------- 1 | output "datadog_nginx_dropped_connections_id" { 2 | description = "id for monitor datadog_nginx_dropped_connections" 3 | value = datadog_monitor.datadog_nginx_dropped_connections.*.id 4 | } 5 | 6 | output "datadog_nginx_process_id" { 7 | description = "id for monitor datadog_nginx_process" 8 | value = datadog_monitor.datadog_nginx_process.*.id 9 | } 10 | 11 | -------------------------------------------------------------------------------- /middleware/nginx/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /middleware/php-fpm/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../common/module/inputs.tf -------------------------------------------------------------------------------- /middleware/php-fpm/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../common/module/locals.tf -------------------------------------------------------------------------------- /middleware/php-fpm/modules.tf: -------------------------------------------------------------------------------- 1 | module "filter-tags" { 2 | source = "../../common/filter-tags" 3 | 4 | environment = var.environment 5 | resource = "php-fpm" 6 | filter_tags_use_defaults = var.filter_tags_use_defaults 7 | filter_tags_custom = var.filter_tags_custom 8 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 9 | } 10 | 11 | -------------------------------------------------------------------------------- /middleware/php-fpm/outputs.tf: -------------------------------------------------------------------------------- 1 | output "php_fpm_connect_id" { 2 | description = "id for monitor php_fpm_connect" 3 | value = datadog_monitor.php_fpm_connect.*.id 4 | } 5 | 6 | output "php_fpm_connect_idle_id" { 7 | description = "id for monitor php_fpm_connect_idle" 8 | value = datadog_monitor.php_fpm_connect_idle.*.id 9 | } 10 | 11 | -------------------------------------------------------------------------------- /middleware/php-fpm/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | datadog = { 4 | source = "DataDog/datadog" 5 | version = ">= 3.1.2" 6 | } 7 | } 8 | required_version = ">= 0.12.31" 9 | } 10 | -------------------------------------------------------------------------------- /network/dns/common-inputs.tf: -------------------------------------------------------------------------------- 1 | ../../common/module/inputs.tf -------------------------------------------------------------------------------- /network/dns/common-locals.tf: -------------------------------------------------------------------------------- 1 | ../../common/module/locals.tf -------------------------------------------------------------------------------- /network/dns/inputs.tf: -------------------------------------------------------------------------------- 1 | # Global variables 2 | variable "tags" { 3 | type = list(string) 4 | default = ["type:network", "provider:dns_check", "resource:dns"] 5 | } 6 | 7 | # Global DataDog 8 | variable "evaluation_delay" { 9 | description = "Delay in seconds for the metric evaluation" 10 | default = 15 11 | } 12 | 13 | 14 | variable "new_group_delay" { 15 | description = "Delay in seconds before monitor new resource" 16 | default = 300 17 | } 18 | 19 | variable "timeout_h" { 20 | description = "Default auto-resolving state (in hours)" 21 | default = 0 22 | } 23 | 24 | variable "prefix_slug" { 25 | description = "Prefix string to prepend between brackets on every monitors names" 26 | default = "" 27 | } 28 | 29 | variable "notify_no_data" { 30 | description = "Will raise no data alert if set to true" 31 | default = true 32 | } 33 | 34 | variable "message" { 35 | description = "Message sent when an alert is triggered" 36 | } 37 | 38 | variable "filter_tags_use_defaults" { 39 | description = "Use default filter tags convention" 40 | default = "true" 41 | } 42 | 43 | variable "filter_tags_custom" { 44 | description = "Tags used for custom filtering when filter_tags_use_defaults is false" 45 | default = "*" 46 | } 47 | 48 | variable "filter_tags_custom_excluded" { 49 | description = "Tags excluded for custom filtering when filter_tags_use_defaults is false" 50 | default = "" 51 | } 52 | 53 | # 54 | # Cannot Resolve 55 | # 56 | variable "cannot_resolve_enabled" { 57 | description = "Flag to enable DNS cannot resolve monitor" 58 | type = string 59 | default = "true" 60 | } 61 | 62 | variable "cannot_resolve_message" { 63 | description = "Custom message for DNS cannot resolve monitor" 64 | type = string 65 | default = "" 66 | } 67 | 68 | variable "cannot_resolve_threshold_warning" { 69 | description = "DNS cannot resolve monitor (warning threshold)" 70 | type = string 71 | default = 3 72 | } 73 | 74 | variable "cannot_resolve_no_data_timeframe" { 75 | description = "DNS cannot resolve monitor no data timeframe" 76 | type = string 77 | default = 10 78 | } 79 | 80 | variable "cannot_resolve_extra_tags" { 81 | description = "Extra tags for DNS cannot resolve monitor" 82 | type = list(string) 83 | default = [] 84 | } -------------------------------------------------------------------------------- /network/dns/modules.tf: -------------------------------------------------------------------------------- 1 | module "filter-tags" { 2 | source = "../../common/filter-tags" 3 | 4 | environment = var.environment 5 | resource = "dns" 6 | filter_tags_use_defaults = var.filter_tags_use_defaults 7 | filter_tags_custom = var.filter_tags_custom 8 | filter_tags_custom_excluded = var.filter_tags_custom_excluded 9 | } 10 | -------------------------------------------------------------------------------- /network/dns/monitors-dns.tf: -------------------------------------------------------------------------------- 1 | # 2 | # Service Check 3 | # 4 | resource "datadog_monitor" "cannot_resolve" { 5 | count = var.cannot_resolve_enabled == "true" ? 1 : 0 6 | name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] DNS cannot resolve" 7 | message = coalesce(var.cannot_resolve_message, var.message) 8 | type = "service check" 9 | 10 | query = <