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
Get Updates on the Splunk Community!

New This Month - Splunk Observability updates and improvements for faster ...

What’s New? This month, we’re delivering several enhancements across Splunk Observability Cloud for faster and ...

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 ...