DX Unified Infrastructure Management

Expand all | Collapse all

How to mass update user tags for robots?

Yu Ishitani

Yu IshitaniOct 10, 2018 04:17 AM

  • 1.  How to mass update user tags for robots?

    Posted Jun 22, 2016 03:28 PM

    Hello Experts,

    Can any one tell me how to mass update User Tags at the controller level in robot?

    I have more than 1000 systems that will be migrated from systemedge/SNMP into UIM for basic monitoring (cpu/mem/disk) to start with. User tags will come in handy when i am dealing with more than 1000 systems for UMP groupings and alerting from NAS.

    UIM version 8.4 and robot version is 7.80

    Thanks in advance,

    Chintan



  • 2.  Re: How to mass update user tags for robots?

    Posted Jun 22, 2016 04:31 PM

    You can make a package for all those robots. Just edit/add the os_user1=exampleTAG2 and os_user2=exampleTAG2 parameter in the robot.cfg file and distribute as needed.

     

    We don't have uim 8.4 so I can't confirm but there seems to be a new template like feature ...

     

    What's New - CA Unified Infrastructure Management - 8.4 - CA Technologies Documentation

     

    Hope it helps, cheers.

     

    A



  • 3.  Re: How to mass update user tags for robots?
    Best Answer

    Posted Jun 22, 2016 05:27 PM

    Note that updates of the usertag is a simple replace operation - there is no edit functionality. Therefore if you overload the tags to provide multiple identifiers (e.g. os_user_1 = unix#oracle#webserver), then you will need to script the update process, as just setting in a package (e.g. os_user_1 = myfancyapp) will *overwrite* any existing values.

     

    To update existing values, use a script to scan all robots, collect the existing usertag(s), append your new string, and replace with the updated version.

     

    Note also that hubs are a special case, in 8.4 the usertag is stored in the hub.cfg, but can be read from the controller.cfg



  • 4.  Re: How to mass update user tags for robots?

    Posted Apr 14, 2017 07:34 AM

    I noticed this and at the moment I am tasked with almost the same task as above. I have about 390 robots that I need to place the same value in the User Tag 2 field. Rather than going to each robot in the IM and manually placing the value in each user tag 2 field I was wondering if a mass add/sql script was possible. I noticed the above posts did anyone ever get a script like this to work?



  • 5.  Re: How to mass update user tags for robots?

    Posted Apr 14, 2017 09:01 AM

    Hello Robert, We are at a point where we now have almost 2000 robots and unfortunately i am still doing the manual updates. I was hoping to get to see the flexibility available right from the deployment stage using ADE as it would be easier you could choose which HUB you need to point your robots to and what other tags you could use to stick to them during the installation itself. 



  • 6.  Re: How to mass update user tags for robots?

    Broadcom Employee
    Posted Apr 14, 2017 09:16 AM

    HI Robert so this information is stored locally on each robot in the robot.cfg file

    When they were referring to scripts this is not a SQL script but rather a lua script or

    some other scripting language such as pearly to contact each robot read in the value and then put back the value you want.

     

    below are some threads about scripting with different probes that might help if that is the direction you are moving.

    LUA script to add sqlserver connection based on ntservices scan 

     

    LUA--help with probe_config_get 

     

    hope this helps

     

    An example of the NSA probe scripting can be found in the below tech article and does show you how to loop through hubs and robots.



  • 7.  Re: How to mass update user tags for robots?

    Posted Oct 08, 2018 09:12 AM

    Hi,

     

    I would like to use a skript to Change every origin. I can't find the variable for the origin. For usertag it is os_user but there is no origin. The origin will be individually by every robot.



  • 8.  Re: How to mass update user tags for robots?

    Broadcom Employee
    Posted Oct 10, 2018 04:17 AM

    I think origin is controlled by spooler probe.



  • 9.  Re: How to mass update user tags for robots?

    Posted Oct 10, 2018 11:05 AM

    The way i would do this and you'd have control over every thing you need to set:

    In IM tools Find then find all ROBOT's 

    Export this to EXCEL 

    Copy out all the address of each robot and then you would use the pu command to do a probe config set on the controller probes user tag(s). 

     

    You'd setup in excel all the columns with just the robot columns pasted into the template:

    PU CommandAddress to RobotController SetProbe /section/section/section variable valueAddress to probe Use a '.'
    pu -u administrator -p PASSWORD /Domain/Hub/Robot/controller probe_config_set controller /controller os_user1 NEW_TAG.

     

    You'd then update all your tags accordingly.

    Then copy all the lines into notepad++ and remove all the TABs and replace with spaces accordingly to construct the correct command line. 

     

    The final command would look like:

    pu -u administrator -p ****** /Domain/Hub/Robot/controller probe_config_set controller /controller os_user1 "DBLANCOs Laptop2" .

     

    Then copy all that and past it into an administrative cmd prompt opened to the \Nimsoft\bin directory.

    Run one command to verify it worked then repeat with the rest.

     

    DONE.



  • 10.  Re: How to mass update user tags for robots?

    Posted Oct 11, 2018 02:08 AM

    DanielBlanco do you also have the command line to change the origin? I can't find the origin in the raw configure



  • 11.  Re: How to mass update user tags for robots?

    Broadcom Employee
    Posted Oct 11, 2018 04:09 AM

    Please try. (The origin tag is in spooler.cfg)

     

    pu -u <user> -p <pass> /<domain>/<hub>/<robot>/controller probe_config_set spooler "/spooler" origin NewValue "" ""

    pu -u -u <user> -p <pass> /<domain>/<hub>/<robot>/controller _reset_device_id_and_restart NULL

     



  • 12.  Re: How to mass update user tags for robots?

    Posted Oct 11, 2018 10:26 AM

    Thanks Yu, so Alex yeah it would be this:

     

    The final command would look like:

    pu -u administrator -p ****** /Domain/Hub/Robot/controller probe_config_set spooler /spooler origin "New_Origin" .

     

     

     



  • 13.  RE: Re: How to mass update user tags for robots?

    Posted Nov 06, 2019 05:02 AM
    Hi Daniel ,

    But after copying the command  into excel  , will that work if I mention 100 servers at one shot .

    Regards
    AMar


  • 14.  RE: Re: How to mass update user tags for robots?

    Posted Nov 07, 2019 03:34 AM
    If you put these pu commands in a bat file (windows) they will be executed one after another)
    (you can check the tool: https://community.broadcom.com/enterprisesoftware/communities/community-home/digestviewer/viewthread?GroupId=1315&MessageKey=085052fe-4e3b-4c55-abfb-782ac1a46401; this is a PU generator that can make regex selections in the UIM db tables)


  • 15.  RE: Re: How to mass update user tags for robots?

    Posted Feb 10, 2020 10:21 AM
    Hi Daniel I have a question,

    The above pu command when you set os_user1 "DBALNCOs Laptop2"

    "DBALNCOs Laptop2" is this the user tag 1?

    Where do I define the final robot name?

    Thank you

    Rubens.


  • 16.  RE: Re: How to mass update user tags for robots?

    Posted Feb 10, 2020 12:24 PM
    yes the User Tag 1 is:  "DBLANCO's Laptop2"

    If you want to change the name of the robot you'd specify the 

    robotname = xxxxxxx
    But you should leave that as autodetect.

    ------------------------------
    Daniel Blanco
    Enterprise Tools Team Architect
    DBlanco@alphaserveit.com
    ------------------------------



  • 17.  RE: Re: How to mass update user tags for robots?

    Posted Feb 10, 2020 12:58 PM
    If you are changing the name of a robot that is also a hub, you also need to make sure to update the key hubrobotname.

    And a while back, the decision was made to have two sets of user tags - one at the controller level and one at the hub level. And then create some wacky logic around version and existence to decide which ones to use that for the most part either confounds reality or the end user. So, it's best (in my humble opinion) to make sure that the hub and controller values always match so if you update a user tag in the controller you also need to male the same change in the hub and vice versa.

    And just to throw a couple more possible ways of handling this you can use the pu command from the command line to twiddle these values - here's the hub for example:

    /opt/nimsoft/bin/pu -u UserName -p UserPassword /Domain/hub/robot/controller probe_config_set "hub" "/hub" "os_user1" "MyUserTag1Setting" "" ""

    And to put it into effect:

    /opt/nimsoft/bin/pu -u UserName -p UserPassword /Domain/hub/robot/hub "_stop"