ihue ihue - 1 year ago 216
Python Question

ImportError: No module named datadog

I'm new to datadog. I followed this post, and replaced in my app/api keys.

I have :


# Make sure you replace the API and/or APP key below
# with the ones for your account

from datadog import initialize, api
import time

options = {
'api_key': '***',
'app_key': '***'


now = int(time.time())
query = 'system.cpu.idle{*}by{host}'
print api.Metric.query(start=now - 3600, end=now, query=query)

When I run it
python nginx_dd.py
, I kept getting

ImportError: No module named datadog

Any hints / suggestions on this will be a huge helps !

Answer Source

Verify if the datadog package is installed in your environment.

You can do this with this command:

$ pip freeze | grep datadog

If it's not installed, you can install it with this command:

$ pip install datadog
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download