Splunk AppDynamics

Multiple application configuration with single java agent, Migrate to Linux

David_Jones
New Member

Hi all,

We are currently migrating several java applications from from Windows hosts to RHEL so we are trying to match the source configuration as close as possible.

The issue is that we have 2 applications per machine, and the convention is to have spaces in the application name, so the following things are true:

  • Passing spaces in as jvm args doesn't seem to work with the application config, although you would assume that using quotes around the key-value pair, or just the value would work. This was not a problem with the args in the Windows registry
  • I can use spaces in the controller-info.xml however I'm still yet to figure out how we can have 2 separate configurations with the xml files.

So, my questions become:

  • Is there a way for appd to handle spaces in the JVM arguments to define applicationname/teir/nodename etc?
  • If not, how can I handle multiple configurations with 2 JVMs reporting to the same agent?

Thanks.

Labels (1)
Tags (3)
0 Karma

Morelz
Builder

Hi There

We have done 100's of Linux servers using spaces in Application Name, Tier & Node Name in the JVM startup parameters. So it does work.

Can you provide your Startup arguments how you are adding them in?

Ciao

0 Karma

David_Jones
New Member

Thanks for your response. 

That's interesting, and obviously points to a potential issue elsewhere..

In the current setup, there is an input file where we put our args, but there is a script that runs over the top of it to distribute the input properties to their respective settings files.. I suspect this may be where the issue is coming from now that you say it works..

what I have tried was the following:

-javaagent:/opt/Folder/AnotherFolder/javaagent.jar -Dappdynamics.agent.tierName="VALUE WITH SPACES"

-javaagent:/opt/Folder/AnotherFolder/javaagent.jar -Dappdynamics.agent.tierName='VALUE WITH SPACES'

Both single and double quotes. I even tried wrapping the whole argument in quotes but no luck either..

So, failing the ability to fix this script that distributes settings, which I have no control over since it's a COTS thing, Is there a way to use multiple xml files, or even multiple <controller-info> objects in a single xml file?

0 Karma

Morelz
Builder

Hi 

What I suggest is the following.

Not sure which off the shelf product you are instrumenting, but we have had some Java applications, which due to the way their startup files worked did not like having more than one JVM param added together on the same line, one after the other. So you can append them like below using JAVA_OPTS or similar in your application.

The main problem is the syntax

You need to use single quotes inside of the double quotes as below, where there is a space in the app/tier/node name

I don't have the rest of how you are adding your code, if you re using JAVA_OPTS etc.

In JAVA_OPTS you would basically append the variables one at a time

JAVA_OPTS="$JAVA_OPTS -javaagent:/opt/Folder/AnotherFolder/javaagent.jar"

JAVA_OPTS="$JAVA_OPTS -Dappdynamics.agent.tierName='VALUE WITH SPACES'"

Once you startup the application, do a ps aux | grep command to see the application startup parameters, which will shows you where it's cutting of your arguments, and assist in fixing your problem.

Get Updates on the Splunk Community!

What's New in Splunk Cloud Platform 9.3.2411?

Hey Splunky People! We are excited to share the latest updates in Splunk Cloud Platform 9.3.2411. This release ...

Buttercup Games: Further Dashboarding Techniques (Part 6)

This series of blogs assumes you have already completed the Splunk Enterprise Search Tutorial as it uses the ...

Technical Workshop Series: Splunk Data Management and SPL2 | Register here!

Hey, Splunk Community! Ready to take your data management skills to the next level? Join us for a 3-part ...