The Base package provides all the functionality and utilities necessary for writing Agent Integrations. Most importantly it provides the AgentCheck base class from which every Check must be inherited.
You would use it like so:
from datadog_checks.base import AgentCheck class AwesomeCheck(AgentCheck): __NAMESPACE__ = 'awesome' def check(self, instance): self.gauge('test', 1.23, tags=['foo:bar'])
check method is what the Datadog Agent will execute.
In this example we created a Check and gave it a namespace of
awesome. This means that by default, every submission's name will be prefixed with
We submitted a gauge metric named
awesome.test with a value of
1.23 tagged by
The magic hidden by the usability of the API is that this actually calls a C binding which communicates with the Agent (written in Go).