<div dir="ltr"><div>I am working on the ceilometer-horizon blueprint to show ceilometer data on horizon(<a href="https://blueprints.launchpad.net/horizon/+spec/ceilometer">https://blueprints.launchpad.net/horizon/+spec/ceilometer</a> ), now I've added some tables and chart to horizon:</div>
<div><br></div><div><img src="cid:ii_1400accf2c16bc19" alt="Inline image 1" width="564" height="359"><br></div><div><br></div><div><img src="cid:ii_1400ada42c0232c9" alt="Inline image 2" width="564" height="359"></div><div>
<br></div><div style>1. Need api for horizon to get data for resource usage tables.</div><div style><br></div><div>There're some issues as ceilometer-api doesn't provide functions for horizon to get data for the table directly like nova-api does. <br>
</div><div><br></div><div>Horizon needs to get meter-list at first and then get statistics for each resource and then combine these resources to one table. It takes about 10 seconds for horizon to load and re-construct these data. It's horrible. Though asynchronous loading of these tables is implemented and the time for that is reduced to 3 seconds, the code looks weird. :(</div>
<div><br></div><div>It would be helpful if ceilometer-api provides following api:</div><div><br></div><div>GET /v2/usages/disk/</div><div><br></div><div>Parameters: q(list(Query)) Filter rules for the resources to be returned.</div>
<div>Return Type: list(Usage) A list of usage with different tenant,user, resource</div><div><br></div><div><div>GET /v2/usages/disk/<usage_id></div><div><br></div><div>Parameters: q(list(Query)) Filter rules for the resources to be returned.</div>
<div style> usage_id(unicode) The uuid of usage.</div><div>Return Type: Usage</div><div><br></div></div><div>type Usage:</div><div><div>{</div><div> "id": "unique_usage_id",</div>
<div> "tenant": "tenant_id",</div><div> "user": "user_id",</div><div> "resource": "resource_id",</div><div> "metadata": {</div><div> /* This is important since it's intuitive for </div>
<div> * users to know the details.</div><div> */</div><div> "tenant_name": "tenant_name",</div><div> "user_name": "user_name",</div><div> "resource_name": "resource_name"</div>
<div> },</div><div> "data": [{</div><div> "meter_name": "disk.read.bytes",</div><div> "unit": "Byte",</div><div> "value": "1024"</div>
<div> }, {</div><div> "meter_name": "disk.read.requests",</div><div> "unit": "Packet",</div><div> "value": "1024"</div><div>
}, {</div><div> "meter_name": "disk.write.bytes",</div><div> "unit": "Byte",</div><div> "value": "1024"</div><div> }, {</div>
<div> "meter_name": "disk.write.requests",</div><div> "unit": "Packet",</div><div> "value": "1024"</div><div> }</div><div>
]</div><div>}</div></div><div><br></div><div><br></div><div style>2. need gauge data like "cpu_util" to render stat charts.</div><div style>We have cumulative meters like "disk.read.bytes" and "networking.incoming.bytes" but they are not able to be used for drawing charts since the value of them are always increasing.</div>
<div style><br></div><div style>Horizon need gauge data for these meters to show the status of resource usage. </div><div><br></div></div>