truesight脉冲restapi的python绑定
tspapi的Python项目详细描述
用于python的bmc truesight脉冲api
truesight pulse api for python为python语言提供绑定
有关文档,请访问http://boundary.github.io/pulse-api-python。
[生成状态]
版权所有2005-2016 BMC Software,Inc.使用本软件表示 您接受BMC的使用条款、隐私政策和cookie通知。 BMC、BMC软件、BMC徽标和其他BMC标记是商标或 BMC Software,Inc.在美国的注册商标和/或 其他国家。
安装
$ pip install tspapi
示例
创建度量值
import tspapi from datetime import datetime
# The following assumes the following environment variables are set # export TSP_EMAIL=’joe@example.com’ # export TSP_API_TOKEN=<your api token> api = tspapi.API()
api.measurement_create(metric=’MY_METRIC’, source=’MySource’, value=3.14, timestamp=datetime.now())
创建度量值
import tspapi
# The following assumes the following environment variables are set # export TSP_EMAIL=’joe@example.com’ # export TSP_API_TOKEN=<your api token> api = tspapi.API()
metric = api.measurement_create(metric=’MY_METRIC’, source=’MySource’, value=3.14)