[Users] get VM events via API?

Hi, is it possible to get the vm events via any API/CLI? I'm talking about the "events" tab which you can select in webadmin when you selected a vm. If this is possible, how can we get the data? We could even write a vdsm hook, if necessary, but would of course prefer REST-API. Thanks. -- 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

I did a quick test with ovirt-shell: # Query vm id: [oVirt shell (connected)]# list vms --query "name=testvm" id : 8b2ad3a2-9704-47e6-99f1-f196856d7bd5 name : plsweb02 [oVirt shell (connected)]# # List events: list events --kwargs "vm-id=a82874bb-152d-4efd-952b-3f3304af7bb3" Unfortunately this uses client side filtering. REST-API / python sdk should work similarly, AFAIK ovirt-shell uses the REST-API too On Fri, Jan 17, 2014 at 1:13 PM, Sven Kieske <S.Kieske@mittwald.de> wrote:
Hi,
is it possible to get the vm events via any API/CLI?
I'm talking about the "events" tab which you can select in webadmin when you selected a vm.
If this is possible, how can we get the data? We could even write a vdsm hook, if necessary, but would of course prefer REST-API.
Thanks. -- 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 _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

Hi, this seems to work, but as far as I see I just get the events from the last start of the vm until now? Can the time range or the number of reported events be influenced in some way? Additionally I didn't find this function in REST-API yet. Maybe I'm looking in the wrong direction.. Am 17.01.2014 14:18, schrieb Sander Grendelman:
I did a quick test with ovirt-shell:
# Query vm id: [oVirt shell (connected)]# list vms --query "name=testvm"
id : 8b2ad3a2-9704-47e6-99f1-f196856d7bd5 name : plsweb02
[oVirt shell (connected)]#
# List events:
list events --kwargs "vm-id=a82874bb-152d-4efd-952b-3f3304af7bb3"
Unfortunately this uses client side filtering.
REST-API / python sdk should work similarly, AFAIK ovirt-shell uses the REST-API too
On Fri, Jan 17, 2014 at 1:13 PM, Sven Kieske <S.Kieske@mittwald.de> wrote:
Hi,
is it possible to get the vm events via any API/CLI?
I'm talking about the "events" tab which you can select in webadmin when you selected a vm.
If this is possible, how can we get the data? We could even write a vdsm hook, if necessary, but would of course prefer REST-API.
Thanks. -- 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 _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
-- 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 01/17/2014 04:30 PM, Sven Kieske wrote:
Hi,
this seems to work, but as far as I see I just get the events from the last start of the vm until now?
Can the time range or the number of reported events be influenced in some way?
Additionally I didn't find this function in REST-API yet. Maybe I'm looking in the wrong direction..
this doesn't work for you? https://engine-name/api/events?search=Vms.id=e6e5f31d-2aac-4170-b617-c9e0f5e...
Am 17.01.2014 14:18, schrieb Sander Grendelman:
I did a quick test with ovirt-shell:
# Query vm id: [oVirt shell (connected)]# list vms --query "name=testvm"
id : 8b2ad3a2-9704-47e6-99f1-f196856d7bd5 name : plsweb02
[oVirt shell (connected)]#
# List events:
list events --kwargs "vm-id=a82874bb-152d-4efd-952b-3f3304af7bb3"
Unfortunately this uses client side filtering.
REST-API / python sdk should work similarly, AFAIK ovirt-shell uses the REST-API too
On Fri, Jan 17, 2014 at 1:13 PM, Sven Kieske <S.Kieske@mittwald.de> wrote:
Hi,
is it possible to get the vm events via any API/CLI?
I'm talking about the "events" tab which you can select in webadmin when you selected a vm.
If this is possible, how can we get the data? We could even write a vdsm hook, if necessary, but would of course prefer REST-API.
Thanks. -- 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 _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

Hi Itamar, I think this is some part of what I was looking for. But in webadmin I can see also some other data, like the currently logged in user via ovirt-guest-agent. Is this stuff also exposed via API? That would be cool. Am 17.01.2014 21:14, schrieb Itamar Heim:
On 01/17/2014 04:30 PM, Sven Kieske wrote:
Hi,
this seems to work, but as far as I see I just get the events from the last start of the vm until now?
Can the time range or the number of reported events be influenced in some way?
Additionally I didn't find this function in REST-API yet. Maybe I'm looking in the wrong direction..
this doesn't work for you? https://engine-name/api/events?search=Vms.id=e6e5f31d-2aac-4170-b617-c9e0f5e...
-- 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 01/20/2014 11:08 AM, Sven Kieske wrote:
Hi Itamar,
I think this is some part of what I was looking for. But in webadmin I can see also some other data, like the currently logged in user via ovirt-guest-agent. Is this stuff also exposed via API?
it should, but do you see that under events or the vm info?
That would be cool.
Am 17.01.2014 21:14, schrieb Itamar Heim:
On 01/17/2014 04:30 PM, Sven Kieske wrote:
Hi,
this seems to work, but as far as I see I just get the events from the last start of the vm until now?
Can the time range or the number of reported events be influenced in some way?
Additionally I didn't find this function in REST-API yet. Maybe I'm looking in the wrong direction..
this doesn't work for you? https://engine-name/api/events?search=Vms.id=e6e5f31d-2aac-4170-b617-c9e0f5e...

No, in webadmin this can be accessed by clicking on a vm and select the sub tab "Sessions". Is this exposed via API? Use case would be to see if the user logs in, so I can see and verify the vm setup did go well. Am 20.01.2014 10:48, schrieb Itamar Heim:
it should, but do you see that under events or the vm info?
-- 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 01/20/2014 04:08 PM, Sven Kieske wrote:
No,
in webadmin this can be accessed by clicking on a vm and select the sub tab "Sessions".
Is this exposed via API?
Use case would be to see if the user logs in, so I can see and verify the vm setup did go well.
i couldn't see it as well with my 3.3, please open a bug.
Am 20.01.2014 10:48, schrieb Itamar Heim:
it should, but do you see that under events or the vm info?

On Jan 20, 2014, at 15:12 , Itamar Heim <iheim@redhat.com> wrote:
On 01/20/2014 04:08 PM, Sven Kieske wrote:
No,
in webadmin this can be accessed by clicking on a vm and select the sub tab "Sessions".
Is this exposed via API?
Use case would be to see if the user logs in, so I can see and verify the vm setup did go well.
i couldn't see it as well with my 3.3, please open a bug.
yeah, I guess it should go under VM's guest_info (there's guest's IP and FQDN right now) Thanks, michal
Am 20.01.2014 10:48, schrieb Itamar Heim:
it should, but do you see that under events or the vm info?
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

I've done that: https://bugzilla.redhat.com/show_bug.cgi?id=1055556 Am 20.01.2014 15:12, schrieb Itamar Heim:
i couldn't see it as well with my 3.3, please open a bug.
-- 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
participants (4)
-
Itamar Heim
-
Michal Skrivanek
-
Sander Grendelman
-
Sven Kieske