Dogshell comes with the officially supported datadogpy Python library, which is often used to send data to Datadog with DogStatsD. To install the library with PIP, run the following command:
pip install datadog
Depending on your environment, you might have to add the library to your PATH. See the datadogpy GitHub repo for alternative installation instructions.
You can create multiple configuration files if you need to run commands against different environments. Use the --config flag to specify the path to an alternative configuration file.
Test the dogshell command by posting a test metric:
The following syntax posts a metric to your Datadog account:
dog metric post MY_METRIC_NAME METRIC_VALUE --tags "TAG_KEY_1:TAG_VALUE_1,TAG_KEY_2:TAG_VALUE_2"
For example, the following command sends a metric named test_dogshell_metric to your account with a value of 1.0 and the tags test:one and example:one:
dog metric post test_dogshell_metric 1.0 --tags "test:one,example:one"
After you run the command, search for test_dogshell_metric using the Metrics Explorer.