[Users] Polling vs Pushing engine events

Hi, we got the following problem: we create / start / stop hole vms /data centers / storage etc (basically: everything ovirt can handle via REST-API) But if you want to know e.g. the status of a vm (or anything) you need to constantly poll the API. This is not what we desire to do, as it does not scale very well (e.g. polling 100 vms). Is there a standardized way of pushing information from the engine? -- Mit freundlichen Grüßen / Regards Sven Kieske Systemadministrator Mittwald CM Service GmbH & Co. KG Königsberger Straße 6 32339 Espelkamp T: +49-5772-293-100 F: +49-5772-293-333 https://www.mittwald.de Geschäftsführer: Robert Meyer St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen

On 12/17/2013 03:08 AM, Sven Kieske wrote:
Hi,
we got the following problem:
we create / start / stop hole vms /data centers / storage etc (basically: everything ovirt can handle via REST-API)
But if you want to know e.g. the status of a vm (or anything) you need to constantly poll the API.
This is not what we desire to do, as it does not scale very well (e.g. polling 100 vms).
well, you can search events since last event you searched for, only for the specific type of event you are interested in, then check which vm its for.
Is there a standardized way of pushing information from the engine?
well, the notification service which sends emails on these actually polls for them every minute in order to send the emails. we are discussing snmptraps here[1] one of the options this could be implemented with is via log4j getting all the audit log events, then you could use any log4j appender (db table, jms queue, etc.) [1] Bug 1032661 - Add SNMP trap as notification method to to ovirt-engine-notification

Note that you can usually get all the information you want using 1 API call, which should still scale. For instance, /ovirt-engine/api/vms will give you a list of all VMs and their statuses, so you can just run an XPath and get the status of all of them. On Tue, Dec 17, 2013 at 10:18 AM, Itamar Heim <iheim@redhat.com> wrote:
On 12/17/2013 03:08 AM, Sven Kieske wrote:
Hi,
we got the following problem:
we create / start / stop hole vms /data centers / storage etc (basically: everything ovirt can handle via REST-API)
But if you want to know e.g. the status of a vm (or anything) you need to constantly poll the API.
This is not what we desire to do, as it does not scale very well (e.g. polling 100 vms).
well, you can search events since last event you searched for, only for the specific type of event you are interested in, then check which vm its for.
Is there a standardized way of pushing information from the engine?
well, the notification service which sends emails on these actually polls for them every minute in order to send the emails.
we are discussing snmptraps here[1] one of the options this could be implemented with is via log4j getting all the audit log events, then you could use any log4j appender (db table, jms queue, etc.)
[1] Bug 1032661 - Add SNMP trap as notification method to to ovirt-engine-notification _______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel

You can use the DWH API to check these things. The status is sampled and stored for most entities every 1 minute by default (and can be set to less than that). Yaniv ----- Original Message -----
From: "Sven Kieske" <S.Kieske@mittwald.de> To: users@ovirt.org, engine-devel@ovirt.org Sent: Tuesday, December 17, 2013 10:08:11 AM Subject: [Engine-devel] Polling vs Pushing engine events
Hi,
we got the following problem:
we create / start / stop hole vms /data centers / storage etc (basically: everything ovirt can handle via REST-API)
But if you want to know e.g. the status of a vm (or anything) you need to constantly poll the API.
This is not what we desire to do, as it does not scale very well (e.g. polling 100 vms).
Is there a standardized way of pushing information from the engine?
-- Mit freundlichen Grüßen / Regards
Sven Kieske
Systemadministrator Mittwald CM Service GmbH & Co. KG Königsberger Straße 6 32339 Espelkamp T: +49-5772-293-100 F: +49-5772-293-333 https://www.mittwald.de Geschäftsführer: Robert Meyer St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen _______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel
participants (4)
-
Itamar Heim
-
Liran Zelkha
-
Sven Kieske
-
Yaniv Dary