Ask Your Question
0

Detection of VM add ,delete and live migration

asked 2018-03-13 21:24:04 -0600

anonymous user

Anonymous

updated 2018-03-14 08:44:44 -0600

zaneb gravatar image

I have questions regarding detection of Virtual Machine add ,delete and Live migration in Openstack.

In our OpenStack deployment user keep adding and deleting virtual machines(VM) . We need to detect if user has added or deleted VMs or any live migration of VMs has happened or live migration has failed .

So I was exploring messages published in Rabbit Message Queue(RMQ) for this purpose and I could see that it is possible to detect the above mentioned situation based on the various messages published in RMQ. But the trouble I am facing that the RMQ will not be accessible to outside world as it will be running on private IP address space .

So my questions is there any REST Apis available to detect the VMs add, delete and live migration event and failure ? Also I was exploring alarms plugin available for OpenStack (https://docs.openstack.org/aodh/pike/admin/telemetry-alarms.html (https://docs.openstack.org/aodh/pike/...)) . But I could not find any help there as well for my need.

Could you please provide me some pointer on how we can detect those above scenarios at the moment those (add, delete , live migration ) happen in OpenStack environment ?

edit retag flag offensive close merge delete

Comments

Ceilometer events might be the answer. Instance creation and deletion are events; I don't know about live migration, though. Event definitions are in /etc/ceilometer/event_definitions.yaml. Documentation at https://docs.openstack.org/ceilometer....

Bernd Bausch gravatar imageBernd Bausch ( 2018-03-14 00:52:01 -0600 )edit

There is an API for listing live-migrations: https://developer.openstack.org/api-r..., but I believe it only covers migrations that are ongoing.

Bernd Bausch gravatar imageBernd Bausch ( 2018-03-14 00:56:12 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2018-03-14 08:43:54 -0600

zaneb gravatar image

You can create an event alarm in Aodh that will trigger off any oslo.messaging notification that you choose. (Note that this requires a configuration change.)

Here is an example of how to create these sorts of alarms in a Heat template.

edit flag offensive delete link more

Comments

Thanks all for your responses. Could you please let me know how we can access those alarm from outside of OpenStack ? Is there way to subscribe to those events like Rabbit Message Queue? Or I need to use REST query to get the alarm details? Can you provide some pointer to this?

somenathpal gravatar imagesomenathpal ( 2018-03-14 10:11:46 -0600 )edit

@somenathpal Aodh handles alarms by hitting one or more webhooks. If you want to subscribe to a queue of events rather than provide a webhook endpoint, you can direct the alarm to a Zaqar queue. In fact, the Heat template I linked actually does that.

zaneb gravatar imagezaneb ( 2018-04-13 10:10:30 -0600 )edit

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

1 follower

Stats

Asked: 2018-03-13 21:24:04 -0600

Seen: 130 times

Last updated: Mar 14 '18