Client Management Suite

 View Only
  • 1.  Custom Inventory cumulative data collection table

    Posted Mar 28, 2011 08:03 PM

    I have created several custom inventories for the 6.x NS environment, and they all work quite well for me... except for one. All of the inventories have been a total update of the table data for that PC and not a cumulative update (keep adding a row). I believe this is possible, but wanted to throw the question out there before I just went with what we have.
    We are trying to diagnose "slow login" times and we created a vbs that gathers information and pumps out the nsi with all the information we are looking for to diagnose sites/PCs. We would enable this inventory on user login. Below is the nsi output of the vb script.


    <InventoryClasses>
    <InventoryClass name='AeX Computer Boot Stats18' manufacturer='Altiris' description='Workstation boottime statistics' version='1.0' platform='Win32' mifClass='Altiris|Computer_Network_Desc|1.0'>
    <xml xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882' xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882' xmlns:rs='urn:schemas-microsoft-com:rowset' xmlns:z='#RowsetSchema'>
    <s:Schema id='RowsetSchema'>
    <s:ElementType name='row' content='eltOnly' rs:updatable='False'>
    <s:AttributeType name='c0' rs:name='ADSite' rs:number='1' rs:nullable='true' mifAttrId='1'>
    <s:datatype dt:type='string' dt:maxLength='255'/>
    </s:AttributeType>
    <s:AttributeType name='c1' rs:name='invDate' rs:number='2' rs:nullable='true' mifAttrId='2'>
    <s:datatype dt:type='dateTime' dt:maxLength='255'/>
    </s:AttributeType>
    <s:AttributeType name='c2' rs:name='UsersEUID' rs:number='3' rs:nullable='true' mifAttrId='3'>
    <s:datatype dt:type='string' dt:maxLength='255'/>
    </s:AttributeType>
    <s:AttributeType name='c3' rs:name='FirstFileModified' rs:number='4' rs:nullable='true' mifAttrId='4'>
    <s:datatype dt:type='dateTime' dt:maxLength='255'/>
    </s:AttributeType>
    <s:AttributeType name='c4' rs:name='WindowsDefaultBackgroundBlue' rs:number='5' rs:nullable='true' mifAttrId='5'>
    <s:datatype dt:type='dateTime' dt:maxLength='255'/>
    </s:AttributeType>
    <s:AttributeType name='c5' rs:name='PreparingNetworkConnections' rs:number='6' rs:nullable='true' mifAttrId='6'>
    <s:datatype dt:type='dateTime' dt:maxLength='255'/>
    </s:AttributeType>
    <s:AttributeType name='c6' rs:name='ApplyingSecuritySettings' rs:number='7' rs:nullable='true' mifAttrId='7'>
    <s:datatype dt:type='dateTime' dt:maxLength='255'/>
    </s:AttributeType>
    <s:AttributeType name='c7' rs:name='ApplyingComputerSettings' rs:number='8' rs:nullable='true' mifAttrId='8'>
    <s:datatype dt:type='dateTime' dt:maxLength='255'/>
    </s:AttributeType>
    <s:AttributeType name='c8' rs:name='CrtlAltDel' rs:number='9' rs:nullable='true' mifAttrId='9'>
    <s:datatype dt:type='dateTime' dt:maxLength='255'/>
    </s:AttributeType>
    <s:AttributeType name='c9' rs:name='UserLogon' rs:number='10' rs:nullable='true' mifAttrId='10'>
    <s:datatype dt:type='dateTime' dt:maxLength='255'/>
    </s:AttributeType>
    <s:AttributeType name='c10' rs:name='UserLastLogon' rs:number='11' rs:nullable='true' mifAttrId='11'>
    <s:datatype dt:type='dateTime' dt:maxLength='255'/>
    </s:AttributeType>
    <s:AttributeType name='c11' rs:name='LogonScriptStart' rs:number='12' rs:nullable='true' mifAttrId='12'>
    <s:datatype dt:type='dateTime' dt:maxLength='255'/>
    </s:AttributeType>
    <s:AttributeType name='c12' rs:name='LogonScriptFinish' rs:number='13' rs:nullable='true' mifAttrId='13'>
    <s:datatype dt:type='dateTime' dt:maxLength='255'/>
    </s:AttributeType>
    <s:AttributeType name='c13' rs:name='DesktopReady' rs:number='14' rs:nullable='true' mifAttrId='14'>
    <s:datatype dt:type='dateTime' dt:maxLength='255'/>
    </s:AttributeType>
    </s:ElementType>
    </s:Schema>
    <rs:data>
    <z:row
    c0="MySiteNameHere"
    c1="2011-03-28T19:44:25"
    c2="MyUserIDHere"
    c3="2011-03-14T09:44:35"
    c4="2011-03-14T09:44:46"
    c5="2011-03-14T09:45:15"
    c6="2011-03-14T09:45:33"
    c7="2011-03-28T13:14:57"
    c8="2011-03-14T09:45:50"
    c9="2011-03-14T09:43:38"
    c10="2011-03-28T19:30:07"
    c11="2011-03-14T09:46:13"
    c12="2011-03-14T09:46:21"
    c13="2011-03-28T17:44:47"
    /> 
    </rs:data> 
    </xml> 
    </InventoryClass> 
    </InventoryClasses> 

     
    Any thoughts on what in the xml/nsi I need to change to make it add another row in the data class?  I thought it would be the <s:ElementType name='row' content='eltOnly' rs:updatable='False'> value, but that's still not doing the trick.
     
    Many thanks!
    -Jon


  • 2.  RE: Custom Inventory cumulative data collection table

    Posted Mar 28, 2011 08:18 PM
    I can't help too much with the XML I'm afraid, but I would just pose the basic question of have you ticked the 'allow multiple rows from a single computer resource' option in Manage Custom Data Classes? Also, I would love to take a look at the VB script you are using to monitor this as we suffer from a similar problem sometimes. Do you reckon you could post it? Cheers!


  • 3.  RE: Custom Inventory cumulative data collection table

    Posted Mar 29, 2011 09:40 AM
      |   view attached

    I don't see anything in data class area in the 6.x to "Allow multiple rows from a single computer resource.  Only in the 7.1 console.  Would that be an option some where else in the 6.x console?

    Script attached is attached. ;-)

    Attachment(s)

    zip
    StartupTimeInvV2.zip   4 KB 1 version


  • 4.  RE: Custom Inventory cumulative data collection table

    Posted Apr 15, 2011 10:06 PM

    That's a very nice script!  It blows the wheels off the janky method we are using by analyzing the System and Application event logs!  I would suggest posting that to the Downloads section; you'll get more Connect points and help other people out.

    Back to your question...if I understand it right, you want to keep a log of all the values for each machine, correct?  Unfortunately you can't do this directly; when you post a new .NSI it overwrites the old one. However,  there are a few ways I can think of to get around this:

    1) Write your date values out to a hierarchy of registry keys (HKLM\Software\MyCompany\BootLog\1, 2, 3, 4 where 1, 2, 3, 4 are keys, with the values set to the various columns you are collecting, written out in ISO-9660 format timestamps as strings.  Then you can custom inventory with a "foreach" loop to pull in all of the values.  You could also dump it to a TXT file or get fancy with an XML file to store the history, then reparse it with another script to build a multi-row NSI.

    2) Enable Data Class history.  I think this is in Resource History section of the console (I don't use this myself so I don't recall the exact path, but it is under Server Settings on the Configuration Tab I think).  You can set a maximum # days or changes I think.  Be careful with this one; your DB can get quite large very quickly if you run the inventory too frequently or don't set appropriate limits.