Splunk AppDynamics

Node.js Agent Unable to Connect to AppDynamics Controller

CommunityUser
Splunk Employee
Splunk Employee

Hello everyone,

I've been trying to set up the AppDynamics Node.js agent on my application but to no avail.

I added the following lines in my app.js file.

require("appdynamics").profile({
controllerHostName: 'dangerous2017110516021721.saas.appdynamics.com',
controllerPort: 443,

// If SSL, be sure to enable the next line
controllerSslEnabled: true,
accountName: 'dangerous2017110516021721',
accountAccessKey: 'ah02lso4vb6f',
applicationName: 'MyDigi',
tierName: 'MyDigi Tier',
nodeName: 'process', // The controller will automatically append the node name with a unique number
proxyHost: '172.16.32.151',
proxyPort: '8001'

logging: {
'logfiles': [
{
'root_directory': '/tmp/appd',
'filename': 'echo_%N.log',
'level': 'TRACE',
'max_size': 5242880,
'max_files': 10,
'outputType': 'console' // Set this parameter if you want to log to STDOUT/STDERR. Omit this parameter if you want to log to a file.
}
]
}
});

Could someone please help?

Thanks.

Labels (1)
0 Karma

Piyush_Mundra
Communicator

Hi,

Your SAAS controller is not showing any application on this name. Could you please verify if the outgoing requests from the agent are routed properly by the network proxy?

Alternatively, could you please remove the network proxy from the environment as well as from the agent configs and verify that the agent is able to connect properly.

Lastly, could you please add debug:true in the agent configuration and verify if there are any errors reported in the logs under /tmp/appd folder?

Best Regards,

Piyush

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hello Piyush,

After adding 'debug: true', I still don't see the 'appd' folder in /tmp.

It seems that my application is not starting the agent.

Is there anything else I can do?

require("appdynamics").profile({
controllerHostName: 'dangerous2017110516021721.saas.appdynamics.com',
controllerPort: 443,

controllerSslEnabled: true,
accountName: 'dangerous2017110516021721',
accountAccessKey: 'ah02lso4vb6f',
applicationName: 'MyDigi',
tierName: 'MyDigi Tier',
nodeName: 'processss',
proxyHost: '172.16.32.151',
proxyPort: '8001',
debug: true
});

Thanks.

0 Karma

Piyush_Mundra
Communicator

Hi,

Could you please confirm that the agent's require statement is before adding/requiring any other modules in the application?

Also, please verify if there is a JAVA process running after starting the node application with the help of ps -ef | grep -i proxy command. Please also share the output of this command here.

Best Regards,

Piyush

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hello Piyush,

Yes, the require statement is at the beginning of the my application js file.

[mdgadmin@a0110teceapp01 OCSServer]$ ps -ef | grep -i proxy
mdgadmin 2844 1776 0 09:39 pts/2 00:00:00 grep --color=auto -i proxy
root 22513 1 0 Sep19 ? 00:34:16 /usr/bin/dockerd-current --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current --default-runtime=docker-runc --authorization-plugin=rhel-push-plugin --exec-opt native.cgroupdriver=systemd --userland-proxy-path=/usr/libexec/docker/docker-proxy-current --selinux-enabled --log-driver=journald --signature-verification=false --add-registry registry.access.redhat.com

Thanks.

0 Karma

Piyush_Mundra
Communicator

Hi,

The JAVA proxy process is not able to start. I see that you are running with SELinux enabled. Could you disable it once and see if that helps?

Best Regards,

Piyush

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...