CA Client Automation

 View Only
  • 1.  How to search for clients without assigned Scalability Server

    Posted Feb 26, 2015 10:06 AM

    Hello there,

     

    I'm currently creating a script to split up software jobs per region for our deployment process.

    All that works fine as long as there's no clients within the designated target group that are missing a scalability server because of a bug or migration issues.

    So my cunning plan was to use

    cadsmcmd targetcomputer action=list filter="Staging-Server-Name=""" DisHwOnly

    to only display the computers without an assigned scalability server (Staging-Server-Name is the name in the German version of ITCM).

    But different variations of filtering for that end up in several results of nada.

     

    So how would I best find those clients without having to iterate through all computers of that container with "action=showattr" and parsing through loads of data that I don't care about?



  • 2.  Re: How to search for clients without assigned Scalability Server

    Posted Feb 26, 2015 12:47 PM

    Set up a query based group in DSM Explorer, then you can use CADSMCMD to display the members of the group. The query will have to be ‘tweaked’ a little. Start with this query: General Information --> Computer --> Relationship --> Server Relations --> Current Server = ‘pick one of your servers, any one!’

     

    You will now have a query with pseudo text (Current Server = ‘MyServer’). If you right click that you will get a menu with ‘Edit SQL…’, which will pop up another dialog which shows the actual SQL query, which will look like:

     

     

    ·         ca_discovered_hardware.dis_hw_uuid in (SELECT object_uuid FROM ca_agent WHERE server_uuid IN (SELECT server_uuid FROM ca_server WHERE label='MyServer'))

     

    o   change that to

     

    ·         ca_discovered_hardware.dis_hw_uuid in (SELECT object_uuid FROM ca_agent WHERE server_uuid NOT IN (SELECT server_uuid FROM ca_server))

     

    You can change the pseudo text as well to whatever you like by clicking on it, wait a second then click on it again. It will allow you to rename the pseudo text.

     

    Steve McCormick, ITIL

    CA Technologies

    Principal Services Consultant

    Tel: +1-731-676-4223

    Stephen.McCormick@ca.com

    <mailto:Stephen.McCormick@ca.com>



  • 3.  Re: How to search for clients without assigned Scalability Server

    Posted Feb 27, 2015 02:16 AM

    That solution seems to be a little bit like cheating, but I gave it a try. :-)

    Even though DSM Explorer shows me four clients without an entry for Scalability Server, the suggested query gives me zero results.

     

    I looked over it again and again, but couldn't find what I might've spelled wrong:

    ca_discovered_hardware.dis_hw_uuid in (SELECT object_uuid FROM ca_agent WHERE server_uuid NOT IN (SELECT server_uuid FROM ca_server))



  • 4.  Re: How to search for clients without assigned Scalability Server

    Broadcom Employee
    Posted Jul 17, 2015 11:32 AM

    Hi u123246

     

    Did you find the query to suit your needs or do you need more advice

    regards

    Rich



  • 5.  RE: Re: How to search for clients without assigned Scalability Server

    Posted Mar 01, 2024 10:24 AM

    Hello,

    I tried using this search, but it actually displays zero results. I know the question is very old, but did you manage to find a way to filter computers without scalability?




  • 6.  RE: Re: How to search for clients without assigned Scalability Server

    Posted Mar 01, 2024 10:47 AM

    So, I got this in my email a short while ago and, knowing I had a couple of Computers in this state and COMPLETELY forgetting that I posted the suggested solution NINE YEARS ago (!), I set it up again and it worked perfectly for me using:

    ca_discovered_hardware.dis_hw_uuid in (SELECT object_uuid FROM ca_agent WHERE server_uuid IN (SELECT server_uuid FROM ca_server))

    I do see I failed to specify you need to include a NOT statement in the query editor:

    Hope that helps

    Steve McCormick




  • 7.  RE: Re: How to search for clients without assigned Scalability Server

    Posted Mar 01, 2024 11:07 AM

    Now it works perfectly.
    Thanks a lot for the help!