Ask Your Question
0

How to fetch ceilometer historical data

asked 2015-11-24 06:40:15 -0500

lalit gravatar image

Hi,

I have a question related to time_to_live option available in ceilometer.conf file.by default its value is 0 which means forever.... resulting DB to grow and some point of time DB will get overflowed. before setting the value of time_to_live = 604800 in ceilometer.conf my REST API call to meter instance was returning me all the samples starting from the event compute.instance.<activity>.start but now after the change time_to_live = 604800 I can not see the older samples with event compute.instance.<activity>.start....then how would I know when did this particular instance got created ?

do we have any solution to fix this ?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2015-11-29 23:27:33 -0500

Shaoman Zhang gravatar image

The data beyond time_to_live will be deleted, and can not get back. Maybe you can use nova api to get the instance detail information.

edit flag offensive delete link more
0

answered 2015-12-01 00:10:59 -0500

Cheng Liu gravatar image

You may use nova show <instance-id> to check detailed information of a VM.

Running this CLI command would return something like this:

+--------------------------------------+----------------------------------------------------------+
| Property                             | Value                                                    |
+--------------------------------------+----------------------------------------------------------+
| OS-DCF:diskConfig                    | AUTO                                                     |
| OS-EXT-AZ:availability_zone          | nova                                                     |
| OS-EXT-SRV-ATTR:host                 | computer242                                              |
| OS-EXT-SRV-ATTR:hypervisor_hostname  | computer242                                              |
| OS-EXT-SRV-ATTR:instance_name        | instance-0000003a                                        |
| OS-EXT-STS:power_state               | 4                                                        |
| OS-EXT-STS:task_state                | -                                                        |
| OS-EXT-STS:vm_state                  | stopped                                                  |
| OS-SRV-USG:launched_at               | 2015-11-12T03:06:36.000000                               |
| OS-SRV-USG:terminated_at             | -                                                        |
| accessIPv4                           |                                                          |
| accessIPv6                           |                                                          |
| config_drive                         |                                                          |
| created                              | 2015-11-12T03:04:00Z                                     |
| flavor                               | m1.small (2)                                             |
| hostId                               | 2f56df71a114f79f48aae9f7636a55d08185c3006681f5f3048b45f8 |
| id                                   | 9103e67d-0ddf-4cd0-8e0b-7ca9ca33d433                     |
| image                                | Ubuntu12.04     (c6b97762-ac2e-49b3-b339-ec3aea061c0e)   |
| key_name                             | demo-key                                                 |
| metadata                             | {}                                                       |
| name                                 | snmp                                                     |
| os-extended-volumes:volumes_attached | []                                                       |
| security_groups                      | default                                                  |
| status                               | SHUTOFF                                                  |
| tenant-net network                   | 10.10.10.55, 192.168.173.59                              |
| tenant_id                            | 56fc364c204043b98a438122568fbf14                         |
| updated                              | 2015-11-15T02:10:29Z                                     |
| user_id                              | ee3f2211696d45da95e2f7340ef3e704                         |
+--------------------------------------+----------------------------------------------------------+

The "Created" column indicates when the VM is created.

API:

Type: GET 
Addr: http://controller:8774/v2/<tenant-id>/servers/<instance-id>
Headers: 
    Accept: application/json
    X-Auth-Token: {SHA1}<token>
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

Stats

Asked: 2015-11-24 06:40:15 -0500

Seen: 118 times

Last updated: Dec 01 '15