VMware {code} Community
roland09
Contributor
Contributor

result of queryevents seems to be limited

Hi,

we use the VMWare Perl Toolkit to get the VI events. I assume that the number of events I get back is limited to about 800 events. Is it possible to change this number ?

Thank you !

Roland

0 Kudos
6 Replies
Steve_Jin
Expert
Expert

You can use the EventHistoryCollector returned by the CreateCollectorForEvents method.

No limitation on the number of events you can get.

We have a code sample to retrieve the events. Check it from the Samples link below.

Steve JIN, VMware Engineering

Creator of VMware Infrastructure Java API. VI Java API 2.0 --- 15 times faster than AXIS in loading, 4+ faster in deserialization; only 1/4 of the size required by AXIS. More importantly, the freedom to redistribute your applications. (Download, Samples, DocWiki, RSS Feed)

Get Connected with Other Developers in the Community?

Steve JIN Author of VMware VI and vSphere SDK; Creator of open source VI Java API (http://vijava.sf.net); Blogger at http://www.doublecloud.org
0 Kudos
roland09
Contributor
Contributor

Thank you Steve,

but due to special facts we can´t use the history collector. We have to use the queryevents method...

Roland

0 Kudos
Steve_Jin
Expert
Expert

Hi Roland,

That would be hard, if possible. You can try to put in more conditions into the EventFilterSpecByTime. For example, you want the events in the past week. Instead of grabbing them all in a call, you divide the week into 7 days and make 7 calls. There is no guarantee since the events might concentrate one or two days.

BTW, I am a little curious about your use case that disallows use of collector. Can you share it? a private message is also OK. Thanks!

Steve JIN, VMware Engineering

Creator of VMware Infrastructure Java API. VI Java API 2.0 --- 15 times faster than AXIS in loading, 4+ faster in deserialization; only 1/4 of the size required by AXIS. More importantly, the freedom to redistribute it with your applications. (Download, Samples, DocWiki, RSS Feed)

Get Connected with Other Developers in the Community?

Steve JIN Author of VMware VI and vSphere SDK; Creator of open source VI Java API (http://vijava.sf.net); Blogger at http://www.doublecloud.org
0 Kudos
roland09
Contributor
Contributor

Danke für Ihre Nachricht. Ich bin bis zum 13.4.2009 nicht im Hause. In dringenden Fällen wenden Sie sich bitte telefonisch an unsere Zentrale unter der Rufnummer 0231-94340-0. Diese Nachricht wird nicht weitergeleitet.

0 Kudos
PhilPollard
Enthusiast
Enthusiast

Do you know of any examples or sample code of usage of an event collector in Perl? I'm having trouble with the syntax.

I am available for consulting: http://www.tsslink.com/ My focus is automation and programming with VMware.
0 Kudos
lamw
Community Manager
Community Manager

Here is an example of vSphere SDK for Perl script utlizing the CreateCollectorForEvents -

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos