Caveat: This VESagent These practice applies to multicloud-windriver only right now.
...
Cloud Region Registry (Manually)
By default ESR will trigger this registry process, but in case ESR failed to do so or the previous registration is incomplete for some reasons, users could trigger the registration manually
Code Block | ||||
---|---|---|---|---|
| ||||
$ export MC_EP=http://{{multicloud-windriver IP}}:9005/api/multicloud-titanium_cloud/v0/{{vimid}} e.g. |
...
VESagent provision sample:
...
$ export MC_EP=http://172.30.3.37:9005/api/multicloud-titanium_cloud/v0/CloudOwner_RegionOne
$ curl -v -s -H "Content-Type: application/json" -X POST $MC_EP/registry
|
...
VESagent provision for a Cloud Region
Assuming:
IP to access multiCloud-windriver: 172.30.3.37
VES endpoint: http://172.30.3.55:8081/eventListener/v5 , user/passwd: admin/admin
DMaaP IP: 172.30.3.70
vimid: CloudOwner_RegionOne
VM names: sample_vm_0 and sample_vm_1
Tenant: sampletenant
VESagent provision sample 1: monitor specific VMs under specific tenant
Code Block | ||||
---|---|---|---|---|
| ||||
{"vesagent_config":{"backlogs":[{"source":"sample_vm_0 ","domain":"fault","type":"vm","tenant":"sampletenant"},{"source":"sample_vm_1","domain":"fault","type":"vm","tenant":"sampletenant"}],"poll_interval_default":10,"ves_subscription":{"username":"admin","password":"admin","endpoint":"http://172.30.3.55:8081/eventListener/v5"}}} |
VESagent provision sample 2: monitor all VMs under specific tenant (by not specify any source or server_id for a backlog)
Code Block | ||||
---|---|---|---|---|
| ||||
{"vesagent_config":{"backlogs":[ {"domain":"fault","type":"vm","tenant":"sampletenant"}],"poll_interval_default":10,"ves_subscription":{"username":"admin","password":"admin","endpoint":"http://172.30.3.55:8081/eventListener/v5"}}} |
Provisioning the MultiCloud VESagent
Code Block | ||||
---|---|---|---|---|
| ||||
$ export MC_EP=http://{{multicloud-windriver IP}}:9005/api/multicloud-titanium_cloud/v0/{{vimid}} e.g. $ export MC_EP=http://10172.1230.53.11937:9005/api/multicloud-titanium_cloud/v0/CloudOwner_RegionOne $ curl -v -s -H "Content-Type: application/json" -d sample@sample_vesagent_2vms -X POST $MC_EP/vesagent |
...
Code Block | ||||
---|---|---|---|---|
| ||||
export MC_EP=http://{{multicloud-windriver IP}}:9005/api/multicloud-titanium_cloud/v0/{{vimid}} e.g. export MC_EP=http://10172.1230.53.11937:9005/api/multicloud-titanium_cloud/v0/CloudOwner_RegionOne curl -v -s -H "Content-Type: application/json" -X GET $MC_EP/vesagent |
...
Code Block | ||||
---|---|---|---|---|
| ||||
export MC_EP=http://{{multicloud-windriver IP}}:9005/api/multicloud-titanium_cloud/v0/{{vimid}}
e.g. export MC_EP=http://172.30.3.37:9005/api/multicloud-titanium_cloud/v0/CloudOwner_RegionOne
curl -v -s -H "Content-Type: application/json" -X DELETE $MC_EP/vesagent
|
...
while :; do curl -H “Content-Type:text/plain” -X GET http://10172.030.113.170:3904/events/unauthenticated.SEC_FAULT_OUTPUT/group19/C1?timeout=50000; echo; done;
...
Code Block | ||||
---|---|---|---|---|
| ||||
"{\"event\":{\"commonEventHeader\":{\"startEpochMicrosec\":1526900735217016,\"sourceId\":\"14eac7b8-a7d8-4b53-8547-924cd0a5be4f\",\"eventId\":\"153f3494-1906-421a-8aa9-98ddd399f4c2\",\"reportingEntityId\":\"sampletenantCloudOwner_RegionOne\",\"internalHeaderFields\":{\"collectorTimeStamp\":\"Mon, 05 21 2018 11:05:36 GMT\"},\"eventType\":\"\",\"priority\":\"High\",\"version\":3,\"reportingEntityName\":\"sampletenantCloudOwner_RegionOne\",\"sequence\":0,\"domain\":\"fault\",\"lastEpochMicrosec\":1526900735217045,\"eventName\":\"Fault_MultiCloud_VMFailure\",\"sourceName\":\"sample_vm_0\"},\"faultFields\":{\"eventSeverity\":\"CRITICAL\",\"alarmCondition\":\"Guest_Os_Failure\",\"faultFieldsVersion\":2,\"specificProblem\":\"Fault_MultiCloud_VMFailure\",\"alarmInterfaceA\":\"aaaa\",\"alarmAdditionalInformation\":[{\"name\":\"objectType\",\"value\":\"VIM\"},{\"name\":\"eventTime\",\"value\":\"2018-05-21 11:05:35.217154\"}],\"eventSourceType\":\"virtualMachine\",\"vfStatus\":\"Active\"}}}" |
...
while :; do curl -H “Content-Type:text/plain” -X GET http://10172.030.113.170:3904/events/unauthenticated.SEC_FAULT_OUTPUT/group19/C1?timeout=50000; echo; done;
...
Code Block | ||||
---|---|---|---|---|
| ||||
"{\"event\":{\"commonEventHeader\":{\"startEpochMicrosec\":1526900735217016,\"sourceId\":\"14eac7b8-a7d8-4b53-8547-924cd0a5be4f\",\"eventId\":\"8119c7ff-193e-4e02-b15d-a4fee21f9d2d\",\"reportingEntityId\":\"sampletenantCloudOwner_RegionOne\",\"internalHeaderFields\":{\"collectorTimeStamp\":\"Mon, 05 21 2018 11:09:46 GMT\"},\"eventType\":\"\",\"priority\":\"Normal\",\"version\":3,\"reportingEntityName\":\"sampletenantCloudOwner_RegionOne\",\"sequence\":0,\"domain\":\"fault\",\"lastEpochMicrosec\":1526900985730542,\"eventName\":\"Fault_MultiCloud_VMFailureCleared\",\"sourceName\":\"sample_vm_0\"},\"faultFields\":{\"eventSeverity\":\"NORMAL\",\"alarmCondition\":\"Vm_Restart\",\"faultFieldsVersion\":2,\"specificProblem\":\"Fault_MultiCloud_VMFailureCleared\",\"alarmInterfaceA\":\"aaaa\",\"alarmAdditionalInformation\":[{\"name\":\"objectType\",\"value\":\"VIM\"},{\"name\":\"eventTime\",\"value\":\"2018-05-21 11:09:45.730638\"}],\"eventSourceType\":\"virtualMachine\",\"vfStatus\":\"Active\"}}}" |
...