DX Unified Infrastructure Management

Expand all | Collapse all

Create attribute that not available on USM

Miller Echagarreta

Miller EchagarretaSep 20, 2018 09:52 AM

  • 1.  Create attribute that not available on USM

    Posted Sep 06, 2018 04:20 PM

    Hi all.

     

    I need create a dynamic group in USM. But the attribute that I need don't exist to select it.

    In this group I need add device that has attribute like "Resource Pool" because this attribute is the ideal to the filter.

     

    Device --->

     

     

    Is possible create a new attribute "Resource Pool" ?

     

    M.E



  • 2.  Re: Create attribute that not available on USM

    Broadcom Employee
    Posted Sep 06, 2018 04:32 PM

    M.E. -

     

    Adding "Resource Pool" as a new attribute would require an Enhancement Request.

     

    In the meantime, if you can craft a SQL query against the UIM database that returns a unique set of cs_id values for devices with a "Resource Pool" associated with them, you should be able to use the SQL option in the dynamic filter to return a list of devices that meet your match criteria.

     

    Hope this helps.



  • 3.  Re: Create attribute that not available on USM

    Posted Sep 06, 2018 04:54 PM

    I don't know if this help me. I think not because vmware add VM automatic and the idea is add VM with this filter "Resource Pool". This filter has the name customer and is easy recognize



  • 4.  Re: Create attribute that not available on USM

    Posted Sep 07, 2018 01:41 PM

    The customer name can be added into the robot's controller configure under Setup > Misc. > User tag, and user tag is an option for creating a group.



  • 5.  Re: Create attribute that not available on USM

    Posted Sep 17, 2018 06:01 PM

    Hi how are you? I have a question. What is the table that contain cs_id?



  • 6.  Re: Create attribute that not available on USM

    Broadcom Employee
    Posted Sep 18, 2018 04:16 AM

    Cs_id can be found in CM_COMPUTER_SYSTEM table.



  • 7.  Re: Create attribute that not available on USM

    Posted Sep 18, 2018 10:21 AM

    Hi Yu

    I executed this query (select * from CM_COMPUTER_SYSTEM where ip = '10.20.0.34'), but I don't see this field "Resource_Pool" plese see the screenshot attached.

    With cd_id I need make other search?

     



  • 8.  Re: Create attribute that not available on USM

    Broadcom Employee
    Posted Sep 19, 2018 02:16 AM

    Please try.

    SELECT * FROM CM_COMPUTER_SYSTEM_ATTR where cs_attr_key like '%Pool%'



  • 9.  Re: Create attribute that not available on USM

    Posted Sep 19, 2018 10:02 AM

    Hi Yu, my friend this query not return nothing, maybe the data are on other table ?

     



  • 10.  Re: Create attribute that not available on USM

    Broadcom Employee
    Posted Sep 19, 2018 06:01 PM

    M.E -

     

    You can try enabling USM debug by following the instructions in the following Knowledge Document:

     

    KB000033962 : How can I enable DEBUG mode for UMP, USM, ListViewer or Performance Report displays?  

     

    Enable the global database debug (as identified in this document).

     

    Once you have enable the global database debug, open the device details for one of your devices where you see the Resource Pool attribute displayed for the device.  You can then check the portal.log file on the UMP robot to see if you can determine the SQL query used by the USM portlet to retrieve this information.  This will let you know the table(s) involved in the query to get this information for the one device.  You can then use this as a starting point to craft the SQL query you would need to create a group based on the Resource Pool device attribute.



  • 11.  Re: Create attribute that not available on USM

    Posted Sep 20, 2018 09:52 AM

    Hi Kathryn I will try this. Thanks.



  • 12.  Re: Create attribute that not available on USM

    Posted Sep 20, 2018 10:18 AM

    Hi Miller, you can try this query:

     

    SELECT
    CM_DEVICE.dev_name, CM_DEVICE.dev_ip, CM_CONFIGURATION_ITEM.ci_name
    FROM
    CM_RELATIONSHIP_CI_CS INNER JOIN
    CM_CONFIGURATION_ITEM ON CM_RELATIONSHIP_CI_CS.source_id = CM_CONFIGURATION_ITEM.ci_id INNER JOIN
    CM_DEVICE ON CM_RELATIONSHIP_CI_CS.target_id = CM_DEVICE.cs_id
    where CM_CONFIGURATION_ITEM.ci_name = 'Resource Poll Name'



  • 13.  Re: Create attribute that not available on USM

    Posted Sep 20, 2018 11:08 AM

    Marcelo my friend thanks but the query not return information.

     



  • 14.  Re: Create attribute that not available on USM

    Broadcom Employee
    Posted Sep 20, 2018 04:11 PM

    M.E. -

     

    It looks like here may have been a typo in the "CM_CONFIGURATION_ITEM.ci_name =" clause.  What do you get if you try the following query instead?

     

    SELECT
    CM_DEVICE.dev_name, CM_DEVICE.dev_ip, CM_CONFIGURATION_ITEM.ci_name
    FROM
    CM_RELATIONSHIP_CI_CS INNER JOIN
    CM_CONFIGURATION_ITEM ON CM_RELATIONSHIP_CI_CS.source_id = CM_CONFIGURATION_ITEM.ci_id INNER JOIN
    CM_DEVICE ON CM_RELATIONSHIP_CI_CS.target_id = CM_DEVICE.cs_id
    where CM_CONFIGURATION_ITEM.ci_name like '%Resource Pool%';



  • 15.  Re: Create attribute that not available on USM

    Posted Sep 20, 2018 05:19 PM

    Hi Kathryn thank you very much. The query is this --->

     

    But It is not very functional because the only use the cs_id    :-(....

     



  • 16.  Re: Create attribute that not available on USM

    Broadcom Employee
    Posted Sep 20, 2018 05:45 PM

    M.E. -

     

    That is what I stated in my very first posting.  You will need to tweak that query so that it returns only the cs_id.  Since the CM_DEVICE table contains a column for the cs_id, the following query should work:

     

     

    SELECT
    CM_DEVICE.cs_id
    FROM
    CM_RELATIONSHIP_CI_CS INNER JOIN
    CM_CONFIGURATION_ITEM ON CM_RELATIONSHIP_CI_CS.source_id = CM_CONFIGURATION_ITEM.ci_id INNER JOIN
    CM_DEVICE ON CM_RELATIONSHIP_CI_CS.target_id = CM_DEVICE.cs_id
    where CM_CONFIGURATION_ITEM.ci_name like '%Resource Pool%';

     

     

    If you get duplicate cs_id's in the output (because multiple dev_ids match for the same cs_id), you may have to tweak this query further.  I am not a SQL query expert, but I think that this query will assure that you only get 1 cs_id for each match found:

     

     

    SELECT DISTINCT
    CM_DEVICE.cs_id
    FROM
    CM_RELATIONSHIP_CI_CS INNER JOIN
    CM_CONFIGURATION_ITEM ON CM_RELATIONSHIP_CI_CS.source_id = CM_CONFIGURATION_ITEM.ci_id INNER JOIN
    CM_DEVICE ON CM_RELATIONSHIP_CI_CS.target_id = CM_DEVICE.cs_id
    where CM_CONFIGURATION_ITEM.ci_name like '%Resource Pool%';

     

    Unfortunately, I do not have access to a vCenter in my lab so I can verify this query will work for you or not.



  • 17.  Re: Create attribute that not available on USM

    Posted Sep 20, 2018 06:12 PM

    Thank you very much.....

    This query it's working  for me ----> :-) I am very HAPPY...

     

    SELECT
    CM_DEVICE.dev_name, CM_DEVICE.dev_ip, CM_CONFIGURATION_ITEM.ci_name, CM_DEVICE.cs_id
    FROM
    CM_RELATIONSHIP_CI_CS INNER JOIN
    CM_CONFIGURATION_ITEM ON CM_RELATIONSHIP_CI_CS.source_id = CM_CONFIGURATION_ITEM.ci_id INNER JOIN
    CM_DEVICE ON CM_RELATIONSHIP_CI_CS.target_id = CM_DEVICE.cs_id
    where CM_CONFIGURATION_ITEM.ci_name like '%Resource%' and ci_name like '%renaejercito%'