![]() |
VOOZH | about |
To create and manage Datadog resources with the Datadog Operator, use the DatadogGenericResource custom resource definition (CRD). DatadogGenericResource uses the Datadog API JSON payload for each supported resource type in spec.jsonSpec.
DatadogGenericResource is the preferred CRD for Datadog resources that are supported by both DatadogGenericResource and older resource-specific CRDs, such as DatadogMonitor, DatadogDashboard, and DatadogSLO.
kubectl CLI| Type | Operator version | API reference |
|---|---|---|
notebook | v1.12.0 | Create a notebook |
synthetics_api_test | v1.12.0 | Create an API test |
synthetics_browser_test | v1.12.0 | Create a browser test |
monitor | v1.13.0 | Create a monitor |
downtime | v1.22.0 | Schedule a downtime |
dashboard | v1.27.0 | Create a dashboard |
slo | v1.28.0 | Create an SLO object |
Run the installation command, substituting your Datadog API and application keys:
helm install datadog-operator datadog/datadog-operator \
--set apiKey=<DATADOG_API_KEY> \
--set appKey=<DATADOG_APP_KEY> \
--set datadogCRDs.crds.datadogGenericResources=true \
--set datadogGenericResource.enabled=true
Create a file with the spec of your DatadogGenericResource configuration.
Example: Monitor
datadog-generic-resource-monitor.yaml
apiVersion:datadoghq.com/v1alpha1kind:DatadogGenericResourcemetadata:name:example-monitornamespace:<operator namespace>spec:type:monitorjsonSpec:|- {
"name": "Example Monitor",
"type": "metric alert",
"query": "avg(last_10m):avg:system.cpu.user{*} > 80",
"message": "CPU usage is high",
"tags": [
"team:example"
],
"options": {
"notify_no_data": false
}
}Deploy your DatadogGenericResource:
kubectl apply -f /path/to/your/datadog-generic-resource-monitor.yaml
Additional helpful documentation, links, and articles:
| |