I am developing a dashboard for system monitoring. I have been using ceilometer's python API before. But I have noticed that every time I run the program it sends the data from the start this way same data is repeated many time. Is there a way in Ceilometer that when I query for my data It sends me the current value of the system. My code is below
auth=v2.Password(auth_url="url", username="username", password="pass", tenant_id='009867')
sess = session.Session(auth=auth,verify=False)
token = auth.get_token(sess)
cclient = client.get_client(2, ceilometer_url="http://orbit1.ds.cs.umu.se:8777/", token=token,verify=False)
data = cclient.samples.list(meter_name ='cpu_util')
thing = {}
msg = {}
cols = []
for row in data:
col = {}
col = {"x": row.timestamp, "y": row.counter_volume}
cols.append(col)
msg['columns'] = cols
thing['message'] = msg
print json.dumps(thing, indent=4)