dd-agent icon indicating copy to clipboard operation
dd-agent copied to clipboard

[prometheus] extract prometheus-format processing to its own module

Open hkaj opened this issue 8 years ago • 3 comments

Some of the logic in kube_state_processor (https://github.com/DataDog/dd-agent/blob/5.11.3/utils/kubernetes/kube_state_processor.py) can be generalized to all checks using the prometheus format.

This issue covers several points:

  • we should move the k8s-specific part to integration-core. This would allow us to add new metrics/tags without releasing a new version of the core agent
  • the generic methods (process, init and label-related ones) should be kept, generalized (remove kubernetes mentions) and extended with more helpers ( see @ojongerius note for example https://github.com/DataDog/dd-agent/pull/3185/files#r103859112)

hkaj avatar Mar 13 '17 15:03 hkaj

I guess that we'll need to rewrite this one once #3317 is merged or should we move that part to integration-core after the merge?

aerostitch avatar May 02 '17 18:05 aerostitch

#3317 pretty much covers the generalization of Prometheus-format handling (the second part of the issue), we just need to add more helpers as we need them (service checks, events, etc.). Now what's left to do is rewrite the kubernetes_state check to use this and deprecate the old code.

hkaj avatar May 03 '17 09:05 hkaj

https://github.com/DataDog/integrations-core/pull/492 implements that

hkaj avatar Jun 26 '17 10:06 hkaj