Automic Workload Automation

Expand all | Collapse all

Agent Name vs. Server Name

  • 1.  Agent Name vs. Server Name

    Posted Aug 15, 2016 09:53 AM
    Does anyone know where the actual agent name is stored on the db?  In which table?

    99% of my agents - the agent name is the same as the server name.  However, I have a handful where that is not the case.  So the agent name might be something like 'JDEAPAC1' and that agent actual runs on server 'USXXXXXX'.  

    I'm trying to setup an automatic restart process and the ucybcmsl program requires the actual server name.  I haven't been able to find it yet although I'm still looking.

    Just wondering if someone else knows this off the top of their head.

    Thanks.


  • 2.  Agent Name vs. Server Name

    Posted Aug 15, 2016 10:08 AM
    It isn't MQSRV?  That is always my first go-to on system info. 

    Seems like MQSRV_Name would be the agent name, since MQSRV_Type allow for an agent.


  • 3.  Agent Name vs. Server Name

    Posted Aug 15, 2016 10:15 AM
    Unfortunately no.  MQSRV has the MQSRV_NAME, which is the agent name.  I'll look around the MQ* table names though.  Maybe it's around there.  Thanks Tim.


  • 4.  Agent Name vs. Server Name

    Posted Aug 15, 2016 10:26 AM
    Sorry, I misread your message initially.

    Would the system even record your server name?  It uses MQSRV_TcpIpAddr to find where to connect to, so it doesn't need the actual server name, right?  I believe MQSRV_TcpIpAddr can also be a host name though since both work in the ini file.  But I'm not sure this is helpful because I don't know how your agents are setup.


  • 5.  Agent Name vs. Server Name

    Posted Aug 15, 2016 01:26 PM
    If I read your question right, you want the IP address for a regular agent, not the master server?
    select oh_name, host_tcpipaddr
    from oh inner join host on oh_idnr = host_oh_idnr
    where oh_name = '[AGENT NAME]'
    and oh_deleteflag = 0
    and oh_otype = 'HOST'


  • 6.  Agent Name vs. Server Name

    Posted Aug 15, 2016 05:41 PM
    Hi Laura - the actual agent name is in the OH table. 

    select oh_name, oh_idnr, host_tcpipaddr, host_hostAttrType,host_htyp_hw, host_htyp_sw, host_htyp_swvers from host, oh
    where 1=1
    and host_oh_idnr = oh_idnr
    and oh_name not like '<%>'
    --and host_active = 1



  • 7.  Agent Name vs. Server Name

    Posted Aug 16, 2016 07:35 AM
    Sorry everyone.  I meant the actual "SERVER" name.  I know the agent name is in the OH table in the OH_NAME field, but as we all know - not all agent names are the same as the server name that they are installed to.

    The only way I can actually find this info is in the agent log when it first starts up, it does log the actual server name.

    I have basically created a static variable that has agent name, environment, server  name, etc. in there.  Trying to make that work.

    I guess it makes sense that it isn't kept anywhere.  There's no where in the GUI that you would see that information. I suppose IP address could possibly help, but then I'd have to figure out an nslookup somewhere to get what I actually need - the server name.

    No worries.  Thanks guys for all the suggestions.


  • 8.  Agent Name vs. Server Name

    Posted Aug 16, 2016 10:07 AM
    LauraAlbrecht608310 - I was wondering why you were asking where the agent name is (since I think I saw one of your posts where you pointed out where the agent name is)  :) The actual server name where an agent is installed is not stored in any of the tables. If you leave the agent name blank in the ini file, then it will take the server's name as the agent name.

    I guess you can try and create a script that will do a ping -a xyz.***.z.abc (loop through a SQLI vara to get the IP address of your agents), then process the result to get the server name (and optionally store it in a VARA). Not exactly straightforward, but it's an option.


  • 9.  Agent Name vs. Server Name

    Posted Aug 16, 2016 01:52 PM
    An easier method would be an OS command like

    echo %computername%
    for WIN
    or
    hostname
    for linuxes in bash.



  • 10.  Agent Name vs. Server Name

    Posted Aug 16, 2016 03:34 PM
    Hi FrankMuffke
    If you only have the IP address, how do you run echo %computername% when you don't have the computer name yet? Just curious - maybe I'm missing something.


  • 11.  Agent Name vs. Server Name

    Posted Aug 16, 2016 04:20 PM

    Hi Christine_Chavez_6412

    now maybe I am missing sth or overread sth. Do i have just the IP? Thought the agent name is given...

    As far as I understood Laura Needs the actual Machine's Name instead of the Agent Name.


    I would run a job on the Agent to be sure the Servers name is correct.

    Running any commands like ping, nslookup etc are not 100% trustable cause they get their data not from the Server itself but a named service which could be wrong in worst case.



  • 12.  Agent Name vs. Server Name

    Posted Aug 17, 2016 05:24 AM
      |   view attached

    Hello,

     

    I would use the following Automic script:

    x4djud4gasyy.pnghttps://us.v-cdn.net/5019921/uploads/editor/ae/x4djud4gasyy.png" width="997">

    • In this example 'VWGSUP11_SAP_ECC' is the Automic Agent Name (set in the Agent INI File with the “name=” parameter), where the server name should be determined.
    • UC_EX_IP_ADDR will return the IP address or the host name / server name.
    • Anyhow which of both is returned the “nbtstat” command executed via WINCMD will return the same result. The WINCMD can be executed on each Windows Agent, e.g. something like a “service Agent” within the system.
    • Using some string operation cuts the server name out of the result. Which is what you are looking for, if I got it right.

     KR, Josef

    Attachment(s)