0
我是datadog的新手。我跟着这post,并在我的应用程序/ api键中取代。ImportError:没有名为datadog的模块
我:nginx_dd.py
# 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': '***'
}
initialize(**options)
now = int(time.time())
query = 'system.cpu.idle{*}by{host}'
print api.Metric.query(start=now - 3600, end=now, query=query)
当我运行它python nginx_dd.py
,我一直得到
ImportError: No module named datadog
任何提示/这个建议将是一个巨大的帮助!
你安装它?你使用虚拟环境吗?如果是这样,你是否指向正确的虚拟环境? –
我安装在Mac上。我已经创建了一个帐户,并在datadog站点上登录。我错过了什么 ? – ihue