An externally defined object for which samples have been received.
Data samples:
{
"metadata": {
"name1": "value1",
"name2": "value2"
},
"project_id": "35b17138-b364-4e6a-a131-8f3099c5be68",
"resource_id": "bd9431c1-8d69-4ad3-803a-8d4a6b89fd36",
"timestamp": "2014-04-12T02:40:24.001472",
"user_id": "efd87807-12d2-4b38-9c70-5f5c2ac427ff"
}
<value>
<metadata>
<item>
<key>name2</key>
<value>value2</value>
</item>
<item>
<key>name1</key>
<value>value1</value>
</item>
</metadata>
<project_id>35b17138-b364-4e6a-a131-8f3099c5be68</project_id>
<resource_id>bd9431c1-8d69-4ad3-803a-8d4a6b89fd36</resource_id>
<timestamp>2014-04-12T02:40:24.001472</timestamp>
<user_id>efd87807-12d2-4b38-9c70-5f5c2ac427ff</user_id>
</value>
| Type: | dict(unicode: unicode) |
|---|
Arbitrary metadata associated with the resource
| Type: | unicode |
|---|
The ID of the owning project or tenant
| Type: | unicode |
|---|
The unique identifier for the resource
| Type: | datetime |
|---|
UTC date and time of the last update to any meter for the resource
| Type: | unicode |
|---|
The ID of the user who created the resource or updated it last
One category of measurements.
Data samples:
{
"name": "instance",
"project_id": "35b17138-b364-4e6a-a131-8f3099c5be68",
"resource_id": "bd9431c1-8d69-4ad3-803a-8d4a6b89fd36",
"type": "gauge",
"unit": "instance",
"user_id": "efd87807-12d2-4b38-9c70-5f5c2ac427ff"
}
<value>
<name>instance</name>
<project_id>35b17138-b364-4e6a-a131-8f3099c5be68</project_id>
<resource_id>bd9431c1-8d69-4ad3-803a-8d4a6b89fd36</resource_id>
<type>gauge</type>
<unit>instance</unit>
<user_id>efd87807-12d2-4b38-9c70-5f5c2ac427ff</user_id>
</value>
| Type: | unicode |
|---|
The unique name for the meter
| Type: | unicode |
|---|
The ID of the project or tenant that owns the resource
| Type: | unicode |
|---|
The meter type (see Measurements)
| Type: | unicode |
|---|
The unit of measure
| Type: | unicode |
|---|
The ID of the user who last triggered an update to the resource
A single measurement for a given meter and resource.
Data samples:
{
"counter_name": "instance",
"counter_type": "gauge",
"counter_unit": "instance",
"counter_volume": 1.0,
"message_id": "5460acce-4fd6-480d-ab18-9735ec7b1996",
"project_id": "35b17138-b364-4e6a-a131-8f3099c5be68",
"resource_id": "bd9431c1-8d69-4ad3-803a-8d4a6b89fd36",
"resource_metadata": {},
"source": "openstack",
"timestamp": "2014-04-12T02:40:24.207551",
"user_id": "efd87807-12d2-4b38-9c70-5f5c2ac427ff"
}
<value>
<counter_name>instance</counter_name>
<counter_type>gauge</counter_type>
<counter_unit>instance</counter_unit>
<counter_volume>1.0</counter_volume>
<message_id>5460acce-4fd6-480d-ab18-9735ec7b1996</message_id>
<project_id>35b17138-b364-4e6a-a131-8f3099c5be68</project_id>
<resource_id>bd9431c1-8d69-4ad3-803a-8d4a6b89fd36</resource_id>
<resource_metadata />
<source>openstack</source>
<timestamp>2014-04-12T02:40:24.207551</timestamp>
<user_id>efd87807-12d2-4b38-9c70-5f5c2ac427ff</user_id>
</value>
| Type: | unicode |
|---|
The name of the meter
| Type: | unicode |
|---|
The type of the meter (see Measurements)
| Type: | unicode |
|---|
The unit of measure for the value in counter_volume
| Type: | float |
|---|
The actual measured value
| Type: | unicode |
|---|
A unique identifier for the sample
| Type: | unicode |
|---|
The ID of the project or tenant that owns the resource
| Type: | dict(unicode: unicode) |
|---|
Arbitrary metadata associated with the resource
| Type: | unicode |
|---|
An identity source ID
| Type: | datetime |
|---|
UTC date and time when the measurement was made
| Type: | unicode |
|---|
The ID of the user who last triggered an update to the resource
Computed statistics for a query.
Data samples:
{
"avg": 4.5,
"count": 10,
"duration": 300.0,
"duration_end": "2013-01-04T16:47:00",
"duration_start": "2013-01-04T16:42:00",
"max": 9.0,
"min": 1.0,
"period": 7200,
"period_end": "2013-01-04T18:00:00",
"period_start": "2013-01-04T16:00:00",
"sum": 45.0
}
<value>
<avg>4.5</avg>
<count>10</count>
<duration>300.0</duration>
<duration_end>2013-01-04T16:47:00</duration_end>
<duration_start>2013-01-04T16:42:00</duration_start>
<max>9.0</max>
<min>1.0</min>
<period>7200</period>
<period_end>2013-01-04T18:00:00</period_end>
<period_start>2013-01-04T16:00:00</period_start>
<sum>45.0</sum>
</value>
| Type: | float |
|---|
The average of all of the volume values seen in the data
| Type: | int |
|---|
The number of samples seen
| Type: | float |
|---|
The difference, in minutes, between the oldest and newest timestamp
| Type: | datetime |
|---|
UTC date and time of the oldest timestamp, or the query end time
| Type: | datetime |
|---|
UTC date and time of the earliest timestamp, or the query start time
| Type: | float |
|---|
The maximum volume seen in the data
| Type: | float |
|---|
The minimum volume seen in the data
| Type: | int |
|---|
The difference, in seconds, between the period start and end
| Type: | datetime |
|---|
UTC date and time of the period end
| Type: | datetime |
|---|
UTC date and time of the period start
| Type: | float |
|---|
The total of all of the volume values seen in the data
Many of the endpoints above accecpt a query filter argument, which should be a list of Query data structures:
Query filter.
Data samples:
{
"field": "resource_id",
"op": "eq",
"value": "bd9431c1-8d69-4ad3-803a-8d4a6b89fd36"
}
<value>
<field>resource_id</field>
<op>eq</op>
<value>bd9431c1-8d69-4ad3-803a-8d4a6b89fd36</value>
</value>
| Type: | unicode |
|---|
The name of the field to test
| Type: | Enum(lt, le, eq, ne, ge, gt) |
|---|
The comparison operator. Defaults to ‘eq’.
| Type: | unicode |
|---|
The value to compare against the stored data
Ceilometer CLI Commands:
$ ceilometer --debug --os-username <username_here> --os-password <password_here> --os-auth-url http://localhost:5000/v2.0/ --os-tenant-name admin meter-list
or:
$ ceilometer --os-username admin --os-password password --os-tenant-name admin project-list
Note
The username, password, and tenant-name options are required to be present in these commands or specified via environment variables. Note that the in-line commands will override the environment variables.
Ceilometer API calls:
Note
To successfully query the Ceilometer you must first get a project-specific token from the Keystone service and add it to any API calls that you execute against that project. See the Openstack credentials documentation for additional details.
A simple query to return a list of available meters:
$ curl -X GET -H 'X-Auth-Token:<inserttokenhere>' "http://localhost:8777/v2/meters"
A query to return the list of resources:
$ curl -X GET -H 'X-Auth-Token:<inserttokenhere>' "http://localhost:8777/v2/resources"
A query to return the list of meters, limited to a specific meter type:
$ curl -X GET -H 'X-Auth-Token:<inserttokenhere>' "http://localhost:8777/v2/meters/disk.root.size"
A query using filters (see: query filter section):
$ curl -X GET -H 'X-Auth-Token:<inserttokenhere>' "http://localhost:8777/v2/meters/instance?q.field=metadata.event_type&q.value=compute.instance.delete.start"
Additional examples:
$ curl -X GET -H 'X-Auth-Token:<inserttokenhere>' "http://localhost:8777/v2/meters/disk.root.size?q.field=resource_id&q.op=eq&q.value=<resource_id_here>"
or:
$ curl -X GET -H 'X-Auth-Token:<inserttokenhere>' "http://localhost:8777/v2/meters/instance?q.field=metadata.event_type&q.value=compute.instance.exists"
and finally, a JSON-based example:
$ curl -X GET -H 'X-Auth-Token:<inserttokenhere>' -H 'Content-Type:application/json' -d '{"q":[{"field": "timestamp","op": "ge","value":"2013-04-01T13:34:17"}]}' http://localhost:8777/v2/meters