Get data of tasks/events of vApps

I'm fairly new to vCloud API and using the Java SDK for now. I was wondering what would be the best approach for all vApps information (recording) tasks in an organization. I want to do some kind of oversight to separate from here and its something very simple for now as:

VAPP name/ID creation Date last power on last Power Off

.........                      .........                      ..........                      ..........

Is it possible to do this with each virtual machine inside a vApp? . I noticed he gives ways to get there, but I'm not sure what could be better.

Thanks for the help,

David.

Hello

// Event query

RecordResult eventResult = client
.getQueryService().queryRecords(QueryRecordType.EVENT);
for (QueryResultEventRecordType eventRecord : eventResult.getRecords()) {
System.out.println(eventRecord.getEventType());
}

// Task query
RecordResult adminTaskResult = client
.getQueryService().queryRecords(QueryRecordType.ADMINTASK);
for (QueryResultAdminTaskRecordType adminTaskRecord : adminTaskResult
.getRecords()) {
System.out.println(adminTaskRecord.getName());
}

Kind regards

Rajesh Kamal.

Tags: VMware

Similar Questions

  • during extraction of tasks / events for warehouses of data with powershell

    Hi, I'm looking for the extraction of tasks using powershell events (the same information you will find in using customer vi, inventory home, tabs for data warehouses, tasks, and events) to find the task of 'delete' (for example)

    I would like to use the Get-Vievent command, but I'm unable to use the - entity. Get-datastorename data store

    I think that using the data store object is not possible for the get-vievent command.

    So I use:


    Get-Vievent - MaxSamples 100000 | WHERE-object {$_.} FullFormattedmessage-match 'delete'} | Select Createduserid, username, FullFormattedmessage | Export-csv "c:\export_ds.csv" - noTypeInformation - UseCulture

    It works but it is very slow (my environment is very large)... and I've reached the limit - maxsamples.

    Is there another way? or I have to use - start - stop to limit the number of events, and to several reports by month?

    Thank you very much

    Thierry

    The current version is not it, but it's a good idea.

    I'll update the function.

  • Getting data from the nodes of event data

    Hi all

    I have a while loop with a Structure of the event and a Structure of case inside. The Structure of the event a lot of cases, and each of them is controlled by a different object (buttons, sliders, graphics, etc.). Sometimes, I have to use data from the nodes of event data to power a Business Structure that works like a State Machine in my code. To clean the block diagram, I want to 'export' data nodes using a single wire event data, but this is not possible because there is a conflict of data, since I get data of CtlRef in one case and Coords in others (for example).

    To resolve this problem, I'm feeding a beam to create a cluster and feed it to the box Structure data. However, the process is so painful, because I have to feed the Bundle function with constants of all sorts of data connected to him.

    Find attached an example. It is not the actual code but shows what I have to do.

    Thank you

    Dan07

    Why you do not pass a Variant to the structure of the case. In your case case simply make a variant of the appropriate data that you want to pass. I guess the case appropriate business structure will be to get called for the event. Given that you need to know the data type this case awaits can use the variant data VI and now you have the data you want.

  • Get previous vCenter tasks

    So I'm just having a problem of finding where the previous tasks are stored

    Get-task made that tasks in the part of the latter, and get-vievent does not seem to cover the part of the events of the tasks/events tab in vCenter.

    I can not find where this large list of recent tasks...

    Any help would be aprpeciated.

    Thank you!

    They are in the events, and they are of the TaskEventtype.

    You can extract them as follows

    Get-VIEvent -Start (Get-Date).AddDays(-7) -MaxSamples ([int]::MaxValue) |
    where {$_.GetType().Name -eq "TaskEvent"}
    

    Anything in particular you're looking for?

  • Display today date + 10 days or show the date of the event if this is earlier.

    I have created an agreement form PDF.

    I would like to have the deposit due 10 days from "Date of the day" or the "EventDate", whichever comes first.

    currently it shows the date of the day + 10 days but sometimes the event date is earlier than that.

    Thank you all in advance!

    This script can be used for the filing date:

    document level scripts;
    function GetField (oDoc, cName)
    {
    get the object field with error checking.
    oField = oDoc.getField (cName);
    if(oField == null)
    {
    App.Alert ("Error to the field named" + cName + "\nPlease check the spelling of the domain name and capitalization.', 1, 0");
    }
    return oField;
    } / / end GetField function;

    Scand (cFormat, cDate) function
    {
    convert date stirng date with error checking object;
    Kai var = util.scand (cFormat, cDate);
    if(oDate == null)
    {
    App.Alert ("Date of conversion Error" + cDate, "using the format" + cFormat + "\nPlease verify that the date is valid", 1, 0);
    }
    Return to oDate;
    } / / end Scand function;

    function Date2Num (oDate)
    {
    convert the date object to the number of days since the EPO / / date of ch;
    set the time at midnight of the date;
    oDate.setHours (0, 0, 0, 0);
    convert milliseconds to days;
    Math.ceil (oDate.getTime (return) / (1000 * 60 * 60 * 24));
    } / / end of function Date2Num;

    function Num2Date (nDays)
    {
    Convert number of days date object.
    Back to oDate = new Date (nDays * 1000 * 60 * 60 * 24);
    } / / end Num2Date funciton.

    SetDate() function
    {
    If (GetField(this,_"Today").valuesAsString == null |) GetField(this,_"Today").valuesAsString == "")
    {
    var oToday = new Date(); get the date system;
    oToday.setHours (0, 0, 0, 0); Set to midnight;
    GetField(this,_"Today").value = util.printd ("dd-mmm-yyyy", oToday);
    }
    return;
    }
    Set the field to today's date.
    SetDate();
    end document level scripts;

    Event.Value = ""; Turn off the field;
    get the field objects and field values;
    var cToday = GetField(this,_"Today").valueAsString;
    var cEvent = GetField(this,_"Event").valueAsString;
    var cDateFormat = "dd-mmm-yyyy";
    If (cToday! = "" & cEvent!) = "")
    {
    objects convertdate to days;
    var oTodayDays = Scand (cDateFormat, cToday)
    var nTodayDays = Date2Num (oTodayDays);
    var oEventDays = Scand (cDateFormat, cEvent);
    var nEventDays = Date2Num (oEventDays);
    Make sure that the date of the event is not before the date of the day;
    If (nEventDays<>
    {
    App.Alert ("event date cannot be before the date. today', 1, 0);
    }
    on the other
    {
    Assume that filing date is the date of today + 10 days
    var nDepositDays = nTodayDays + 10
    If (nEventDays<>
    {
    nDepositDays = nEventDays;
    }
    fixed date of filing;
    Event.Value = util.printd ("dd-mmm-yyyy", Num2Date (nDepositDays));
    }
    }

  • Find the beginning and end of a month using get-date

    I am currently using get-date to run reports on past events by subtracting the number of days from the current date.  I would like to make the report so that it automatically determines which was the previous month and captures all events for this date range.

    For example, if it's on 6 February, the report capture data from January 1 to January 31.  If it's on March 23, the report capture events from February 1 to February 28.

    Is this possible?  Here's my current status:

    Get-VIEvent-beginning (Get-Date). AddDays(-35)-done (Get-Date). AddDays(-5)

    Thank you

    Try something like this

    $now = get-Date-time-Minute 0 - 0 - 0 second

    $daysBack = - $now. Day + 1

    $Start = $now. AddMonths(-1). AddDays ($daysBack)

    $DaysInMonth = [DateTime]: DaysInMonth($Start.Year,$Start.Month)

    $Finish = $Start.AddDays ($DaysInMonth)

  • Get-Date comparisons

    This question is not specifically related to PowerCLI, but I am migrating virtual machines VMFS NFS storage of data, but only in a time window of some.  There is probably a better way to do it, but I'm not the greatest at that.  Please enlighten me if there is.  No doubt I'm missing something obvious.

    My script works with the exception of the time window that we use is from 22:00 to 06:00, and logic - gt and lt - seems to break through midnight.  I have this will probably launch with a scheduled Windows task.

    $vmlist = Get-Cluster $prodCluster | Get-VM | Select Name,ProvisionedSpaceGB,UsedSpaceGB | Where-Object {$_.UsedSpaceGB -gt "75" -and $_.UsedSpaceGB -lt "250" } | Sort -Descending -Property UsedSpaceGB
    foreach ($migvm in $vmlist){
    IF (((Get-Date) -gt (Get-Date -Hour 22 -Minute 00)) -and ((Get-Date) -lt (Get-Date -Hour 06 -Minute 00)))
    { Move-VM -VM $migvm.name -DiskStorageFormat Thin -Datastore $destDatastore -Destination $prodCluster -WhatIf:$true
    }ELSE{
    Write-Host "Outside of operating hours, ignoring migration"
    }}
    
    

    Hello, BradCalvert-

    Of course, there are several ways to do it, but your path should do as well.  The only thing that is 'break' after midnight: the logical operator you use on line 03, '- and '.  In order to have this statement are evaluated to $true when the time is after 10 p.m. or before 6 in the morning, which should be a, '- or ' instead.

    Another similar method would be simply to pass the date each time that once the foreach statement (once by the virtual machine in the list of migration) and its property hours (or TotalHours) compares the desired values (22: 6).  A minor difference, but it is less than 75% of the calls to Get-Date.  And not that Get-Date is particularly expensive, but effective is good.

    In any case, it is better for you when you use the '- or ' operator instead of '- and '?

  • Tasks/events for ESX or VM: PowerCLI script

    Hi all

    Please can someone suggest a script that copies all the entries in the task/event of a virtual machine or ESX to html or excel sheet and post it. It must be a particular server not all vCenter servers.

    Thank you

    Try this

    $fileName = $env:Temp + '\report.csv' $entity = Get-VM -Name MyVM Get-VIEvent -Entity $entity -MaxSamples 1000 |
    Select CreatedTime,UserName,FullFormattedMessage | Export-Csv -Path $fileName -NoTypeInformation -UseCulture
    Send-MailMessage -From "[email protected]" -To "[email protected]" `    -Subject "Events" -Attachments $fileName -SmtpServer "mail.lucd.info"
    
  • How can I get data from each associated XMLnode in movieclips separated when you click a line in the combobox

    How can I get data from each associated XMLnode in movieclips separated when you click a line in the combobox?

    A sample of XML is like this:

    <>planter

    < Lauvtre >

    < Botanisk_navn > Acer campestre < / Botanisk_navn >

    < Norsk_navn > Naverlonn < / Norsk_navn >

    Gronn < Farge > < / fan >

    H4 < Herdighet > < / Herdighet >

    < Hoyde > 10-15 m < / Hoyde >

    < / Lauvtre >

    I have a combobox where it shows the botanical name and the Norwegian name. But the rest of the info in movieclips seem separate.

    Someone has an idea how to do this? Can I use the trace function maybe? Here is my AS3 code so far:

    var loader: URLLoader = new URLLoader();

    loader.addEventListener (Event.COMPLETE, onLoaded);

    list.addEventListener (Event.CHANGE, itemChange);

    function itemChange(e:Event):void

    {

    your. Text = list.selectedItem.data;

    TB. Text = list.selectedItem.label;

    }

    var xml;

    function onLoaded(e:Event):void

    {

    XML = new XML (e.target.data);

    var it: XMLList = xml. Planter.Lauvtre;

    for (var i: uint = 0; i < il.length (); i ++)

    {

    list.addItem ({data: it.}) Farge.Text ([i]) + "\n"+ it.» Herdighet.Text ([i]) + "\n" + it. Hoyde.text ([i]),

    label: it. Botanisk_navn. Text() [i] + "\n"+ it.» Norsk_navn. Text() [i]});

    }

    }

    Loader.Load (new URLRequest ("lauvtre.xml"));

    Thank you!

    Rheus.

    I don't know what you're trying to do.  but, if you want to fill one combobox with the botanical names and when one is chosen, the other use of logins:

    var loader: URLLoader = new URLLoader();

    loader.addEventListener (Event.COMPLETE, onLoaded);

    list.addEventListener (Event.CHANGE, itemChange);

    function itemChange(e:Event):void {}

    var selectedObj:Object = a [list.selectedIndex]

    trace (selectedObj ['fan'], selectedObj ['Botanisk'], etc);

    }

    var xml;

    var a: Array = [];

    function onLoaded(e:Event):void {}

    XML = new XML (e.target.data);

    var it: XMLList = xml. Lauvtre;

    for (var i: uint = 0; i

    list.addItem({label:il[i].child('Botanisk_navn').toString()});)

    a [i] = {'Fan': it [i].child('Farge').toString (), 'Herdighet': it [i].child('Herdighet').toString (), "Hoyde": he [i].child('Hoyde').toString (), 'Botanisk':il[i].child('Botanisk_navn').toString(),'Norsk_navn':il[i].child('Norsk_navn').toString()};}

    }

    }

    Loader.Load (new URLRequest ("test.xml"));

  • [Problem] Get data (MySQL + PHP Zend AMF) Data/Services

    Hello

    IM using Zend AMF PHP in Flash Builder 4 to access a MySQL database.

    I have a few methods in php automatically generated by Zend AMF.

    My methods is to manipulate a chart of accounts.

    A method to get all the accounts etc...

    I put the getAllAccounts method data in a datagrid.

    But Im making a login system and I have a method with a parameter: getAccountByName ($name)

    I need to know, how I can put this method in the AC code example...

    I need to know if already, there is an account with 'X' name and for that, I need to run getAccountByName.

    Someone help me?


    Thank you

    Renan.

    I don't know if you use the built-in tools of FB4 to hang your services or write your ActionScript by hand, but one approach is to use a RemoteObject and a CallResponder.  (If you use the built-in tools, you can probably tap into the existing remote object that was generated by FB and simply create a new CallResponder).

    If you are coding by hand, it would be something like:

    var tempRemoteObject:RemoteObject = new RemoteObject;

    tempRemoteObject.source ("THE NAME OF YOUR PHP SERVICE');

    I guess you already have your xml services configuration file up

    var tempCallResponder:CallResponder = new CallResponder();

    tempCallResponder.addEventListener (ResultEvent.Result, allAccountsLoaded);

    then call your php through your remote object method and assign it to your answering machine call

    tempCallResponder.token = tempRemoteObject. getAccountByName("X");

    private void allAccountsLoaded(event:ResultEvent):void {}

    here your data returned through "event.result";

    }

    Thus, for example, if you had a user login text entry components named 'userLoginTxt' and 'passwordTxt' with a 'login' button it would be something like:

    private function login (): void {}

    tempCallResponder.token = tempRemoteObject. getAccountByName (userLoginTxt.text, passwordTxt.text);

    }

    who calls your method of php and send your two settings (userLogin and password), which of course runs the query on the database and returns a result.

    There is probably an easier way to do using the tools integrated to FB, but I usually manually code a bunch of stuff.  in any case, it's a way to call/send data to your service.

  • How to fix or get data off Mac Pro with display/restart issues

    Hi, my early 2008 Mac Pro running El Capitan suddenly started to show lines all over the screen, then it restarted, displaying an error message and since then he's been stuck in a reboot loop never get past the progress bar and with very distorted display. Two questions:

    (1) any solution to this? It is an old machine, worked great so I would like to continue using it if possible, but do not want to put money in it at this stage.

    (2) what is the best way to get data out of the two internal drives to the machine on my Mac Air? I need to access the files on it, also like his 2 x 1 TB hard drives I will not be able to transfer the data on Air, but you will need to use them as external drives.

    Help appreciated!

    Get a dock like this

    http://www.felinediabetes.com/FDMB/forums/feline-health-the-main-forum.28/

    and take the readers on the Mac Pro and put them in the dock and connect to new mac via USB

    You can also get an enclosure that accept disks 3 1/2 in.

    In addition, you can get a bolt of lightning > FireWire adopter and connect the two Macs via FireWire and start the old mac in target disk mode

    How to use and troubleshoot disk mode target FireWire - Apple Support

    The error message say? Problem could be the graphics card bad or maybe bad memory.

    If you open the side cover are all diagnostic lights on?

  • How to get data from excel

    Hello world

    How can I get data from excel inside my program? I'm using labview 8.2. I have tried to find the solution for this but seems that the solutions are not suitable. Can someone help me? Thank you.

    Hi jieah,

    Inside of the attachment nijams don't you see this?

    read_excel_values. LLB

  • Office toolkit 'excel get data' cannot read anything else of integers?

    I use LabVIEW 2009 and can not get LabVIEW to read non-entiers to a worksheet.  In the attached example, I put a breaktpoint after the new report vi, and and when it hits at this breakpoint I put a number as 1,234 in cell A1, and then continue execution.  But the 'data' outputs always return an integer value.  Even tried to change the format of the output of the data field.  I also tried to replace this with vi (LDM) Excel Get Data in the folder of the Toolbox, but got the same result.

    When I tried the same thing in LabVIEW 8.0 it worked.  No idea what I am doing wrong?  :-)

    Thank you

    -Bill

    Your meter is complete after you have changed the type of indicatpr, then you can get good results.

  • Apparent problem with OpenG Get Data Name_ogtk.vi

    The data Name_ogtk.vi Get OpenG is a function that takes a data Structure and returns the name of this structure if the Data Structure has a name.

    I use it in my Configure.vi. Configure.VI takes several data structures and saves / loads to an INI file. The name of the section in the INI file is the same as the name of the Data Structure. When loading, Configure.vi takes the name of the data structure to load and locate the Section in the INI file with the same name and then uses the items listed in the INI section to load the Data Structure with the data values.

    In my case, I have 3 sections. Two of the sections, 1 Servo and Servo 2 derive from the same Type definition. I am trying to load 3 of the attached INI file data Structure. The Config.ini in the system file has been generated by the backup function Configure.vi. I'm passing in the routine of the load, 3 Data Structures, each with unique names. I have an explicit call to get the data for Servo 1 Name.vi and 2 Servo. But the probes on the output of the Name.vi of data values get two return to the same 'Servo 1' same string if sensors on the Structure of data entries that clearly indicate them the unique names of the "Servo 1" and "Servo 2" respectively.

    It seems that the 2nd Get data name returns the name of the Data Structure 1 by mistake. If anyone can check this?

    Does anyone know how to fix Get Data Name.vi so that it returns the appropriate data Structure names?

    Thank you.

    I was able to reproduce it and I show here as an oddity to force entry to the variant on the primitive flat string Variant.

    Basically, if you have more than one cluster with content command to match the type and order wired directly to this function, it returns the flattened string which is first to each call.  The wires must be wired without before converting to alternative, if you have points of constraint.

    This only happens if you feed directly the input varying both and get the stress points.  If you are using a variant is not the case.

    I found that this occurs if the cluster is of type defined, and it does not occur for constants.  I didn't try other controls.  I'll be honest, I'm usually used to constrain to the Variant.  I'll be more careful in the future!

    ----

    so convert to first variant will solve your problem.  In addition, if you leave the entry of the section name of the variant config openG write screw unwired, he will take the name as it is the research of the control, you did, so you need not the name of data Get there at all.

    An excerpt from 2009.  as - is equal to true.  The bunches are each a dbl and a bool, but each FP different controls.

  • Y510 unable to get data from the camera.

    Hello

    I have a Y510 with Windows Vista 32 bit, 3 GB RAM, only 5 weeks. I get this message when I try to use Veriface, "unable to get data from the camera. The camera may have been disconnected or busy. I reinstalled Vista of the State in which the laptop came, but it does not work. I also updated the bios and install other updates were available. I would appreciate any advice.

    Thank you

    Peter

    I wish it was as easy as press Fn + Esc, I looked through an another Y510 our office and managed to find a process that must be set to Auto, the process is KtmRm. This process cannot be disabled, handicapped, or on a time delay, it must be AUTOMATIC.

Maybe you are looking for