IBM Support

How to customize the MSN for the WAS agent on the Agent Configuration page.

Technical Blog Post


Abstract

How to customize the MSN for the WAS agent on the Agent Configuration page.

Body

When you have multiple WAS servers connected to your APM server, you may run into a situation where the Managed System Name (MSN) on your Agent Configuration page is not unique.  This is because the MSN consists of a max of 32 characters and is made up of <servername>:<hostname>:KYNS.   So, let's take a look at an example here.  In the screenshot below, the MSN name looks like this, where the servername is ip-9-30-1-1, and the hostname is ip-9-30-145-186.

image

 

 

 

 

 

 

So, let's say you want to change the above MSN into something more user-friendly and readable with a quick ability to distinguish multiple servers from different WAS profiles.   To make the MSN name changes, you will make changes to the default servername and/or the hostname.  The KYNS cannot be changed.

Changing the default servername:

The <servername> is changed during the DC configuration.  One of the options in the configuration is the ability to choose a server alias name.  You can choose an unique server alias name here, this name will be used when you restart the WAS server.  See the screenshot below showing the server alias name option.  (Note: You will need to restart your WAS server after the DC has been configured.)

image

 

 

 

 

 

 

Changing the hostname:

Usually just changing the default servername will result in an unique MSN and in most cases, you won't have to change the hostname.  However, if you still want to customize the hostname (and MSN) to something more unique, then follow these steps.

1. Stop the WebSphere Applications agent.

2. Open the yn.environment file (create it if it doesn't exist) and add this line in it:

CTIRA_HOSTNAME=<newHostname>

You will find the file in this dir:

Linux: <agent_install_dir>/config/yn.environment

Windows: <agent_install_dir>/config/KYNENV

3. Back up the original xml files and then remove the xml files (except the master xml file.)  For example, in my case, I'll backup the following the files:

image

 

 

 

 

So, in this case, the first 2 files are my JVM xml files (one per configured server) and the third file (<hostname>_yn.xml) is the master xml  file.  After back up, delete the first 2 files.  Do not delete the master <hostname>_yn.xml file, you will need this one to make the hostname changes.

4. Open the master xml file <hostname>_yn.xml file and make these changes:

Remove these lines:

In the <!DOCTYPE AgentConfig [] section, remove the lines referencing the first 2 xml files.  For example, remove the lines shown in the red box towards the start of the file:image

 

 

 

 

 

5. Between the </defaultSererSettings> and </AgentConfig> tags towards the bottom of the same file, remove these lines, see screenshot below.image

 

 

 

 

 

 

 

 

 

 

 

 

 

6. Start the WebSphere Applications agent. You might get a missing xml file error, ignore this for now.

7. Stop the WebSphere Applications agent. The previously removed xml files in Step 3 are created again.
8. Go to the <agent_install_dir>/logs directory and verify that the new host name is applied to the data collector instance in the log files.  Do a grep -i <newHostname> *asf* to check.

9. Start the WebSphere Applications agent again. The agent instance should now display the new MSN name.
10. Start the Cloud APM console and modify your application to remove the agent instances under the old MSN names and add the new ones.

If you've done all the steps correctly, this is how it should look like now:

image

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Good luck. :-)

Noel Lewis

ITCAM / APM / ICAM L2 Support team

 

Tutorials Point

 

Subscribe and follow us for all the latest information directly on your social feeds:

 

 

image

 

image

 

image

 

 

  

Check out all our other posts and updates:

Academy Blogs:https://goo.gl/U7cYYY
Academy Videos:https://goo.gl/FE7F59
Academy Google+:https://goo.gl/Kj2mvZ
Academy Twitter :https://goo.gl/GsVecH


image

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"","label":""},"Component":"","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"","label":""}}]

UID

ibm11084431