Python script to validate a monitor query through Datadog API using Datadog Python Library.
In order to run a validation you will need a Datadog API key and an Application key from your Datadog account. See Datadog documentation for more information about how to get them.
Then install Datadog Python Library:
pip install datadog
Create a config.json
file from the template:
cp config.dist.json config.json
Replace the placeholders in the config.json
with your API and Application key, and add the query information you want to validate.
With the config.json
and the installation ready, in your terminal, run the following command:
python validate.py