MON-199 Advanced monitors for Mongodb Approved-by: Christophe GENINET <christophe.geninet@fr.clara.net> Approved-by: Boris Rousseau <boris.rousseau@morea.fr> Approved-by: Alexandre Gaillet <alexandre.gaillet@fr.clara.net> Approved-by: Laurent Piroelle <laurent.piroelle@fr.clara.net> Approved-by: Jérôme Respaut <shr3ps@gmail.com>
DataDog Monitors
This repository is used to store all our monitors templates ready to use for generic purpose.
How to contribute ?
First, you may refresh your knowledge and look at the terminology.
To contribute you will need to report an issue.
If you would like to resolve an issue or implement new monitors you must follow our best practices.
Important notes
- This repository represents a terraform feature and each first level directory could be imported as a terraform module, you must choose the one(s) you need.
- Each of these modules contains the most commons monitors, but they probably do not fulfill all your customer needs
- You still can create some specific DataDog monitors after importing a module, it's even advisable to complete your needs
- You will find a complete
README.mdon each module, explaining how to use it. - The
alerting-messagemodule could be used to easily generate a templating message to use by default but it could be used also multiple times to generate messages for specific monitors.
The DataDog provider
Before importing some modules, you must define the DataDog provider in your main.tf
provider "datadog" {
api_key = "${var.datadog_api_key}"
app_key = "${var.datadog_app_key}"
}
Both of the datadog_api_key and datadog_app_key are unique to the client.
Module Declaration example
A quick example of using a set of monitors for a given terraform module:
variable "oncall_24x7" {
default = "@pagerduty-Public_Cloud_FR_-_Yoda_-_Unibail_HNO"
}
variable "oncall_office_hours" {
default = "@pagerduty-Public_Cloud_FR_-_Yoda_-_Unibail_HO"
}
variable "oncall_nodata" {
default = "@pagerduty-Public_Cloud_FR_-_Yoda_-_Unibail_HNO"
}
module "datadog-message-alerting" {
source = "git::ssh://git@bitbucket.org/morea/terraform.feature.datadog.git//common/alerting-message"
message_alert = "${var.oncall_24x7}"
message_warning = "${var.oncall_office_hours}"
message_nodata = "${var.oncall_nodata}"
}
module "datadog-monitors-my-monitors-set" {
source = "git::ssh://git@bitbucket.org/morea/terraform.feature.datadog.git//my/monitors/set?ref={revision}"
environment = "${var.environment}"
message = "${module.datadog-message-alerting.alerting-message}"
}
my/monitors/set represents the path to a monitors set sub directory listed above.
The // is very important, it's a terraform specific syntax used to separate git url and folder path.
Monitors summary
Description
Enterprise-ready monitoring module with pre-configured monitors for middleware, databases, cloud services (AWS/Azure/GCP), and container platforms
Languages
HCL
100%