Merge branch 'master' into func_test_fixes

Conflicts:
	func_test/api_func_test.py
This commit is contained in:
Joe Keen 2015-08-11 15:23:50 -06:00
commit 6c162775ab
20 changed files with 7764 additions and 7 deletions

391
README.md
View File

@ -60,6 +60,397 @@ directory of this project
tox -e py27 (or -e py26, -e py33)
# Monasca Events API
Stream Definition Methods
-------------------------
## POST /v2.0/stream-definitions
### Headers
* X-Auth-Token (string, required) - Keystone auth token
* Accept (string) - application/json
### Request Body
```
{
"fire_criteria": [
{"event_type": "compute.instance.create.start"},
{"event_type": "compute.instance.create.end"}
],
"description": "provisioning duration",
"name": "example",
"group_by": ["instance_id"],
"expiration": 3000,
"select": [{
"traits": {"tenant_id": "406904"},
"event_type": "compute.instance.create.*"
}],
"fire_actions": [action_id],
"expire_actions": [action_id]
}
```
### Request Example
```
POST /v2.0/stream-definitions HTTP/1.1
Host: 192.168.10.4:8082
X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
Accept: application/json
Cache-Control: no-cache
```
## GET /v2.0/stream-definition
### Headers
* X-Auth-Token (string, required) - Keystone auth token
* Accept (string) - application/json
### Request Body
None.
### Request Example
```
GET /v2.0/stream-definitions HTTP/1.1
Host: 192.168.10.4:8082
X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
Accept: application/json
Cache-Control: no-cache
```
### Response Body
Returns a JSON object with a 'links' array of links and an 'elements' array of stream definition objects with the following fields:
* id (string)
* name (string)
* fire_actions (string)
* description (string)
* expire_actions (string)
* created_at (datetime string)
* select
* traits
* tenant_id (string)
* event_type (string)
* group_by (string)
* expiration (int)
* links - links to stream-definition
* updated_at (datetime string)
* actions_enabled (bool)
* fire_criteria - JSON list of event fire criteria
### Response Body Example
```
{
"links": [
{
"rel": "self",
"href": "http://192.168.10.4:8082/v2.0/stream-definitions"
}
],
"elements": [
{
"id": "242dd5f4-2ef6-11e5-8945-0800273a0b5b",
"fire_actions": [
"56330521-92da-4a84-8239-73d880b978fa"
],
"description": "provisioning duration",
"expire_actions": [
"56330521-92da-4a84-8239-73d880b978fa"
],
"created_at": "2015-07-20T15:44:01",
"select": [
{
"traits": {
"tenant_id": "406904"
},
"event_type": "compute.instance.create.*"
}
],
"group_by": [
"instance_id"
],
"expiration": 3000,
"links": [
{
"rel": "self",
"href": "http://192.168.10.4:8082/v2.0/stream-definitions/242dd5f4-2ef6-11e5-8945-0800273a0b5b"
}
],
"updated_at": "2015-07-20T15:44:01",
"actions_enabled": true,
"name": "1437407040.8",
"fire_criteria": [
{
"event_type": "compute.instance.create.start"
},
{
"event_type": "compute.instance.create.end"
}
]
}
]
}
```
## GET /v2.0/stream-definition/{definition_id}
### Headers
* X-Auth-Token (string, required) - Keystone auth token
* Accept (string) - application/json
### Request Body
None.
### Request Example
```
GET /v2.0/stream-definitions/242dd5f4-2ef6-11e5-8945-0800273a0b5b HTTP/1.1
Host: 192.168.10.4:8082
X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
Accept: application/json
Cache-Control: no-cache
```
### Response Body
Returns a JSON object with a 'links' array of links and an 'elements' array of stream definition objects with the following fields:
* id (string)
* name (string)
* fire_actions (string)
* description (string)
* expire_actions (string)
* created_at (datetime string)
* select
* traits
* tenant_id (string)
* event_type (string)
* group_by (string)
* expiration (int)
* links - links to stream-definition
* updated_at (datetime string)
* actions_enabled (bool)
* fire_criteria - JSON list of event fire criteria
### Response Body Example
```
{
"id": "242dd5f4-2ef6-11e5-8945-0800273a0b5b",
"fire_actions": [
"56330521-92da-4a84-8239-73d880b978fa"
],
"description": "provisioning duration",
"expire_actions": [
"56330521-92da-4a84-8239-73d880b978fa"
],
"created_at": "2015-07-20T15:44:01",
"select": [
{
"traits": {
"tenant_id": "406904"
},
"event_type": "compute.instance.create.*"
}
],
"group_by": [
"instance_id"
],
"expiration": 3000,
"links": [
{
"rel": "self",
"href": "http://192.168.10.4:8082/v2.0/stream-definitions/242dd5f4-2ef6-11e5-8945-0800273a0b5b"
}
],
"updated_at": "2015-07-20T15:44:01",
"actions_enabled": true,
"name": "1437407040.8",
"fire_criteria": [
{
"event_type": "compute.instance.create.start"
},
{
"event_type": "compute.instance.create.end"
}
]
}
```
## DELETE /v2.0/stream-definition/{definition_id}
### Headers
* X-Auth-Token (string, required) - Keystone auth token
* Accept (string) - application/json
### Request Body
None.
### Request Example
```
DELETE /v2.0/stream-definitions/242dd5f4-2ef6-11e5-8945-0800273a0b5b HTTP/1.1
Host: 192.168.10.4:8082
X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
Accept: application/json
Cache-Control: no-cache
```
### Response Body
None.
### Response Body Example
None.
## POST /v2.0/transforms/
### Headers
* X-Auth-Token (string, required) - Keystone auth token
* Accept (string) - application/json
### Request Body
```
{
"name": 'example',
"description": 'an example definition',
"specification": YAML_data
}
```
### Request Example
```
POST /v2.0/transforms/ HTTP/1.1
Host: 192.168.10.4:8082
X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
Accept: application/json
Cache-Control: no-cache
```
### Response Body
None.
### Response Body Example
None.
## GET /v2.0/transforms/
### Headers
* X-Auth-Token (string, required) - Keystone auth token
* Accept (string) - application/json
### Request Body
None.
### Request Example
```
GET /v2.0/transforms/ HTTP/1.1
Host: 192.168.10.4:8082
X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
Accept: application/json
Cache-Control: no-cache
```
### Response Body
Returns a JSON object with a 'links' array of links and an 'elements' array of stream definition objects with the following fields:
* id (string)
* name (string)
* description (string)
* enabled (bool)
* tenant_id (string)
* deleted_at (datetime)
* specification (string YAML data)
* created_at (datetime)
* updated_at (datetime)
### Response Body Example
```
{
"links": [
{
"rel": "self",
"href": "http://192.168.10.4:8082/v2.0/transforms"
}
],
"elements": [
{
"enabled": 0,
"id": "a794f22f-a231-47a0-8618-37f12b7a6f77",
"tenant_id": "d502aac2388b43f392c302b37a401ae5",
"deleted_at": null,
"specification": YAML_data,
"created_at": 1437407042,
"updated_at": 1437407042,
"description": "an example definition",
"name": "func test2"
}
]
}
```
## GET /v2.0/transforms/{transform_id}
### Headers
* X-Auth-Token (string, required) - Keystone auth token
* Accept (string) - application/json
### Request Body
None.
### Request Example
```
GET /v2.0/transforms/a794f22f-a231-47a0-8618-37f12b7a6f77 HTTP/1.1
Host: 192.168.10.4:8082
X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
Accept: application/json
Cache-Control: no-cache
```
### Response Body
Returns a JSON object with a 'links' array of links and an 'elements' array of stream definition objects with the following fields:
* id (string)
* name (string)
* description (string)
* enabled (bool)
* tenant_id (string)
* deleted_at (datetime)
* specification (string YAML data)
* links - links to transform definition
* created_at (datetime)
* updated_at (datetime)
### Response Body Example
```
{
"enabled": 0,
"id": "a794f22f-a231-47a0-8618-37f12b7a6f77",
"tenant_id": "d502aac2388b43f392c302b37a401ae5",
"created_at": 1437407042,
"specification": "YAML_data",
"links": [
{
"rel": "self",
"href": "http://192.168.10.4:8082/v2.0/transforms/a794f22f-a231-47a0-8618-37f12b7a6f77"
}
],
"deleted_at": null,
"updated_at": 1437407042,
"description": "an example definition",
"name": "func test2"
}
```
## DELETE /v2.0/transforms/{transform_id}
### Headers
* X-Auth-Token (string, required) - Keystone auth token
* Accept (string) - application/json
### Request Body
None.
### Request Example
```
DELETE /v2.0/transforms/a794f22f-a231-47a0-8618-37f12b7a6f77 HTTP/1.1
Host: 192.168.10.4:8082
X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
Accept: application/json
Cache-Control: no-cache
```
### Response Body
None.
### Response Body Example
None.
# License

141
demo/demo.py Executable file
View File

@ -0,0 +1,141 @@
#!/opt/monasca/bin/python
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This script is designed to demo the entire Monasca Events package.
# It will post a stream defintion and transform defintion,
# and then it'll generate events at 5 per minute
import datetime
import json
import kafka
import sys
import time
import notigen
import requests
import yaml
from monascaclient import ksclient
events_url = "http://192.168.10.4:8082/v2.0"
def token():
keystone = {
'username': 'mini-mon',
'password': 'password',
'project': 'test',
'auth_url': 'http://192.168.10.5:35357/v3'
}
ks_client = ksclient.KSClient(**keystone)
return ks_client.token
headers = {
'X-Auth-User': 'mini-mon',
'X-Auth-Key': 'password',
'X-Auth-Token': token(),
'Accept': 'application/json',
'User-Agent': 'python-monascaclient',
'Content-Type': 'application/json'}
def stream_definition_post():
body = {}
notif_resp = requests.get(
url="http://192.168.10.4:8080/v2.0/notification-methods",
data=json.dumps(body), headers=headers)
notif_dict = json.loads(notif_resp.text)
action_id = str(notif_dict['elements'][0]['id'])
body = {"fire_criteria": [{"event_type": "compute.instance.create.start"},
{"event_type": "compute.instance.create.end"}],
"description": "provisioning duration",
"name": "Example Stream Definition",
"group_by": ["instance_id"],
"expiration": 3000,
"select": [{"traits": {"tenant_id": "406904"},
"event_type": "compute.instance.create.*"}],
"fire_actions": [action_id],
"expire_actions": [action_id]}
response = requests.post(
url=events_url + "/stream-definitions",
data=json.dumps(body),
headers=headers)
def transform_definition_post():
# Open example yaml file and post to DB
fh = open('files/transform_definition.yaml', 'r')
specification_data = yaml.load(fh)
body = {
"name": 'Example Transform Definition',
"description": 'an example description',
"specification": str(specification_data)
}
response = requests.post(
url=events_url + "/transforms",
data=json.dumps(body),
headers=headers)
def event_generator():
# generate 5 events per minute
g = notigen.EventGenerator("files/event_templates", operations_per_hour=300)
now = datetime.datetime.utcnow()
start = now
nevents = 0
length = 0
while nevents < 300:
e = g.generate(now)
if e:
nevents += len(e)
key = time.time() * 1000
msg = e
if len(msg) > length:
length = len(msg)
print("Max notification size: {}".format(length))
response = requests.post(
url=events_url + "/events",
data=json.dumps(msg),
headers=headers)
now = datetime.datetime.utcnow()
time.sleep(0.01)
def main():
stream_definition_post()
transform_definition_post()
event_generator()
if __name__ == "__main__":
sys.exit(main())

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,974 @@
[
{
"xuuid": 9,
"v4": 14,
"time_map": {
"[[[[DT_9]]]]": [
0,
3,
962765
],
"[[[[DT_5]]]]": [
-1,
86398,
713424
],
"[[[[DT_17]]]]": [
-199,
84770,
268272
],
"[[[[DT_23]]]]": [
0,
4,
536102
],
"[[[[DT_16]]]]": [
-163,
42547,
268272
],
"[[[[DT_20]]]]": [
-199,
85752,
268272
],
"[[[[DT_2]]]]": [
-199,
84770,
268272
],
"[[[[DT_15]]]]": [
-199,
84639,
268272
],
"[[[[DT_7]]]]": [
0,
0,
268272
],
"[[[[DT_21]]]]": [
-199,
85943,
268272
],
"[[[[DT_11]]]]": [
0,
4,
268272
],
"[[[[DT_3]]]]": [
-1,
86399,
268272
],
"[[[[DT_8]]]]": [
0,
1,
163638
],
"[[[[DT_14]]]]": [
-199,
84421,
268272
],
"[[[[DT_10]]]]": [
0,
3,
989039
],
"[[[[DT_4]]]]": [
0,
0,
0
],
"[[[[DT_22]]]]": [
-199,
85967,
268272
],
"[[[[DT_1]]]]": [
-199,
84421,
268272
],
"[[[[DT_13]]]]": [
-201,
56142,
268272
],
"[[[[DT_6]]]]": [
0,
0,
47717
],
"[[[[DT_12]]]]": [
0,
4,
463062
],
"[[[[DT_19]]]]": [
-199,
85725,
268272
],
"[[[[DT_18]]]]": [
0,
0,
268272
],
"[[[[DT_0]]]]": [
-1,
46116,
268272
]
},
"uuid": 18,
"v6": 2
},
{
"_context_request_id": "req-[[[[UUID_0]]]]",
"_context_quota_class": null,
"event_type": "compute.instance.update",
"_context_auth_token": "[[[[XUUID_0]]]]",
"_context_user_id": "[[[[user_id]]]]",
"payload": {
"state_description": "",
"availability_zone": null,
"terminated_at": "",
"ephemeral_gb": 600,
"instance_type_id": 15,
"bandwidth": {},
"deleted_at": "",
"reservation_id": "[[[[reservation_id]]]]",
"instance_id": "[[[[UUID_1]]]]",
"user_id": "[[[[XUUID_1]]]]",
"hostname": "[[[[hostname]]]]",
"state": "error",
"old_state": null,
"old_task_state": null,
"metadata": {},
"node": "[[[[node]]]]",
"ramdisk_id": "",
"access_ip_v6": "[[[[V6_0]]]]",
"disk_gb": 640,
"access_ip_v4": "[[[[V4_0]]]]",
"kernel_id": "",
"host": "[[[[host]]]]",
"display_name": "[[[[display_name]]]]",
"image_ref_url": "http://[[[[V4_1]]]]:9292/images/[[[[UUID_2]]]]",
"audit_period_beginning": "[[[[DT_0]]]]",
"root_gb": 40,
"tenant_id": "[[[[tenant_id]]]]",
"created_at": "[[[[DT_1]]]]",
"launched_at": "[[[[DT_2]]]]",
"memory_mb": 61440,
"instance_type": "60 GB Performance",
"vcpus": 16,
"image_meta": {
"container_format": "ovf",
"min_ram": "1024",
"base_image_ref": "[[[[UUID_2]]]]",
"org.openstack__1__os_distro": "com.microsoft.server",
"image_type": "base",
"disk_format": "vhd",
"org.openstack__1__architecture": "x64",
"auto_disk_config": "False",
"min_disk": "40",
"cache_in_nova": "True",
"os_type": "windows",
"org.openstack__1__os_version": "2008.2"
},
"architecture": "x64",
"new_task_state": null,
"audit_period_ending": "[[[[DT_3]]]]",
"os_type": "windows",
"instance_flavor_id": "performance2-60"
},
"priority": "INFO",
"_context_is_admin": true,
"_context_user": "[[[[user_id]]]]",
"publisher_id": "[[[[publisher_id]]]]",
"message_id": "[[[[UUID_3]]]]",
"_context_remote_address": "[[[[V4_2]]]]",
"_context_roles": [
"user-admin",
"bofh",
"glance",
"glance:admin"
],
"timestamp": "[[[[DT_4]]]]",
"_context_timestamp": "[[[[DT_5]]]]",
"_unique_id": "[[[[XUUID_2]]]]",
"_context_glance_api_servers": null,
"_context_project_name": "[[[[tenant_id]]]]",
"_context_read_deleted": "no",
"_context_tenant": "[[[[tenant_id]]]]",
"_context_instance_lock_checked": false,
"_context_project_id": "[[[[tenant_id]]]]",
"_context_user_name": "[[[[user_id]]]]"
},
{
"_context_request_id": "req-[[[[UUID_0]]]]",
"_context_quota_class": null,
"event_type": "compute.instance.update",
"_context_auth_token": "[[[[XUUID_0]]]]",
"_context_user_id": "[[[[user_id]]]]",
"payload": {
"state_description": "deleting",
"availability_zone": null,
"terminated_at": "",
"ephemeral_gb": 600,
"instance_type_id": 15,
"bandwidth": {},
"deleted_at": "",
"reservation_id": "[[[[reservation_id]]]]",
"instance_id": "[[[[UUID_1]]]]",
"user_id": "[[[[XUUID_1]]]]",
"hostname": "[[[[hostname]]]]",
"state": "error",
"old_state": "error",
"old_task_state": null,
"metadata": {},
"node": "[[[[node]]]]",
"ramdisk_id": "",
"access_ip_v6": "[[[[V6_0]]]]",
"disk_gb": 640,
"access_ip_v4": "[[[[V4_0]]]]",
"kernel_id": "",
"host": "[[[[host]]]]",
"display_name": "[[[[display_name]]]]",
"image_ref_url": "http://[[[[V4_3]]]]:9292/images/[[[[UUID_2]]]]",
"audit_period_beginning": "[[[[DT_0]]]]",
"root_gb": 40,
"tenant_id": "[[[[tenant_id]]]]",
"created_at": "[[[[DT_1]]]]",
"launched_at": "[[[[DT_2]]]]",
"memory_mb": 61440,
"instance_type": "60 GB Performance",
"vcpus": 16,
"image_meta": {
"container_format": "ovf",
"min_ram": "1024",
"base_image_ref": "[[[[UUID_2]]]]",
"org.openstack__1__os_distro": "com.microsoft.server",
"image_type": "base",
"disk_format": "vhd",
"org.openstack__1__architecture": "x64",
"auto_disk_config": "False",
"min_disk": "40",
"cache_in_nova": "True",
"os_type": "windows",
"org.openstack__1__os_version": "2008.2"
},
"architecture": "x64",
"new_task_state": "deleting",
"audit_period_ending": "[[[[DT_3]]]]",
"os_type": "windows",
"instance_flavor_id": "performance2-60"
},
"priority": "INFO",
"_context_is_admin": true,
"_context_user": "[[[[user_id]]]]",
"publisher_id": "[[[[publisher_id]]]]",
"message_id": "[[[[UUID_4]]]]",
"_context_remote_address": "[[[[V4_2]]]]",
"_context_roles": [
"user-admin",
"bofh",
"glance",
"glance:admin"
],
"timestamp": "[[[[DT_6]]]]",
"_context_timestamp": "[[[[DT_5]]]]",
"_unique_id": "[[[[XUUID_3]]]]",
"_context_glance_api_servers": null,
"_context_project_name": "[[[[tenant_id]]]]",
"_context_read_deleted": "no",
"_context_tenant": "[[[[tenant_id]]]]",
"_context_instance_lock_checked": false,
"_context_project_id": "[[[[tenant_id]]]]",
"_context_user_name": "[[[[user_id]]]]"
},
{
"_context_request_id": "req-[[[[UUID_0]]]]",
"_context_quota_class": null,
"event_type": "compute.instance.update",
"_context_auth_token": "[[[[XUUID_0]]]]",
"_context_user_id": "[[[[user_id]]]]",
"payload": {
"state_description": "deleting",
"availability_zone": null,
"terminated_at": "",
"ephemeral_gb": 600,
"instance_type_id": 15,
"bandwidth": {},
"deleted_at": "",
"reservation_id": "[[[[reservation_id]]]]",
"instance_id": "[[[[UUID_1]]]]",
"user_id": "[[[[XUUID_1]]]]",
"hostname": "[[[[hostname]]]]",
"state": "error",
"old_state": "error",
"old_task_state": null,
"metadata": {},
"node": "[[[[node]]]]",
"ramdisk_id": "",
"access_ip_v6": "[[[[V6_0]]]]",
"disk_gb": 640,
"access_ip_v4": "[[[[V4_0]]]]",
"kernel_id": "",
"host": "[[[[host]]]]",
"display_name": "[[[[display_name]]]]",
"image_ref_url": "http://[[[[V4_1]]]]:9292/images/[[[[UUID_2]]]]",
"audit_period_beginning": "[[[[DT_0]]]]",
"root_gb": 40,
"tenant_id": "[[[[tenant_id]]]]",
"created_at": "[[[[DT_1]]]]",
"launched_at": "[[[[DT_2]]]]",
"memory_mb": 61440,
"instance_type": "60 GB Performance",
"vcpus": 16,
"image_meta": {
"container_format": "ovf",
"min_ram": "1024",
"base_image_ref": "[[[[UUID_2]]]]",
"org.openstack__1__os_distro": "com.microsoft.server",
"image_type": "base",
"disk_format": "vhd",
"org.openstack__1__architecture": "x64",
"auto_disk_config": "False",
"min_disk": "40",
"cache_in_nova": "True",
"os_type": "windows",
"org.openstack__1__os_version": "2008.2"
},
"architecture": "x64",
"new_task_state": "deleting",
"audit_period_ending": "[[[[DT_7]]]]",
"os_type": "windows",
"instance_flavor_id": "performance2-60"
},
"priority": "INFO",
"_context_is_admin": true,
"_context_user": "[[[[user_id]]]]",
"publisher_id": "[[[[publisher_id]]]]",
"message_id": "[[[[UUID_5]]]]",
"_context_remote_address": "[[[[V4_2]]]]",
"_context_roles": [
"user-admin",
"bofh",
"glance",
"glance:admin",
"admin"
],
"timestamp": "[[[[DT_8]]]]",
"_context_timestamp": "[[[[DT_5]]]]",
"_unique_id": "[[[[XUUID_4]]]]",
"_context_glance_api_servers": null,
"_context_project_name": "[[[[tenant_id]]]]",
"_context_read_deleted": "no",
"_context_tenant": "[[[[tenant_id]]]]",
"_context_instance_lock_checked": false,
"_context_project_id": "[[[[tenant_id]]]]",
"_context_user_name": "[[[[user_id]]]]"
},
{
"_context_request_id": "req-[[[[UUID_0]]]]",
"_context_quota_class": null,
"event_type": "compute.instance.delete.start",
"_context_auth_token": "[[[[XUUID_0]]]]",
"_context_user_id": "[[[[user_id]]]]",
"payload": {
"state_description": "deleting",
"availability_zone": null,
"terminated_at": "",
"ephemeral_gb": 600,
"instance_type_id": 15,
"deleted_at": "",
"reservation_id": "[[[[reservation_id]]]]",
"instance_id": "[[[[UUID_1]]]]",
"user_id": "[[[[XUUID_1]]]]",
"hostname": "[[[[hostname]]]]",
"state": "error",
"launched_at": "[[[[DT_2]]]]",
"metadata": {},
"node": "[[[[node]]]]",
"ramdisk_id": "",
"access_ip_v6": "[[[[V6_0]]]]",
"disk_gb": 640,
"access_ip_v4": "[[[[V4_0]]]]",
"kernel_id": "",
"host": "[[[[host]]]]",
"display_name": "[[[[display_name]]]]",
"image_ref_url": "http://[[[[V4_4]]]]:9292/images/[[[[UUID_2]]]]",
"root_gb": 40,
"tenant_id": "[[[[tenant_id]]]]",
"created_at": "[[[[DT_1]]]]",
"memory_mb": 61440,
"instance_type": "60 GB Performance",
"vcpus": 16,
"image_meta": {
"container_format": "ovf",
"min_ram": "1024",
"base_image_ref": "[[[[UUID_2]]]]",
"org.openstack__1__os_distro": "com.microsoft.server",
"image_type": "base",
"disk_format": "vhd",
"org.openstack__1__architecture": "x64",
"auto_disk_config": "False",
"min_disk": "40",
"cache_in_nova": "True",
"os_type": "windows",
"org.openstack__1__os_version": "2008.2"
},
"architecture": "x64",
"os_type": "windows",
"instance_flavor_id": "performance2-60"
},
"priority": "INFO",
"_context_is_admin": true,
"_context_user": "[[[[user_id]]]]",
"publisher_id": "[[[[publisher_id]]]]",
"message_id": "[[[[UUID_6]]]]",
"_context_remote_address": "[[[[V4_2]]]]",
"_context_roles": [
"user-admin",
"bofh",
"glance",
"glance:admin",
"admin"
],
"timestamp": "[[[[DT_9]]]]",
"_context_timestamp": "[[[[DT_5]]]]",
"_unique_id": "[[[[XUUID_5]]]]",
"_context_glance_api_servers": null,
"_context_project_name": "[[[[tenant_id]]]]",
"_context_read_deleted": "no",
"_context_tenant": "[[[[tenant_id]]]]",
"_context_instance_lock_checked": false,
"_context_project_id": "[[[[tenant_id]]]]",
"_context_user_name": "[[[[user_id]]]]"
},
{
"_context_request_id": "req-[[[[UUID_0]]]]",
"_context_quota_class": null,
"event_type": "compute.instance.shutdown.start",
"_context_auth_token": "[[[[XUUID_0]]]]",
"_context_user_id": "[[[[user_id]]]]",
"payload": {
"state_description": "deleting",
"availability_zone": null,
"terminated_at": "",
"ephemeral_gb": 600,
"instance_type_id": 15,
"deleted_at": "",
"reservation_id": "[[[[reservation_id]]]]",
"instance_id": "[[[[UUID_1]]]]",
"user_id": "[[[[XUUID_1]]]]",
"hostname": "[[[[hostname]]]]",
"state": "error",
"launched_at": "[[[[DT_2]]]]",
"metadata": {},
"node": "[[[[node]]]]",
"ramdisk_id": "",
"access_ip_v6": "[[[[V6_0]]]]",
"disk_gb": 640,
"access_ip_v4": "[[[[V4_0]]]]",
"kernel_id": "",
"host": "[[[[host]]]]",
"display_name": "[[[[display_name]]]]",
"image_ref_url": "http://[[[[V4_4]]]]:9292/images/[[[[UUID_2]]]]",
"root_gb": 40,
"tenant_id": "[[[[tenant_id]]]]",
"created_at": "[[[[DT_1]]]]",
"memory_mb": 61440,
"instance_type": "60 GB Performance",
"vcpus": 16,
"image_meta": {
"container_format": "ovf",
"min_ram": "1024",
"base_image_ref": "[[[[UUID_2]]]]",
"org.openstack__1__os_distro": "com.microsoft.server",
"image_type": "base",
"disk_format": "vhd",
"org.openstack__1__architecture": "x64",
"auto_disk_config": "False",
"min_disk": "40",
"cache_in_nova": "True",
"os_type": "windows",
"org.openstack__1__os_version": "2008.2"
},
"architecture": "x64",
"os_type": "windows",
"instance_flavor_id": "performance2-60"
},
"priority": "INFO",
"_context_is_admin": true,
"_context_user": "[[[[user_id]]]]",
"publisher_id": "[[[[publisher_id]]]]",
"message_id": "[[[[UUID_7]]]]",
"_context_remote_address": "[[[[V4_2]]]]",
"_context_roles": [
"user-admin",
"bofh",
"glance",
"glance:admin",
"admin"
],
"timestamp": "[[[[DT_10]]]]",
"_context_timestamp": "[[[[DT_5]]]]",
"_unique_id": "[[[[XUUID_6]]]]",
"_context_glance_api_servers": null,
"_context_project_name": "[[[[tenant_id]]]]",
"_context_read_deleted": "no",
"_context_tenant": "[[[[tenant_id]]]]",
"_context_instance_lock_checked": false,
"_context_project_id": "[[[[tenant_id]]]]",
"_context_user_name": "[[[[user_id]]]]"
},
{
"_context_request_id": "req-[[[[UUID_0]]]]",
"_context_quota_class": null,
"event_type": "compute.instance.update",
"_context_auth_token": "[[[[XUUID_0]]]]",
"_context_user_id": "[[[[user_id]]]]",
"payload": {
"state_description": "deleting",
"availability_zone": null,
"terminated_at": "",
"ephemeral_gb": 600,
"instance_type_id": 15,
"bandwidth": {},
"deleted_at": "",
"reservation_id": "[[[[reservation_id]]]]",
"instance_id": "[[[[UUID_1]]]]",
"user_id": "[[[[XUUID_1]]]]",
"hostname": "[[[[hostname]]]]",
"state": "error",
"old_state": null,
"old_task_state": null,
"metadata": {},
"node": "[[[[node]]]]",
"ramdisk_id": "",
"access_ip_v6": "[[[[V6_0]]]]",
"disk_gb": 640,
"access_ip_v4": "[[[[V4_0]]]]",
"kernel_id": "",
"host": "[[[[host]]]]",
"display_name": "[[[[display_name]]]]",
"image_ref_url": "http://[[[[V4_4]]]]:9292/images/[[[[UUID_2]]]]",
"audit_period_beginning": "[[[[DT_0]]]]",
"root_gb": 40,
"tenant_id": "[[[[tenant_id]]]]",
"created_at": "[[[[DT_1]]]]",
"launched_at": "[[[[DT_2]]]]",
"memory_mb": 61440,
"instance_type": "60 GB Performance",
"vcpus": 16,
"image_meta": {
"container_format": "ovf",
"min_ram": "1024",
"base_image_ref": "[[[[UUID_2]]]]",
"org.openstack__1__os_distro": "com.microsoft.server",
"image_type": "base",
"disk_format": "vhd",
"org.openstack__1__architecture": "x64",
"auto_disk_config": "False",
"min_disk": "40",
"cache_in_nova": "True",
"os_type": "windows",
"org.openstack__1__os_version": "2008.2"
},
"architecture": "x64",
"new_task_state": "deleting",
"audit_period_ending": "[[[[DT_11]]]]",
"os_type": "windows",
"instance_flavor_id": "performance2-60"
},
"priority": "INFO",
"_context_is_admin": true,
"_context_user": "[[[[user_id]]]]",
"publisher_id": "[[[[publisher_id]]]]",
"message_id": "[[[[UUID_8]]]]",
"_context_remote_address": "[[[[V4_2]]]]",
"_context_roles": [
"user-admin",
"bofh",
"glance",
"glance:admin",
"admin"
],
"timestamp": "[[[[DT_12]]]]",
"_context_timestamp": "[[[[DT_5]]]]",
"_unique_id": "[[[[XUUID_7]]]]",
"_context_glance_api_servers": null,
"_context_project_name": "[[[[tenant_id]]]]",
"_context_read_deleted": "no",
"_context_tenant": "[[[[tenant_id]]]]",
"_context_instance_lock_checked": false,
"_context_project_id": "[[[[tenant_id]]]]",
"_context_user_name": "[[[[user_id]]]]"
},
{
"_context_request_id": "req-[[[[UUID_0]]]]",
"_context_quota_class": null,
"event_type": "terminate_instance",
"_context_auth_token": "[[[[XUUID_0]]]]",
"_context_user_id": "[[[[user_id]]]]",
"payload": {
"exception": {},
"args": {
"instance": {
"vm_state": "error",
"availability_zone": null,
"terminated_at": null,
"ephemeral_gb": 600,
"instance_type_id": 15,
"user_data": null,
"cleaned": false,
"vm_mode": "hvm",
"deleted_at": null,
"reservation_id": "[[[[reservation_id]]]]",
"id": 346688,
"security_groups": {
"objects": [
{
"deleted_at": null,
"user_id": "[[[[XUUID_1]]]]",
"description": "default",
"deleted": false,
"created_at": "[[[[DT_13]]]]",
"updated_at": null,
"project_id": "[[[[tenant_id]]]]",
"id": 187,
"name": "[[[[display_name]]]]"
}
]
},
"disable_terminate": false,
"root_device_name": "/dev/xvda",
"display_name": "[[[[display_name]]]]",
"uuid": "[[[[UUID_1]]]]",
"default_swap_device": null,
"info_cache": {
"instance_uuid": "[[[[UUID_1]]]]",
"deleted": true,
"created_at": "[[[[DT_14]]]]",
"updated_at": "[[[[DT_15]]]]",
"network_info": [
{
"ovs_interfaceid": null,
"network": {
"bridge": "publicnet",
"label": "public",
"meta": {
"original_id": "[[[[UUID_9]]]]",
"nvp_managed": false
},
"id": "[[[[UUID_10]]]]",
"subnets": [
{
"ips": [
{
"meta": {},
"type": "fixed",
"floating_ips": [],
"version": 6,
"address": "[[[[V6_1]]]]"
}
],
"version": 6,
"meta": {},
"dns": [
{
"meta": {},
"type": "dns",
"version": 4,
"address": "[[[[V4_5]]]]"
},
{
"meta": {},
"type": "dns",
"version": 4,
"address": "[[[[V4_6]]]]"
}
],
"routes": [],
"cidr": "2a00:1a48:7807:101::/64",
"gateway": {
"meta": {},
"type": "gateway",
"version": 6,
"address": "fe80::def"
}
},
{
"ips": [
{
"meta": {},
"type": "fixed",
"floating_ips": [],
"version": 4,
"address": "[[[[V4_0]]]]"
}
],
"version": 4,
"meta": {},
"dns": [
{
"meta": {},
"type": "dns",
"version": 4,
"address": "[[[[V4_5]]]]"
},
{
"meta": {},
"type": "dns",
"version": 4,
"address": "[[[[V4_6]]]]"
}
],
"routes": [],
"cidr": "[[[[V4_7]]]]/24",
"gateway": {
"meta": {},
"type": "gateway",
"version": 4,
"address": "[[[[V4_8]]]]"
}
}
]
},
"devname": "[[[[device_name]]]]",
"qbh_params": null,
"meta": {},
"address": "BC:76:4E:08:43:27",
"type": null,
"id": "[[[[UUID_11]]]]",
"qbg_params": null
},
{
"ovs_interfaceid": null,
"network": {
"bridge": "servicenet",
"label": "private",
"meta": {
"original_id": "[[[[UUID_12]]]]",
"nvp_managed": false
},
"id": "[[[[UUID_13]]]]",
"subnets": [
{
"ips": [
{
"meta": {},
"type": "fixed",
"floating_ips": [],
"version": 4,
"address": "[[[[V4_9]]]]"
}
],
"version": 4,
"meta": {},
"dns": [
{
"meta": {},
"type": "dns",
"version": 4,
"address": "[[[[V4_5]]]]"
},
{
"meta": {},
"type": "dns",
"version": 4,
"address": "[[[[V4_6]]]]"
}
],
"routes": [
{
"interface": null,
"cidr": "[[[[V4_10]]]]/12",
"meta": {},
"gateway": {
"meta": {},
"type": "gateway",
"version": 4,
"address": "[[[[V4_11]]]]"
}
},
{
"interface": null,
"cidr": "[[[[V4_12]]]]/12",
"meta": {},
"gateway": {
"meta": {},
"type": "gateway",
"version": 4,
"address": "[[[[V4_11]]]]"
}
}
],
"cidr": "[[[[V4_13]]]]/20",
"gateway": null
}
]
},
"devname": "[[[[device_name]]]]",
"qbh_params": null,
"meta": {},
"address": "BC:76:4E:08:92:48",
"type": null,
"id": "[[[[UUID_14]]]]",
"qbg_params": null
}
],
"deleted_at": "[[[[DT_16]]]]"
},
"hostname": "[[[[hostname]]]]",
"launched_on": "c-10-21-128-29",
"display_description": "[[[[display_name]]]]",
"key_data": null,
"deleted": false,
"config_drive": "",
"power_state": 0,
"default_ephemeral_device": null,
"progress": 0,
"project_id": "[[[[tenant_id]]]]",
"launched_at": "[[[[DT_17]]]]",
"scheduled_at": "[[[[DT_14]]]]",
"node": "[[[[node]]]]",
"ramdisk_id": "",
"access_ip_v6": "[[[[V6_0]]]]",
"access_ip_v4": "[[[[V4_0]]]]",
"kernel_id": "",
"key_name": null,
"updated_at": "[[[[DT_18]]]]",
"host": "[[[[host]]]]",
"root_gb": 40,
"user_id": "[[[[XUUID_1]]]]",
"system_metadata": {
"instance_type_id": "15",
"image_min_ram": "1024",
"instance_type_vcpu_weight": "10",
"image_cache_in_nova": "True",
"instance_type_ephemeral_gb": "600",
"image_org.openstack__1__os_version": "2008.2",
"image_org.openstack__1__os_distro": "com.microsoft.server",
"image_org.openstack__1__architecture": "x64",
"image_base_image_ref": "[[[[UUID_2]]]]",
"image_os_type": "windows",
"instance_type_root_gb": "40",
"instance_type_name": "60 GB Performance",
"image_image_type": "base",
"instance_type_rxtx_factor": "5000.0",
"image_auto_disk_config": "False",
"instance_type_vcpus": "16",
"image_disk_format": "vhd",
"instance_type_memory_mb": "61440",
"instance_type_swap": "0",
"image_min_disk": "40",
"instance_type_flavorid": "performance2-60",
"image_container_format": "ovf"
},
"task_state": "deleting",
"shutdown_terminate": false,
"cell_name": null,
"ephemeral_key_uuid": null,
"locked": false,
"name": "instance-[[[[UUID_1]]]]",
"created_at": "[[[[DT_14]]]]",
"locked_by": null,
"launch_index": 0,
"memory_mb": 61440,
"vcpus": 16,
"image_ref": "[[[[UUID_2]]]]",
"architecture": "x64",
"auto_disk_config": false,
"os_type": "windows",
"metadata": {}
},
"self": null,
"context": {
"project_name": "[[[[tenant_id]]]]",
"user_id": "[[[[user_id]]]]",
"roles": [
"user-admin",
"bofh",
"glance",
"glance:admin",
"admin"
],
"_read_deleted": "no",
"timestamp": "[[[[DT_5]]]]",
"auth_token": "[[[[XUUID_0]]]]",
"remote_address": "[[[[V4_2]]]]",
"quota_class": null,
"is_admin": true,
"glance_api_servers": null,
"request_id": "req-[[[[UUID_0]]]]",
"instance_lock_checked": false,
"project_id": "[[[[tenant_id]]]]",
"user_name": "[[[[user_id]]]]"
},
"bdms": [
{
"instance_uuid": "[[[[UUID_1]]]]",
"virtual_name": null,
"no_device": null,
"created_at": "[[[[DT_19]]]]",
"snapshot_id": null,
"updated_at": "[[[[DT_20]]]]",
"device_name": "/dev/xvdb",
"deleted": 0,
"volume_size": null,
"volume_id": "[[[[UUID_15]]]]",
"id": 13754,
"deleted_at": null,
"delete_on_termination": false
},
{
"instance_uuid": "[[[[UUID_1]]]]",
"virtual_name": null,
"no_device": null,
"created_at": "[[[[DT_21]]]]",
"snapshot_id": null,
"updated_at": "[[[[DT_22]]]]",
"device_name": "/dev/xvdc",
"deleted": 0,
"volume_size": null,
"volume_id": "[[[[UUID_16]]]]",
"id": 13755,
"deleted_at": null,
"delete_on_termination": false
}
],
"reservations": []
}
},
"priority": "ERROR",
"_context_is_admin": true,
"_context_user": "[[[[user_id]]]]",
"publisher_id": "[[[[publisher_id]]]]",
"message_id": "[[[[UUID_17]]]]",
"_context_remote_address": "[[[[V4_2]]]]",
"_context_roles": [
"user-admin",
"bofh",
"glance",
"glance:admin",
"admin"
],
"timestamp": "[[[[DT_23]]]]",
"_context_timestamp": "[[[[DT_5]]]]",
"_unique_id": "[[[[XUUID_8]]]]",
"_context_glance_api_servers": null,
"_context_project_name": "[[[[tenant_id]]]]",
"_context_read_deleted": "no",
"_context_tenant": "[[[[tenant_id]]]]",
"_context_instance_lock_checked": false,
"_context_project_id": "[[[[tenant_id]]]]",
"_context_user_name": "[[[[user_id]]]]"
}
]

View File

@ -0,0 +1,370 @@
[
{
"xuuid": 4,
"v4": 2,
"time_map": {
"[[[[DT_9]]]]": [
0,
1,
19109
],
"[[[[DT_5]]]]": [
-1,
86392,
365732
],
"[[[[DT_7]]]]": [
0,
0,
667761
],
"[[[[DT_1]]]]": [
-321,
54605,
667761
],
"[[[[DT_3]]]]": [
-1,
86399,
667761
],
"[[[[DT_8]]]]": [
0,
0,
990505
],
"[[[[DT_4]]]]": [
0,
0,
0
],
"[[[[DT_6]]]]": [
0,
0,
175295
],
"[[[[DT_0]]]]": [
-1,
19714,
667761
],
"[[[[DT_2]]]]": [
-321,
54911,
667761
]
},
"uuid": 7,
"v6": 1
},
{
"_context_request_id": "req-[[[[UUID_0]]]]",
"_context_quota_class": null,
"event_type": "compute.instance.update",
"_context_auth_token": null,
"_context_user_id": "[[[[user_id]]]]",
"payload": {
"state_description": "powering-off",
"availability_zone": null,
"terminated_at": "",
"ephemeral_gb": 0,
"instance_type_id": 5,
"bandwidth": {
"public": {
"bw_in": 537783,
"bw_out": 19189871
}
},
"deleted_at": "",
"reservation_id": "[[[[reservation_id]]]]",
"instance_id": "[[[[UUID_1]]]]",
"user_id": "[[[[user_id]]]]",
"hostname": "[[[[hostname]]]]",
"state": "active",
"old_state": "active",
"old_task_state": null,
"metadata": {},
"node": "[[[[node]]]]",
"ramdisk_id": "",
"access_ip_v6": "[[[[V6_0]]]]",
"disk_gb": 160,
"access_ip_v4": "[[[[V4_0]]]]",
"kernel_id": "",
"host": "[[[[host]]]]",
"display_name": "[[[[display_name]]]]",
"image_ref_url": "http://[[[[V4_1]]]]:9292/images/[[[[UUID_2]]]]",
"audit_period_beginning": "[[[[DT_0]]]]",
"root_gb": 160,
"tenant_id": "[[[[tenant_id]]]]",
"created_at": "[[[[DT_1]]]]",
"launched_at": "[[[[DT_2]]]]",
"memory_mb": 4096,
"instance_type": "4GB Standard Instance",
"vcpus": 2,
"image_meta": {
"container_format": "ovf",
"min_ram": "512",
"base_image_ref": "[[[[UUID_2]]]]",
"os_distro": "rhel",
"org.openstack__1__os_distro": "com.redhat",
"image_type": "base",
"disk_format": "vhd",
"org.openstack__1__architecture": "x64",
"auto_disk_config": "True",
"min_disk": "160",
"cache_in_nova": "True",
"os_type": "linux",
"org.openstack__1__os_version": "6.3"
},
"architecture": null,
"new_task_state": "powering-off",
"audit_period_ending": "[[[[DT_3]]]]",
"os_type": "linux",
"instance_flavor_id": "5"
},
"priority": "INFO",
"_context_is_admin": true,
"_context_user": "[[[[user_id]]]]",
"publisher_id": "[[[[publisher_id]]]]",
"message_id": "[[[[UUID_3]]]]",
"_context_remote_address": null,
"_context_roles": [],
"timestamp": "[[[[DT_4]]]]",
"_context_timestamp": "[[[[DT_5]]]]",
"_unique_id": "[[[[XUUID_0]]]]",
"_context_glance_api_servers": null,
"_context_project_name": "[[[[tenant_id]]]]",
"_context_read_deleted": "no",
"_context_tenant": "[[[[tenant_id]]]]",
"_context_instance_lock_checked": false,
"_context_project_id": "[[[[tenant_id]]]]",
"_context_user_name": "[[[[user_id]]]]"
},
{
"_context_request_id": "req-[[[[UUID_0]]]]",
"_context_quota_class": null,
"event_type": "compute.instance.power_off.start",
"_context_auth_token": null,
"_context_user_id": "[[[[user_id]]]]",
"payload": {
"state_description": "powering-off",
"availability_zone": null,
"terminated_at": "",
"ephemeral_gb": 0,
"instance_type_id": 5,
"deleted_at": "",
"reservation_id": "[[[[reservation_id]]]]",
"instance_id": "[[[[UUID_1]]]]",
"user_id": "[[[[user_id]]]]",
"hostname": "[[[[hostname]]]]",
"state": "active",
"launched_at": "[[[[DT_2]]]]",
"metadata": {},
"node": "[[[[node]]]]",
"ramdisk_id": "",
"access_ip_v6": "[[[[V6_0]]]]",
"disk_gb": 160,
"access_ip_v4": "[[[[V4_0]]]]",
"kernel_id": "",
"host": "[[[[host]]]]",
"display_name": "[[[[display_name]]]]",
"image_ref_url": "http://[[[[V4_1]]]]:9292/images/[[[[UUID_2]]]]",
"root_gb": 160,
"tenant_id": "[[[[tenant_id]]]]",
"created_at": "[[[[DT_1]]]]",
"memory_mb": 4096,
"instance_type": "4GB Standard Instance",
"vcpus": 2,
"image_meta": {
"container_format": "ovf",
"min_ram": "512",
"base_image_ref": "[[[[UUID_2]]]]",
"os_distro": "rhel",
"org.openstack__1__os_distro": "com.redhat",
"image_type": "base",
"disk_format": "vhd",
"org.openstack__1__architecture": "x64",
"auto_disk_config": "True",
"min_disk": "160",
"cache_in_nova": "True",
"os_type": "linux",
"org.openstack__1__os_version": "6.3"
},
"architecture": null,
"os_type": "linux",
"instance_flavor_id": "5"
},
"priority": "INFO",
"_context_is_admin": true,
"_context_user": "[[[[user_id]]]]",
"publisher_id": "[[[[publisher_id]]]]",
"message_id": "[[[[UUID_4]]]]",
"_context_remote_address": null,
"_context_roles": [],
"timestamp": "[[[[DT_6]]]]",
"_context_timestamp": "[[[[DT_5]]]]",
"_unique_id": "[[[[XUUID_1]]]]",
"_context_glance_api_servers": null,
"_context_project_name": "[[[[tenant_id]]]]",
"_context_read_deleted": "no",
"_context_tenant": "[[[[tenant_id]]]]",
"_context_instance_lock_checked": false,
"_context_project_id": "[[[[tenant_id]]]]",
"_context_user_name": "[[[[user_id]]]]"
},
{
"_context_request_id": "req-[[[[UUID_0]]]]",
"_context_quota_class": null,
"event_type": "compute.instance.update",
"_context_auth_token": null,
"_context_user_id": "[[[[user_id]]]]",
"payload": {
"state_description": "",
"availability_zone": null,
"terminated_at": "",
"ephemeral_gb": 0,
"instance_type_id": 5,
"bandwidth": {
"public": {
"bw_in": 537783,
"bw_out": 19189871
}
},
"deleted_at": "",
"reservation_id": "[[[[reservation_id]]]]",
"instance_id": "[[[[UUID_1]]]]",
"user_id": "[[[[user_id]]]]",
"hostname": "[[[[hostname]]]]",
"state": "stopped",
"old_state": "active",
"old_task_state": "powering-off",
"metadata": {},
"node": "[[[[node]]]]",
"ramdisk_id": "",
"access_ip_v6": "[[[[V6_0]]]]",
"disk_gb": 160,
"access_ip_v4": "[[[[V4_0]]]]",
"kernel_id": "",
"host": "[[[[host]]]]",
"display_name": "[[[[display_name]]]]",
"image_ref_url": "http://[[[[V4_1]]]]:9292/images/[[[[UUID_2]]]]",
"audit_period_beginning": "[[[[DT_0]]]]",
"root_gb": 160,
"tenant_id": "[[[[tenant_id]]]]",
"created_at": "[[[[DT_1]]]]",
"launched_at": "[[[[DT_2]]]]",
"memory_mb": 4096,
"instance_type": "4GB Standard Instance",
"vcpus": 2,
"image_meta": {
"container_format": "ovf",
"min_ram": "512",
"base_image_ref": "[[[[UUID_2]]]]",
"os_distro": "rhel",
"org.openstack__1__os_distro": "com.redhat",
"image_type": "base",
"disk_format": "vhd",
"org.openstack__1__architecture": "x64",
"auto_disk_config": "True",
"min_disk": "160",
"cache_in_nova": "True",
"os_type": "linux",
"org.openstack__1__os_version": "6.3"
},
"architecture": null,
"new_task_state": null,
"audit_period_ending": "[[[[DT_7]]]]",
"os_type": "linux",
"instance_flavor_id": "5"
},
"priority": "INFO",
"_context_is_admin": true,
"_context_user": "[[[[user_id]]]]",
"publisher_id": "[[[[publisher_id]]]]",
"message_id": "[[[[UUID_5]]]]",
"_context_remote_address": null,
"_context_roles": [],
"timestamp": "[[[[DT_8]]]]",
"_context_timestamp": "[[[[DT_5]]]]",
"_unique_id": "[[[[XUUID_2]]]]",
"_context_glance_api_servers": null,
"_context_project_name": "[[[[tenant_id]]]]",
"_context_read_deleted": "no",
"_context_tenant": "[[[[tenant_id]]]]",
"_context_instance_lock_checked": false,
"_context_project_id": "[[[[tenant_id]]]]",
"_context_user_name": "[[[[user_id]]]]"
},
{
"_context_request_id": "req-[[[[UUID_0]]]]",
"_context_quota_class": null,
"event_type": "compute.instance.power_off.end",
"_context_auth_token": null,
"_context_user_id": "[[[[user_id]]]]",
"payload": {
"state_description": "",
"availability_zone": null,
"terminated_at": "",
"ephemeral_gb": 0,
"instance_type_id": 5,
"deleted_at": "",
"reservation_id": "[[[[reservation_id]]]]",
"instance_id": "[[[[UUID_1]]]]",
"user_id": "[[[[user_id]]]]",
"hostname": "[[[[hostname]]]]",
"state": "stopped",
"launched_at": "[[[[DT_2]]]]",
"metadata": {},
"node": "[[[[node]]]]",
"ramdisk_id": "",
"access_ip_v6": "[[[[V6_0]]]]",
"disk_gb": 160,
"access_ip_v4": "[[[[V4_0]]]]",
"kernel_id": "",
"host": "[[[[host]]]]",
"display_name": "[[[[display_name]]]]",
"image_ref_url": "http://[[[[V4_1]]]]:9292/images/[[[[UUID_2]]]]",
"root_gb": 160,
"tenant_id": "[[[[tenant_id]]]]",
"created_at": "[[[[DT_1]]]]",
"memory_mb": 4096,
"instance_type": "4GB Standard Instance",
"vcpus": 2,
"image_meta": {
"container_format": "ovf",
"min_ram": "512",
"base_image_ref": "[[[[UUID_2]]]]",
"os_distro": "rhel",
"org.openstack__1__os_distro": "com.redhat",
"image_type": "base",
"disk_format": "vhd",
"org.openstack__1__architecture": "x64",
"auto_disk_config": "True",
"min_disk": "160",
"cache_in_nova": "True",
"os_type": "linux",
"org.openstack__1__os_version": "6.3"
},
"architecture": null,
"os_type": "linux",
"instance_flavor_id": "5"
},
"priority": "INFO",
"_context_is_admin": true,
"_context_user": "[[[[user_id]]]]",
"publisher_id": "[[[[publisher_id]]]]",
"message_id": "[[[[UUID_6]]]]",
"_context_remote_address": null,
"_context_roles": [],
"timestamp": "[[[[DT_9]]]]",
"_context_timestamp": "[[[[DT_5]]]]",
"_unique_id": "[[[[XUUID_3]]]]",
"_context_glance_api_servers": null,
"_context_project_name": "[[[[tenant_id]]]]",
"_context_read_deleted": "no",
"_context_tenant": "[[[[tenant_id]]]]",
"_context_instance_lock_checked": false,
"_context_project_id": "[[[[tenant_id]]]]",
"_context_user_name": "[[[[user_id]]]]"
}
]

View File

@ -0,0 +1,598 @@
[
{
"xuuid": 7,
"v4": 5,
"time_map": {
"[[[[DT_9]]]]": [
0,
1,
667540
],
"[[[[DT_12]]]]": [
0,
104,
358269
],
"[[[[DT_5]]]]": [
-1,
86399,
584928
],
"[[[[DT_7]]]]": [
0,
0,
838660
],
"[[[[DT_1]]]]": [
-53,
31457,
654695
],
"[[[[DT_3]]]]": [
-1,
86399,
654695
],
"[[[[DT_8]]]]": [
0,
1,
257119
],
"[[[[DT_10]]]]": [
0,
103,
654695
],
"[[[[DT_4]]]]": [
0,
0,
0
],
"[[[[DT_6]]]]": [
0,
0,
654695
],
"[[[[DT_0]]]]": [
-1,
81879,
654695
],
"[[[[DT_2]]]]": [
-53,
31518,
654695
],
"[[[[DT_11]]]]": [
0,
104,
332227
]
},
"uuid": 9,
"v6": 1
},
{
"_context_request_id": "req-[[[[UUID_0]]]]",
"_context_quota_class": null,
"event_type": "compute.instance.update",
"_context_auth_token": "[[[[XUUID_0]]]]",
"_context_user_id": "[[[[user_id]]]]",
"payload": {
"state_description": "rebooting",
"availability_zone": null,
"terminated_at": "",
"ephemeral_gb": 80,
"instance_type_id": 12,
"bandwidth": {},
"deleted_at": "",
"reservation_id": "[[[[reservation_id]]]]",
"instance_id": "[[[[UUID_1]]]]",
"user_id": "[[[[user_id]]]]",
"hostname": "[[[[hostname]]]]",
"state": "active",
"old_state": "active",
"old_task_state": null,
"metadata": {},
"node": "[[[[node]]]]",
"ramdisk_id": "",
"access_ip_v6": "[[[[V6_0]]]]",
"disk_gb": 120,
"access_ip_v4": "[[[[V4_0]]]]",
"kernel_id": "",
"host": "[[[[host]]]]",
"display_name": "[[[[display_name]]]]",
"image_ref_url": "http://[[[[V4_1]]]]:9292/images/[[[[UUID_2]]]]",
"audit_period_beginning": "[[[[DT_0]]]]",
"root_gb": 40,
"tenant_id": "[[[[tenant_id]]]]",
"created_at": "[[[[DT_1]]]]",
"launched_at": "[[[[DT_2]]]]",
"memory_mb": 8192,
"instance_type": "8 GB Performance",
"vcpus": 8,
"image_meta": {
"container_format": "ovf",
"min_ram": "512",
"vm_mode": "hvm",
"base_image_ref": "[[[[UUID_2]]]]",
"os_distro": "fedora",
"org.openstack__1__os_distro": "org.fedoraproject",
"image_type": "base",
"disk_format": "vhd",
"org.openstack__1__architecture": "x64",
"auto_disk_config": "disabled",
"min_disk": "40",
"cache_in_nova": "True",
"os_type": "linux",
"org.openstack__1__os_version": "20"
},
"architecture": "x64",
"new_task_state": "rebooting",
"audit_period_ending": "[[[[DT_3]]]]",
"os_type": "linux",
"instance_flavor_id": "performance1-8"
},
"priority": "INFO",
"_context_is_admin": false,
"_context_user": "[[[[user_id]]]]",
"publisher_id": "[[[[publisher_id]]]]",
"message_id": "[[[[UUID_3]]]]",
"_context_remote_address": "[[[[V4_2]]]]",
"_context_roles": [
"checkmate",
"object-store:default",
"compute:default",
"identity:user-admin"
],
"timestamp": "[[[[DT_4]]]]",
"_context_timestamp": "[[[[DT_5]]]]",
"_unique_id": "[[[[XUUID_1]]]]",
"_context_glance_api_servers": null,
"_context_project_name": "[[[[tenant_id]]]]",
"_context_read_deleted": "no",
"_context_tenant": "[[[[tenant_id]]]]",
"_context_instance_lock_checked": false,
"_context_project_id": "[[[[tenant_id]]]]",
"_context_user_name": "[[[[user_id]]]]"
},
{
"_context_request_id": "req-[[[[UUID_0]]]]",
"_context_quota_class": null,
"event_type": "compute.instance.update",
"_context_auth_token": "[[[[XUUID_0]]]]",
"_context_user_id": "[[[[user_id]]]]",
"payload": {
"state_description": "rebooting",
"availability_zone": null,
"terminated_at": "",
"ephemeral_gb": 80,
"instance_type_id": 12,
"bandwidth": {
"public": {
"bw_in": 1142550,
"bw_out": 4402404
},
"private": {
"bw_in": 29028,
"bw_out": 15580
}
},
"deleted_at": "",
"reservation_id": "[[[[reservation_id]]]]",
"instance_id": "[[[[UUID_1]]]]",
"user_id": "[[[[user_id]]]]",
"hostname": "[[[[hostname]]]]",
"state": "active",
"old_state": "active",
"old_task_state": null,
"metadata": {},
"node": "[[[[node]]]]",
"ramdisk_id": "",
"access_ip_v6": "[[[[V6_0]]]]",
"disk_gb": 120,
"access_ip_v4": "[[[[V4_0]]]]",
"kernel_id": "",
"host": "[[[[host]]]]",
"display_name": "[[[[display_name]]]]",
"image_ref_url": "http://[[[[V4_3]]]]:9292/images/[[[[UUID_2]]]]",
"audit_period_beginning": "[[[[DT_0]]]]",
"root_gb": 40,
"tenant_id": "[[[[tenant_id]]]]",
"created_at": "[[[[DT_1]]]]",
"launched_at": "[[[[DT_2]]]]",
"memory_mb": 8192,
"instance_type": "8 GB Performance",
"vcpus": 8,
"image_meta": {
"container_format": "ovf",
"min_ram": "512",
"vm_mode": "hvm",
"base_image_ref": "[[[[UUID_2]]]]",
"os_distro": "fedora",
"org.openstack__1__os_distro": "org.fedoraproject",
"image_type": "base",
"disk_format": "vhd",
"org.openstack__1__architecture": "x64",
"auto_disk_config": "disabled",
"min_disk": "40",
"cache_in_nova": "True",
"os_type": "linux",
"org.openstack__1__os_version": "20"
},
"architecture": "x64",
"new_task_state": "rebooting",
"audit_period_ending": "[[[[DT_6]]]]",
"os_type": "linux",
"instance_flavor_id": "performance1-8"
},
"priority": "INFO",
"_context_is_admin": false,
"_context_user": "[[[[user_id]]]]",
"publisher_id": "[[[[publisher_id]]]]",
"message_id": "[[[[UUID_4]]]]",
"_context_remote_address": "[[[[V4_2]]]]",
"_context_roles": [
"checkmate",
"object-store:default",
"compute:default",
"identity:user-admin"
],
"timestamp": "[[[[DT_7]]]]",
"_context_timestamp": "[[[[DT_5]]]]",
"_unique_id": "[[[[XUUID_2]]]]",
"_context_glance_api_servers": null,
"_context_project_name": "[[[[tenant_id]]]]",
"_context_read_deleted": "no",
"_context_tenant": "[[[[tenant_id]]]]",
"_context_instance_lock_checked": false,
"_context_project_id": "[[[[tenant_id]]]]",
"_context_user_name": "[[[[user_id]]]]"
},
{
"_context_request_id": "req-[[[[UUID_0]]]]",
"_context_quota_class": null,
"event_type": "compute.instance.reboot.start",
"_context_auth_token": "[[[[XUUID_0]]]]",
"_context_user_id": "[[[[user_id]]]]",
"payload": {
"state_description": "rebooting",
"availability_zone": null,
"terminated_at": "",
"ephemeral_gb": 80,
"instance_type_id": 12,
"deleted_at": "",
"reservation_id": "[[[[reservation_id]]]]",
"instance_id": "[[[[UUID_1]]]]",
"user_id": "[[[[user_id]]]]",
"hostname": "[[[[hostname]]]]",
"state": "active",
"launched_at": "[[[[DT_2]]]]",
"metadata": {},
"node": "[[[[node]]]]",
"ramdisk_id": "",
"access_ip_v6": "[[[[V6_0]]]]",
"disk_gb": 120,
"access_ip_v4": "[[[[V4_0]]]]",
"kernel_id": "",
"host": "[[[[host]]]]",
"display_name": "[[[[display_name]]]]",
"image_ref_url": "http://[[[[V4_4]]]]:9292/images/[[[[UUID_2]]]]",
"root_gb": 40,
"tenant_id": "[[[[tenant_id]]]]",
"created_at": "[[[[DT_1]]]]",
"memory_mb": 8192,
"instance_type": "8 GB Performance",
"vcpus": 8,
"image_meta": {
"container_format": "ovf",
"min_ram": "512",
"vm_mode": "hvm",
"base_image_ref": "[[[[UUID_2]]]]",
"os_distro": "fedora",
"org.openstack__1__os_distro": "org.fedoraproject",
"image_type": "base",
"disk_format": "vhd",
"org.openstack__1__architecture": "x64",
"auto_disk_config": "disabled",
"min_disk": "40",
"cache_in_nova": "True",
"os_type": "linux",
"org.openstack__1__os_version": "20"
},
"architecture": "x64",
"os_type": "linux",
"instance_flavor_id": "performance1-8"
},
"priority": "INFO",
"_context_is_admin": true,
"_context_user": "[[[[user_id]]]]",
"publisher_id": "[[[[publisher_id]]]]",
"message_id": "[[[[UUID_5]]]]",
"_context_remote_address": "[[[[V4_2]]]]",
"_context_roles": [
"checkmate",
"object-store:default",
"compute:default",
"identity:user-admin",
"admin"
],
"timestamp": "[[[[DT_8]]]]",
"_context_timestamp": "[[[[DT_5]]]]",
"_unique_id": "[[[[XUUID_3]]]]",
"_context_glance_api_servers": null,
"_context_project_name": "[[[[tenant_id]]]]",
"_context_read_deleted": "no",
"_context_tenant": "[[[[tenant_id]]]]",
"_context_instance_lock_checked": false,
"_context_project_id": "[[[[tenant_id]]]]",
"_context_user_name": "[[[[user_id]]]]"
},
{
"_context_request_id": "req-[[[[UUID_0]]]]",
"_context_quota_class": null,
"event_type": "compute.instance.update",
"_context_auth_token": "[[[[XUUID_0]]]]",
"_context_user_id": "[[[[user_id]]]]",
"payload": {
"state_description": "rebooting",
"availability_zone": null,
"terminated_at": "",
"ephemeral_gb": 80,
"instance_type_id": 12,
"bandwidth": {
"public": {
"bw_in": 1142550,
"bw_out": 4402404
},
"private": {
"bw_in": 29028,
"bw_out": 15580
}
},
"deleted_at": "",
"reservation_id": "[[[[reservation_id]]]]",
"instance_id": "[[[[UUID_1]]]]",
"user_id": "[[[[user_id]]]]",
"hostname": "[[[[hostname]]]]",
"state": "active",
"old_state": null,
"old_task_state": null,
"metadata": {},
"node": "[[[[node]]]]",
"ramdisk_id": "",
"access_ip_v6": "[[[[V6_0]]]]",
"disk_gb": 120,
"access_ip_v4": "[[[[V4_0]]]]",
"kernel_id": "",
"host": "[[[[host]]]]",
"display_name": "[[[[display_name]]]]",
"image_ref_url": "http://[[[[V4_4]]]]:9292/images/[[[[UUID_2]]]]",
"audit_period_beginning": "[[[[DT_0]]]]",
"root_gb": 40,
"tenant_id": "[[[[tenant_id]]]]",
"created_at": "[[[[DT_1]]]]",
"launched_at": "[[[[DT_2]]]]",
"memory_mb": 8192,
"instance_type": "8 GB Performance",
"vcpus": 8,
"image_meta": {
"container_format": "ovf",
"min_ram": "512",
"vm_mode": "hvm",
"base_image_ref": "[[[[UUID_2]]]]",
"os_distro": "fedora",
"org.openstack__1__os_distro": "org.fedoraproject",
"image_type": "base",
"disk_format": "vhd",
"org.openstack__1__architecture": "x64",
"auto_disk_config": "disabled",
"min_disk": "40",
"cache_in_nova": "True",
"os_type": "linux",
"org.openstack__1__os_version": "20"
},
"architecture": "x64",
"new_task_state": "rebooting",
"audit_period_ending": "[[[[DT_6]]]]",
"os_type": "linux",
"instance_flavor_id": "performance1-8"
},
"priority": "INFO",
"_context_is_admin": false,
"_context_user": "[[[[user_id]]]]",
"publisher_id": "[[[[publisher_id]]]]",
"message_id": "[[[[UUID_6]]]]",
"_context_remote_address": "[[[[V4_2]]]]",
"_context_roles": [
"checkmate",
"object-store:default",
"compute:default",
"identity:user-admin",
"admin"
],
"timestamp": "[[[[DT_9]]]]",
"_context_timestamp": "[[[[DT_5]]]]",
"_unique_id": "[[[[XUUID_4]]]]",
"_context_glance_api_servers": null,
"_context_project_name": "[[[[tenant_id]]]]",
"_context_read_deleted": "no",
"_context_tenant": "[[[[tenant_id]]]]",
"_context_instance_lock_checked": false,
"_context_project_id": "[[[[tenant_id]]]]",
"_context_user_name": "[[[[user_id]]]]"
},
{
"_context_request_id": "req-[[[[UUID_0]]]]",
"_context_quota_class": null,
"event_type": "compute.instance.update",
"_context_auth_token": "[[[[XUUID_0]]]]",
"_context_user_id": "[[[[user_id]]]]",
"payload": {
"state_description": "",
"availability_zone": null,
"terminated_at": "",
"ephemeral_gb": 80,
"instance_type_id": 12,
"bandwidth": {
"public": {
"bw_in": 1142550,
"bw_out": 4402404
},
"private": {
"bw_in": 29028,
"bw_out": 15580
}
},
"deleted_at": "",
"reservation_id": "[[[[reservation_id]]]]",
"instance_id": "[[[[UUID_1]]]]",
"user_id": "[[[[user_id]]]]",
"hostname": "[[[[hostname]]]]",
"state": "active",
"old_state": "active",
"old_task_state": "rebooting",
"metadata": {},
"node": "[[[[node]]]]",
"ramdisk_id": "",
"access_ip_v6": "[[[[V6_0]]]]",
"disk_gb": 120,
"access_ip_v4": "[[[[V4_0]]]]",
"kernel_id": "",
"host": "[[[[host]]]]",
"display_name": "[[[[display_name]]]]",
"image_ref_url": "http://[[[[V4_4]]]]:9292/images/[[[[UUID_2]]]]",
"audit_period_beginning": "[[[[DT_0]]]]",
"root_gb": 40,
"tenant_id": "[[[[tenant_id]]]]",
"created_at": "[[[[DT_1]]]]",
"launched_at": "[[[[DT_2]]]]",
"memory_mb": 8192,
"instance_type": "8 GB Performance",
"vcpus": 8,
"image_meta": {
"container_format": "ovf",
"min_ram": "512",
"vm_mode": "hvm",
"base_image_ref": "[[[[UUID_2]]]]",
"os_distro": "fedora",
"org.openstack__1__os_distro": "org.fedoraproject",
"image_type": "base",
"disk_format": "vhd",
"org.openstack__1__architecture": "x64",
"auto_disk_config": "disabled",
"min_disk": "40",
"cache_in_nova": "True",
"os_type": "linux",
"org.openstack__1__os_version": "20"
},
"architecture": "x64",
"new_task_state": null,
"audit_period_ending": "[[[[DT_10]]]]",
"os_type": "linux",
"instance_flavor_id": "performance1-8"
},
"priority": "INFO",
"_context_is_admin": false,
"_context_user": "[[[[user_id]]]]",
"publisher_id": "[[[[publisher_id]]]]",
"message_id": "[[[[UUID_7]]]]",
"_context_remote_address": "[[[[V4_2]]]]",
"_context_roles": [
"checkmate",
"object-store:default",
"compute:default",
"identity:user-admin",
"admin"
],
"timestamp": "[[[[DT_11]]]]",
"_context_timestamp": "[[[[DT_5]]]]",
"_unique_id": "[[[[XUUID_5]]]]",
"_context_glance_api_servers": null,
"_context_project_name": "[[[[tenant_id]]]]",
"_context_read_deleted": "no",
"_context_tenant": "[[[[tenant_id]]]]",
"_context_instance_lock_checked": false,
"_context_project_id": "[[[[tenant_id]]]]",
"_context_user_name": "[[[[user_id]]]]"
},
{
"_context_request_id": "req-[[[[UUID_0]]]]",
"_context_quota_class": null,
"event_type": "compute.instance.reboot.end",
"_context_auth_token": "[[[[XUUID_0]]]]",
"_context_user_id": "[[[[user_id]]]]",
"payload": {
"state_description": "",
"availability_zone": null,
"terminated_at": "",
"ephemeral_gb": 80,
"instance_type_id": 12,
"deleted_at": "",
"reservation_id": "[[[[reservation_id]]]]",
"instance_id": "[[[[UUID_1]]]]",
"user_id": "[[[[user_id]]]]",
"hostname": "[[[[hostname]]]]",
"state": "active",
"launched_at": "[[[[DT_2]]]]",
"metadata": {},
"node": "[[[[node]]]]",
"ramdisk_id": "",
"access_ip_v6": "[[[[V6_0]]]]",
"disk_gb": 120,
"access_ip_v4": "[[[[V4_0]]]]",
"kernel_id": "",
"host": "[[[[host]]]]",
"display_name": "[[[[display_name]]]]",
"image_ref_url": "http://[[[[V4_4]]]]:9292/images/[[[[UUID_2]]]]",
"root_gb": 40,
"tenant_id": "[[[[tenant_id]]]]",
"created_at": "[[[[DT_1]]]]",
"memory_mb": 8192,
"instance_type": "8 GB Performance",
"vcpus": 8,
"image_meta": {
"container_format": "ovf",
"min_ram": "512",
"vm_mode": "hvm",
"base_image_ref": "[[[[UUID_2]]]]",
"os_distro": "fedora",
"org.openstack__1__os_distro": "org.fedoraproject",
"image_type": "base",
"disk_format": "vhd",
"org.openstack__1__architecture": "x64",
"auto_disk_config": "disabled",
"min_disk": "40",
"cache_in_nova": "True",
"os_type": "linux",
"org.openstack__1__os_version": "20"
},
"architecture": "x64",
"os_type": "linux",
"instance_flavor_id": "performance1-8"
},
"priority": "INFO",
"_context_is_admin": true,
"_context_user": "[[[[user_id]]]]",
"publisher_id": "[[[[publisher_id]]]]",
"message_id": "[[[[UUID_8]]]]",
"_context_remote_address": "[[[[V4_2]]]]",
"_context_roles": [
"checkmate",
"object-store:default",
"compute:default",
"identity:user-admin",
"admin"
],
"timestamp": "[[[[DT_12]]]]",
"_context_timestamp": "[[[[DT_5]]]]",
"_unique_id": "[[[[XUUID_6]]]]",
"_context_glance_api_servers": null,
"_context_project_name": "[[[[tenant_id]]]]",
"_context_read_deleted": "no",
"_context_tenant": "[[[[tenant_id]]]]",
"_context_instance_lock_checked": false,
"_context_project_id": "[[[[tenant_id]]]]",
"_context_user_name": "[[[[user_id]]]]"
}
]

File diff suppressed because it is too large Load Diff

125
demo/files/server/data.txt Normal file
View File

@ -0,0 +1,125 @@
{"units": "ms", "VM Create time": "9570.2584153"}
{"units": "ms", "VM Create time": "446.770851046"}
{"units": "ms", "VM Create time": "5991.62451155"}
{"units": "ms", "VM Create time": "846.389115802"}
{"units": "ms", "VM Create time": "3084.12085218"}
{"units": "ms", "VM Create time": "1196.22683522"}
{"units": "ms", "VM Create time": "1334.13175423"}
{"units": "ms", "VM Create time": "9172.41568685"}
{"units": "ms", "VM Create time": "7996.15042076"}
{"units": "ms", "VM Create time": "6488.59957496"}
{"units": "ms", "VM Create time": "465.603776426"}
{"units": "ms", "VM Create time": "634.792828064"}
{"units": "ms", "VM Create time": "2137.55724679"}
{"units": "ms", "VM Create time": "2254.05914295"}
{"units": "ms", "VM Create time": "7998.16112413"}
{"units": "ms", "VM Create time": "7221.06290044"}
{"units": "ms", "VM Create time": "9076.93147098"}
{"units": "ms", "VM Create time": "7531.36895997"}
{"units": "ms", "VM Create time": "2806.79144593"}
{"units": "ms", "VM Create time": "7127.11748165"}
{"units": "ms", "VM Create time": "1558.39088299"}
{"units": "ms", "VM Create time": "8088.94655858"}
{"units": "ms", "VM Create time": "2881.88489074"}
{"units": "ms", "VM Create time": "5335.79029757"}
{"units": "ms", "VM Create time": "5129.36875123"}
{"units": "ms", "VM Create time": "3965.2004613"}
{"units": "ms", "VM Create time": "6715.42062931"}
{"units": "ms", "VM Create time": "1786.16123109"}
{"units": "ms", "VM Create time": "691.167466556"}
{"units": "ms", "VM Create time": "6707.23425229"}
{"units": "ms", "VM Create time": "6673.11348566"}
{"units": "ms", "VM Create time": "2312.18226096"}
{"units": "ms", "VM Create time": "7011.43478573"}
{"units": "ms", "VM Create time": "1186.25413352"}
{"units": "ms", "VM Create time": "5242.99701072"}
{"units": "ms", "VM Create time": "2994.34714079"}
{"units": "ms", "VM Create time": "4674.54921382"}
{"units": "ms", "VM Create time": "4847.97199783"}
{"units": "ms", "VM Create time": "3944.87138962"}
{"units": "ms", "VM Create time": "3690.30042863"}
{"units": "ms", "VM Create time": "1658.47695197"}
{"units": "ms", "VM Create time": "7429.74317636"}
{"units": "ms", "VM Create time": "5377.1862296"}
{"units": "ms", "VM Create time": "5888.2469715"}
{"units": "ms", "VM Create time": "1834.29633821"}
{"units": "ms", "VM Create time": "2580.14580011"}
{"units": "ms", "VM Create time": "9178.4218462"}
{"units": "ms", "VM Create time": "6342.36399788"}
{"units": "ms", "VM Create time": "9439.4370021"}
{"units": "ms", "VM Create time": "9454.2850887"}
{"units": "ms", "VM Create time": "4213.16152967"}
{"units": "ms", "VM Create time": "8052.45402528"}
{"units": "ms", "VM Create time": "6996.11911189"}
{"units": "ms", "VM Create time": "1539.08936682"}
{"units": "ms", "VM Create time": "2288.26174641"}
{"units": "ms", "VM Create time": "3474.45333147"}
{"units": "ms", "VM Create time": "7965.2900647"}
{"units": "ms", "VM Create time": "5507.09427158"}
{"units": "ms", "VM Create time": "6577.37130373"}
{"units": "ms", "VM Create time": "1063.49389062"}
{"units": "ms", "VM Create time": "7912.37447715"}
{"units": "ms", "VM Create time": "4572.77130949"}
{"units": "ms", "VM Create time": "8468.58886871"}
{"units": "ms", "VM Create time": "6263.13412453"}
{"units": "ms", "VM Create time": "4062.29104093"}
{"units": "ms", "VM Create time": "6122.22376788"}
{"units": "ms", "VM Create time": "8893.74825227"}
{"units": "ms", "VM Create time": "1084.78759899"}
{"units": "ms", "VM Create time": "5966.45439945"}
{"units": "ms", "VM Create time": "2951.03694691"}
{"units": "ms", "VM Create time": "9181.81285027"}
{"units": "ms", "VM Create time": "3075.10492721"}
{"units": "ms", "VM Create time": "7769.44625139"}
{"units": "ms", "VM Create time": "6234.24905493"}
{"units": "ms", "VM Create time": "5604.81166279"}
{"units": "ms", "VM Create time": "758.634256483"}
{"units": "ms", "VM Create time": "1037.91905026"}
{"units": "ms", "VM Create time": "2173.02199252"}
{"units": "ms", "VM Create time": "6298.34091503"}
{"units": "ms", "VM Create time": "571.821588484"}
{"units": "ms", "VM Create time": "5582.14586742"}
{"units": "ms", "VM Create time": "2312.01345747"}
{"units": "ms", "VM Create time": "7888.2290117"}
{"units": "ms", "VM Create time": "7319.17524024"}
{"units": "ms", "VM Create time": "7931.72647678"}
{"units": "ms", "VM Create time": "1311.824863"}
{"units": "ms", "VM Create time": "8645.06837416"}
{"units": "ms", "VM Create time": "1574.12084831"}
{"units": "ms", "VM Create time": "4879.29850065"}
{"units": "ms", "VM Create time": "2519.33964549"}
{"units": "ms", "VM Create time": "2840.99167157"}
{"units": "ms", "VM Create time": "8655.3201027"}
{"units": "ms", "VM Create time": "5258.79519678"}
{"units": "ms", "VM Create time": "2854.24140494"}
{"units": "ms", "VM Create time": "2281.93030935"}
{"units": "ms", "VM Create time": "4143.40529721"}
{"units": "ms", "VM Create time": "4697.61869996"}
{"units": "ms", "VM Create time": "7996.03172193"}
{"units": "ms", "VM Create time": "8128.96168686"}
{"units": "ms", "VM Create time": "1170.41907428"}
{"units": "ms", "VM Create time": "3234.8676953"}
{"units": "ms", "VM Create time": "6654.80764124"}
{"units": "ms", "VM Create time": "5040.62706515"}
{"units": "ms", "VM Create time": "9637.02143233"}
{"units": "ms", "VM Create time": "199.802866542"}
{"units": "ms", "VM Create time": "6729.32393547"}
{"units": "ms", "VM Create time": "3278.56058368"}
{"units": "ms", "VM Create time": "5936.73321557"}
{"units": "ms", "VM Create time": "9237.85519529"}
{"units": "ms", "VM Create time": "9451.60339974"}
{"units": "ms", "VM Create time": "6524.69437235"}
{"units": "ms", "VM Create time": "5196.50451815"}
{"units": "ms", "VM Create time": "8835.67720578"}
{"units": "ms", "VM Create time": "8546.71357438"}
{"units": "ms", "VM Create time": "5593.67992448"}
{"units": "ms", "VM Create time": "7436.64709304"}
{"units": "ms", "VM Create time": "6975.60195013"}
{"units": "ms", "VM Create time": "7580.80759109"}
{"units": "ms", "VM Create time": "6017.48688954"}
{"units": "ms", "VM Create time": "2854.47447994"}
{"units": "ms", "VM Create time": "2844.39668817"}
{"units": "ms", "VM Create time": "4427.58528007"}
{"units": "ms", "VM Create time": "3481.6964079"}
{"units": "ms", "VM Create time": "3711.15872333"}
{"units": "ms", "VM Create time": "8741.91833442"}

View File

@ -0,0 +1,11 @@
<?php
$event = file_get_contents('php://input');
$file = 'data.txt';
$current = file_get_contents($file);
$current .= $event ."\n";
file_put_contents($file, $current);
?>

View File

@ -0,0 +1,70 @@
<html>
<head>
<!-- D3.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
<!-- jQuery -->
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<!-- Plotly.js -->
<script src="https://d14fo0winaifog.cloudfront.net/plotly-basic.js"></script>
<script>
$(document).ready(function(){
setInterval(function(){
$("#events").load('data.txt');
}, 3000);
});
</script>
<style type="text/css">#graph {
-webkit-filter: grayscale(100%);
}</style>
</head>
<body>
<div id="graph"></div>
<div id="events"></div>
<script>
setInterval(function(){
var x_axis = [];
x_axis.push(1);
var y_axis = [];
var data_point = 0;
var txtFile = new XMLHttpRequest();
txtFile.open("GET", "data.txt", true);
txtFile.onreadystatechange = function()
{
if (txtFile.readyState === 4) { // document is ready to parse.
if (txtFile.status === 200) { // file is found
lines = txtFile.responseText.split("\n");
for (i=0; i<lines.length; i++) {
data_point = JSON.parse(lines[i])["VM Create time"];
y_axis.push(data_point);
x_axis.push(i+1)
}
}
}
}
var trace1 = {
x: x_axis,
y: y_axis,
type: "scatter",
};
var layout = {
xaxis: {
title: "Sample Number"
},
yaxis: {
title: "VM Creation Time (ms)"
},
showlegend: false
}
var data = [trace1];
var graphOptions = {layout: layout, fileopt: "overwrite"};
Plotly.plot("graph", data, layout);
txtFile.send(null);
}, 3000);
</script>
</body>
</html>

View File

@ -0,0 +1,18 @@
---
- event_type: compute.instance.*
traits: &instance_traits
tenant_id:
fields: payload.tenant_id
service:
fields: publisher_id
plugin: split
- event_type: compute.instance.exists
traits:
<<: *instance_traits
audit_period_beginning:
type: datetime
fields: payload.audit_period_beginning
audit_period_ending:
type: datetime
fields: payload.audit_period_ending

51
demo/post_webhook.py Normal file
View File

@ -0,0 +1,51 @@
import datetime
import json
import random
import requests
import kafka.client
import kafka.common
import kafka.consumer
address = "http://192.168.10.4:8765/events.php"
kc = kafka.client.KafkaClient("192.168.10.4:9092")
consumer = kafka.consumer.SimpleConsumer(kc,
"Foo",
"stream-notifications",
auto_commit=True)
for raw_event in consumer:
event = json.loads(raw_event.message.value)
times = {}
for e in event['events']:
times[e['event_type']] = e['timestamp']
try:
microseconds_per_second = 1000000
time_format = '%Y-%m-%dT%H:%M:%S.%f'
start = datetime.datetime.strptime(times['compute.instance.create.start'],
time_format)
end = datetime.datetime.strptime(times['compute.instance.create.end'],
time_format)
duration = ((end - start).total_seconds() * microseconds_per_second)
duration = min(100, duration)
duration += random.uniform(5, 10)
except Exception as e:
continue
body = {'VM Create time': '{}'.format(duration),
'units': 'ms'}
headers = {'content-type': 'application/json'}
try:
requests.post(url=address,
data=json.dumps(body),
headers=headers)
except Exception as e:
print("unable to post")

2
demo/webserver.sh Executable file
View File

@ -0,0 +1,2 @@
#/bin/bash
php -S 0.0.0.0:8765 -t files/server

View File

@ -10,6 +10,7 @@ region = useast
# Dispatchers to be loaded to serve restful APIs
[dispatcher]
versions = monasca_events_api.v2.versions:Versions
stream_definitions = monasca_events_api.v2.stream_definitions:StreamDefinitions
events = monasca_events_api.v2.events:Events
transforms = monasca_events_api.v2.transforms:Transforms

View File

@ -166,17 +166,17 @@ def test_transforms():
print("Test GET /transforms")
body = {}
response = requests.get(
url=events_url + "/v2.0/transforms",
data=json.dumps(body),
headers=headers)
assert response.status_code == 200
print("GET /transforms success")
print("Test DELETE /transforms")
body = {}
response = requests.get(
url=events_url + "/v2.0/transforms",
data=json.dumps(body),

View File

@ -22,7 +22,9 @@ import paste.deploy
import simport
dispatcher_opts = [cfg.StrOpt('stream_definitions', default=None,
dispatcher_opts = [cfg.StrOpt('versions', default=None,
help='Versions endpoint'),
cfg.StrOpt('stream_definitions', default=None,
help='Stream definition endpoint'),
cfg.StrOpt('events', default=None,
help='Events endpoint'),
@ -46,6 +48,10 @@ def launch(conf, config_file="/etc/monasca/events_api.conf"):
app = falcon.API()
versions = simport.load(cfg.CONF.dispatcher.versions)()
app.add_route("/", versions)
app.add_route("/{version_id}", versions)
events = simport.load(cfg.CONF.dispatcher.events)()
app.add_route("/v2.0/events", events)
app.add_route("/v2.0/events/{event_id}", events)

View File

@ -0,0 +1,26 @@
# Copyright 2015 Hewlett-Packard
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from oslo_log import log
LOG = log.getLogger(__name__)
class VersionsAPI(object):
def __init__(self):
super(VersionsAPI, self).__init__()
LOG.info('Initializing Versions!')
def on_get(self, req, res, id):
res.status = '501 Not Implemented'

View File

@ -19,17 +19,18 @@ from oslo_utils import timeutils
def transform(events, tenant_id, region):
event_template = {'event': {},
'_tenant_id': tenant_id,
'meta': {'tenantId': tenant_id, 'region': region},
'creation_time': timeutils.utcnow_ts()}
if isinstance(events, list):
transformed_events = []
for event in events:
event['_tenant_id'] = tenant_id
event_template['event'] = event
transformed_events.append(json.dumps(event_template))
return transformed_events
else:
transformed_event = event_template['event']
events['_tenant_id'] = tenant_id
transformed_event['event'] = events
return [json.dumps(transformed_event)]

View File

@ -0,0 +1,63 @@
# Copyright 2015 Hewlett-Packard
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import json
import falcon
from monasca_events_api.api import versions_api
from oslo_log import log
LOG = log.getLogger(__name__)
VERSIONS = {
'v2.0': {
'id': 'v2.0',
'links': [{
'rel': 'self',
'href': ''
}],
'status': 'CURRENT',
'updated': "2014-02-18T00:00:00Z"
}
}
class Versions(versions_api.VersionsAPI):
def __init__(self):
super(Versions, self).__init__()
def on_get(self, req, res, version_id=None):
result = {
'links': [{
'rel': 'self',
'href': req.uri.decode('utf8')
}],
'elements': []
}
if version_id is None:
for version in VERSIONS:
VERSIONS[version]['links'][0]['href'] = (
req.uri.decode('utf8') + version)
result['elements'].append(VERSIONS[version])
res.body = json.dumps(result)
res.status = falcon.HTTP_200
else:
if version_id in VERSIONS:
VERSIONS[version_id]['links'][0]['href'] = (
req.uri.decode('utf8'))
res.body = json.dumps(VERSIONS[version_id])
res.status = falcon.HTTP_200
else:
res.body = 'Invalid Version ID'
res.status = falcon.HTTP_400

View File

@ -20,7 +20,7 @@
# The above command will install monasca-api base and elasticsearch
# implementation while leave other implementation dependencies alone.
falcon>=0.2
falcon==0.2
gunicorn>=19.1.0
keystonemiddleware
oslo.config>=1.2.1
@ -37,6 +37,7 @@ pyparsing>=2.0.3
voluptuous>=0.8.7
MySQL-python>=1.2.3
eventlet
simport
greenlet
simport>=0.0.dev0
kafka-python>=0.9.1,<0.9.3
requests>=1.1