datadog-operator icon indicating copy to clipboard operation
datadog-operator copied to clipboard

Custom Resources for DataDog resources

Open mzizzi opened this issue 4 years ago • 10 comments

I apologize in advance if this isn't the right place for these sorts of questions of if I missed this on road map elsewhere.

Has there been any discussion around the DataDog operator handling custom resources for Monitors, Dashboards, etc? Idea being that I'd like to template and provision DataDog resources using the same kube manifests/charts that I deploy the rest of my infrastructure with. This is similar to how the prometheus operator supports PrometheusRule resources.

I previously hacked out this concept as part of playing with a python operator framework: https://github.com/mzizzi/dogkop

I'd imagined being able to create DataDog Monitor resources as follows:

apiVersion: datadog.mzizzi/v1
kind: Monitor
metadata:
  name: my-monitor
spec:
  type: metric alert
  query: avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100
  name: Bytes received on host0
  message: We may need to add web hosts if this is consistently high.
  tags:
    - foo:bar
  options:
    notify_no_data: True,
    no_data_timeframe: 20

This could be extremely powerful when coupled with the DataDog agent's OpenMetrics/Prometheus checks.

mzizzi avatar Dec 02 '19 20:12 mzizzi

@mzizzi absolutely, we believe in leveraging the Kubernetes Operator pattern to automate the creation and administration of Datadog resources such as Monitors and Dashboards. We are having discussions around this concept and will share any updates with our community as we go.

In the meantime, we love seeing projects like yours that help validate the use-cases of different users. There is another open-source project by FairwindsOps that simplifies the administration of Datadog monitors for Kubernetes deployments using an Operator, which you can also have a look at here: https://github.com/FairwindsOps/astro

cohenyair avatar Dec 03 '19 19:12 cohenyair

@mzizzi I started on a POC of an operator inspired by dogkop https://github.com/stefansedich/datadog-operator definately powerful and great to be able to keep monitoring in the same place as your deployment.

Looking forward to seeing something like this added to the official operator and expanded to other resources like dashboards, etc...

stefansedich avatar Jan 23 '20 21:01 stefansedich

Hi @cohenyair, just wondering if we could have a status update on where this sits or any visibility into a roadmap as we move through 2021. Thank you!

iAnomaly avatar Apr 12 '21 21:04 iAnomaly

It would be great to add an SLO CRD as well. Something similar to the OpenSLO maybe?

NasAmin avatar May 17 '22 13:05 NasAmin

https://github.com/DataDog/datadog-operator/tree/main/examples/datadogmonitor

kgoralski avatar Sep 01 '22 21:09 kgoralski

+1, would love to create SLOs via yaml

benwaffle avatar Jan 03 '23 18:01 benwaffle

+1

cmotta2016 avatar Feb 02 '23 14:02 cmotta2016

+1!

spidercensus avatar Apr 12 '23 15:04 spidercensus

Any updates regarding the addition of dashboards as CRD?

FarhanSajid1 avatar Nov 17 '23 19:11 FarhanSajid1

+1

dreinhardt89 avatar Feb 13 '24 21:02 dreinhardt89