Splunk AppDynamics

Transaction tracing in Elasticsearch

CommunityUser
Splunk Employee
Splunk Employee
Hi, I m trying to trace transaction on elastic-search (installed in windows) using Appdymics java agent jar. While starting elasticsearch with Appdymics java agent jar, i m getting "java.security.AccessControlException" in different place. For further details, Please find the attachment.
Labels (1)
0 Karma

dhirendra_singh
Loves-to-Learn Lots

Hi,

We are trying to instrument elastic search running as windows service but was not able to see any java options. Can you please let us know how you instrumented the elastic search?

0 Karma

Asaf_Kivity
Engager
So, did you find a way to see a flowmap of elastic in the AppD ui? Is it possible at all?
0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Can you confirm that the user id with which the agent is running has access to the elastic search application/filesystem.

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi Gurmitsa,
            Thanks for your response. For your information, i trying to trace Standalone Elasticsearch server which installed in Windows 8 box with JVM Arguments {JVM Args : -Xms4g | -Xmx4g | -javaagent:E:\AD\AppServerAgent-4.4.0.21351_elastic\javaagent.jar | -XX:+UseConcMarkSweepGC | -XX:CMSInitiatingOccupancyFraction=75 | -XX:+UseCMSInitiatingOccupancyOnly | -XX:+AlwaysPreTouch | -Xss1m | -Djava.awt.headless=true | -Dfile.encoding=UTF-8 | -Djna.nosys=true | -Djdk.io.permissionsUseCanonicalPath=true | -Dio.netty.noUnsafe=true | -Dio.netty.noKeySetOptimization=***** | -Dio.netty.recycler.maxCapacityPerThread=0 | -Dlog4j.shutdownHookEnabled=false | -Dlog4j2.disable.jmx=true | -Dlog4j.skipJansi=true | -XX:+HeapDumpOnOutOfMemoryError | -Delasticsearch | -Des.path.home=C:\aServers\elasticsearch-5.5.2 | }

   I think our java agent jar should had permission of Elasticsearch file system.

I have couple of questions,

1. How should i make sure our Java agent jar have permission for Elastic file system in windows ?

2. Does Appdynamics support Transaction tracing of Standalone Elasticsearch server like Tomcat? If yes, Is there any specific parameter or  config to pass in JVM arguments?



0 Karma

CommunityUser
Splunk Employee
Splunk Employee
 

I have to give special permission for AppDynamics jar.

Like This,


grant codeBase "file:\* AGENT_DEPLOYMENT_DIRECTORY \*/-"
{
    permission java.security.AllPermission;
};


 I do not know where i have to give. I tried this on Java "Jre/lib/security/java.policy ".But, No luck.

Tell me, is there any startup settings for Elasticsearch like IBM websphere.https://docs.appdynamics.com/display/PRO42/IBM+WebSphere+and+InfoSphere+Startup+Settings

CommunityUser
Splunk Employee
Splunk Employee

Hi John,

I am not an expert for Eleastic Search but the policy should not be set for the default java.

May be this link will help:

https://www.elastic.co/guide/en/elasticsearch/reference/2.2/modules-scripting-security.html

Thanks,

Gurmit.

CommunityUser
Splunk Employee
Splunk Employee

Hi,

     Thanks for your response. Link that you have specified is for Lower versions of Elastisearch. Anyway,

Now, my Appdynamics agent jar UP and running using below security policy.

grant codeBase "file:E:/AD/AppServerAgent-4.4.0.21351_elastic/-"
{
   permission java.security.AllPermission;

   permission java.io.FilePermission "*","read,write,execute";
   permission java.lang.RuntimePermission "setContextClassLoader";
};

Here, i could see only JVM,JMX related metrics in the Appdynamics UI.

image.png

     I could not find any Elasticsearch dashboard or Tranaction related metrics in the UI.

image.pngimage.png

I want to see code level tranasaction snapshot and code level profoling for Elasticsearch in the UI like below.

image.png

Is there any official documentation for Elasticsearch transaction? Please, advice me to figure our code level treacing.

Guilherme_Lins_
Engager

hello.
Do you find out how to get transaction data into Appdynamics UI for monitoring ElasticSearch?

Or even an official statement that it isn't possible?

TIA
Guilherme

0 Karma

Morelz
Builder

Hi guys

Elasticsearch is not supported OOB

You can use the following as a starting point

Create a POJO Rule as follows

Class - org.elasticsearch.rest.RestController

Method - dispatchRequest

Split Transactions using - Parameter o

Getter Chain - path()

This will give you Transactions being detected

Please then also add the following package org.elasticsearch.* class to call graphs as without it you would only see the entry points

For additional data, you can enable the "find entry points" node property and then using the Business Transaction logs look to find more entry points if needed

Ciao

Karel_Vandeputt
New Member

Hi,

I am trying to do the same on elastic running in linux. Were you able to get app data into the controller?

Regards, Karel

0 Karma
Get Updates on the Splunk Community!

Bridging the Gap: Splunk Helps Students Move from Classroom to Career

The Splunk Community is a powerful network of users, educators, and organizations working together to tackle ...

Preparing your Splunk Environment for OpenSSL3

The Splunk platform will transition to OpenSSL version 3 in a future release. Actions are required to prepare ...

Unleash Unified Security and Observability with Splunk Cloud Platform

     Now Available on Microsoft AzureThursday, March 27, 2025  |  11AM PST / 2PM EST | Register NowStep boldly ...