Splunk AppDynamics

Creating an Agent for Drupal 7

CommunityUser
Splunk Employee
Splunk Employee

Hi,

I have the controller installed and running.

I can create a database agent, install it on my Drupal server and see some database data.

How do I create an agent that can monitor my Drupal Application?

Thanks

Labels (1)
Tags (2)
0 Karma
1 Solution

CommunityUser
Splunk Employee
Splunk Employee

Hi piyush,

Spoke with an Engeneer re my trial.

I was looking at the User Experience Account Name and Key.

I went to the Account tab on the Licence screen in the Controller and used the Name and and Access Key located there in both the appdynamic_agent.ini files.

Agent is now sucessfully connecting to the Controller.

Thanks for your help.

View solution in original post

0 Karma

Piyush_Mundra
Communicator

Hi,

If you are running PHP on the server, you can install the PHP agent and monitor it. Please go through the documentation link at https://docs.appdynamics.com/display/PRO43/Install+the+PHP+Agent for more information on the agent installation.

Best Regards,

Piyush

0 Karma

CommunityUser
Splunk Employee
Splunk Employee
Ok,
Went through the Docs.
Used this to install

sudo ./install.sh -a=xxx@yyy -e /usr/lib/php5/20121212 -i /etc/php5/cli/conf.d 8090 Drupal7 phpTier myNode
Output seemed successful... but can't see it in the Controller.

Writing '/home/developer/php-agent-2/appdynamics-php-agent/appdynamics-php-agent/php/conf/appdynamics_agent_log4cxx.xml'
Writing '/etc/php5/cli/conf.d/appdynamics_agent.ini'
Writing '/home/developer/php-agent-2/appdynamics-php-agent/appdynamics-php-agent/proxy/conf/controller-info.xml'
rm -f "/usr/lib/php5/20121212/appdynamics_agent.so"
ln -s "/home/developer/php-agent-2/appdynamics-php-agent/appdynamics-php-agent/php/modules/appdynamics_agent_php_5.5.so" "/usr/lib/php5/20121212/appdynamics_agent.so"
Writing '/home/developer/php-agent-2/appdynamics-php-agent/appdynamics-php-agent/proxy/runProxy'
Do I need to create matching agent place holders in the Controller or should it auto find?
0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Matching Application and Tier.

Agent Connected Waiting for data... and waiting and waiting. 🙂

Have used a websirte copier to generate traffic.

See image.

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Attached php -i output.

installed the agent with the following syntax:

./install.sh -a=12345-ss-abcdef-12gg23w33ewe@sdfsdf-sdfsdf-sdfsdf-sfs-fsfdsfsd -e /usr/lib/php5/20121212 -i /etc/php5/apache2 hostna.e.domain.com 8090 Drupal7 myTier myNode

Ideas?

^Post edited by @Ryan.Paredez to remove file attachment. 

0 Karma

Piyush_Mundra
Communicator

Hi,

Please try with follwoing command after replacing the proper placeholders for account name, access key, controller host and port.

./install.sh -a=ACCOUNT_NAME@ACCESS_KEY -e /usr/lib/php5/20121212 -i /etc/php5/apache2/conf.d CONTROLLER_HOST CONTROLLER_PORT Drupal7 myTier myNode

 

Best Regards,

Piyush

0 Karma

Piyush_Mundra
Communicator

Hi,

After the agent installation, please restart the Apache server and drive some load on the application. If the issue still persists, please provide us the output of phpinfo() from apache.

Best Regards,

Piyush

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Thanks Piyush,

Attached phpinfo.txt created with phpinfo.php in docroot.

Yesterday I was using 4.3.3.7

I uninstalled everything and tried with 4.3.3.8... Can't even get a connection now. 😞

Here's the command and output, as root, to install the agent.

./install.sh -a=ACCOUNT@KEY -e /usr/lib/php5/20121212 -i /etc/php5/apache2 ped19879 8090 Local_WxT Drupal localweb
Install script for AppDynamics PHP Agent 4.3.3.8GA.12943.e7ff8..........
Found PHP installation in /usr/bin

  Detected PHP Version:
  PHP 5.5.9-1ubuntu4.21 (cli) (built: Feb  9 2017 20:54:58)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies

PHP version id:            5.5
PHP extensions directory:  /usr/lib/php5/20121212
PHP ini directory:         /etc/php5/apache2
Controller Host:           ped19879
Controller Port:           8090
Application Name:          Local_WxT
Tier Name:                 Drupal
Node Name:                 localweb
Account Name:              XXXXX
Access Key:                YYYYY
SSL Enabled:               false
HTTP Proxy Host:
HTTP Proxy Port:
HTTP Proxy User:
HTTP Proxy Password File:

Writing '/home/developer/appdynamics-php-agent/php/conf/appdynamics_agent_log4cxx.xml'
Writing '/etc/php5/apache2/appdynamics_agent.ini'
Writing '/home/developer/appdynamics-php-agent/proxy/conf/controller-info.xml'
rm -f "/usr/lib/php5/20121212/appdynamics_agent.so"
ln -s "/home/developer/appdynamics-php-agent/php/modules/appdynamics_agent_php_5.5.so" "/usr/lib/php5/20121212/appdynamics_agent.so"
Writing '/home/developer/appdynamics-php-agent/proxy/runProxy'

,

0 Karma

Piyush_Mundra
Communicator

Hi,

The latest phpinfo shows that the agent is installed and hooked in but it looks like one of the configuration parameter might be an issue. Could you please check specifically for accountName configuration parameter which seems to be wrong. You can verify these agent config details in /etc/php5/apache2/conf.d/appdynamics_agent.ini file. Could you also please check if there are any log files generated in /home/developer/appdynamics-php-agent/logs folder which might give some hint on the issue.

Best Regards,

Piyush

0 Karma

CommunityUser
Splunk Employee
Splunk Employee
I verified the
agent.accountName

agent.accountAccessKey

in /etc/php5/apache2/conf.d/appdynamics_agent.ini.
They are the same there and in the Controller Licence screen.
in the proxy log


Could not connect to the controller/invalid response from controller, cannot get initialization information, controller host [hostname.domain.com], port[8090], exception [null]

I am able to ping both the controller hostname.domain.com and hostname from the server to be monitored...

... in the agent log


2017-07-26 12:01:46.512 AST INFO localweb 2619 [config.ConfigChannel] sending config request with version -1
2017-07-26 12:01:46.513 AST INFO localweb 2619 [config.ZMQConfigTransport] received config response for request ID -8540543949318037878
2017-07-26 12:01:46.513 AST ERROR localweb 2619 [config.ConfigChannel] No agent identity in config response: currentVersion: 1501080031306
agentState: UNREGISTERED
timestampSkew: 0
requestID: -8540543949318037878

2017-07-26 12:01:46.718 AST INFO localweb 2597 [config.ConfigChannel] sending config request with version -1
2017-07-26 12:01:46.719 AST INFO localweb 2597 [config.ZMQConfigTransport] received config response for request ID -4070690147874826516
2017-07-26 12:01:46.928 AST INFO localweb 2559 [config.ConfigChannel] sending config request with version -1
2017-07-26 12:01:46.928 AST INFO localweb 2559 [config.ZMQConfigTransport] received config response for request ID 178101423542293061
2017-07-26 12:01:47.447 AST INFO localweb 2558 [config.ConfigChannel] sending config request with version -1
2017-07-26 12:01:47.447 AST INFO localweb 2558 [config.ZMQConfigTransport] received config response for request ID 3772313462182901733

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hey - Sorry for this trouble...

The agent.accountName and agent.accountAccessKey in /etc/php5/cli/conf.d/appdynamics_agent.ini were not correct.

I have updated them and restarted apache.

Still can't connect.

[AD Thread Pool-Global1] 26 Jul 2017 12:40:09,190  INFO com.singularity.CONFIG.ConfigurationChannel - Detected node meta info: [Name:ProcessID, Value:9726, Name:appdynamics.ip.addresses, Value:fe80:0:0:0:a00:27ff:febb:5f65%eth0,xxx.xxx.xxx.88]
[AD Thread Pool-Global1] 26 Jul 2017 12:40:09,190  INFO com.singularity.CONFIG.ConfigurationChannel - Sending Registration request with: Application Name [wxt], Tier Name [drupal], Node Name [localweb], Host Name [developer] Node Unique Local ID [localweb], Version [Proxy v4.3.3.8 GA SHA-1:.e7ff8eec868c04f5a96ada2d459e2fcb5efe4658 #12943 4612-4.3.3.next-build]
[AD Thread Pool-Global1] 26 Jul 2017 12:40:09,200 ERROR com.singularity.CONFIG.ConfigurationChannel - HTTP Request failed: HTTP/1.1 401 Unauthorized
[AD Thread Pool-Global1] 26 Jul 2017 12:40:09,200  INFO com.singularity.CONFIG.ConfigurationChannel - Resetting AuthState for Proxy: [state:UNCHALLENGED;] and Target [state:FAILURE;]
[AD Thread Pool-Global1] 26 Jul 2017 12:40:09,200  WARN com.singularity.CONFIG.ConfigurationChannel - Could not connect to the controller/invalid response from controller, cannot get initialization information, controller host [hostname.domain.com], port[8090], exception [null]
[AD Thread Pool-Global1] 26 Jul 2017 12:40:09,200 ERROR com.singularity.CONFIG.ConfigurationChannel - Exception: NULL
[AD Thread-Metric Reporter0] 26 Jul 2017 12:40:47,282  WARN com.singularity.METRICS.MetricHandler - Metric Reporter Queue full. Dropping metrics.

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Ok... My problem is the accountname@customer# aren't inslalling.

Why?

[AD Thread Pool-ProxyControlReq0] 26 Jul 2017 13:32:46,047  INFO com.singularity.XMLConfigManager - XML Agent Account Info Resolver did not find account name. Using default account name [customer1]

The startop log for proxy.2017_07_26__13_32_45.0.log is attached.

What am I missing?

install script is as follows:

sudo ./install.sh -a=CustomerNumber@CustomerKey -e /usr/lib/php5/20121212 -i /etc/php5/apache2/conf.d ped19879 8090 wxt drupal localweb

or

sudo ./install.sh -a=CustomerNumber@CustomerKey -e /usr/lib/php5/20121212 -i /etc/php5/apache2/conf.d ped19879.CorrectDomain.com 8090 wxt drupal localweb

And the correct data seems to be in /etc/php5/apache2/conf.d appdynamics_agent.ini

0 Karma

Piyush_Mundra
Communicator

Hi,

The recent logs shows 401 Unauthorized which comes when there is an issue with account name / access key. Could you please provide me following information from the environment over a SFTP account which I will share with you in a private message.

1. /etc/php5/apache2/conf.d/appdynamics_agent.ini file.

2. Zip of all the log files from agent logs folder.

3. Output of ps -ef | grep -i proxy command.

4. Screen capture showing account name and access key.

5. Output of phpinfo() from apache server with current agent configuration in place.

Please update on this ticket once you have uploaded all these details on the sftp account.

Best Regards,

Piyush

0 Karma

CommunityUser
Splunk Employee
Splunk Employee
Ok - I have the files collected.
Please send private message with sftp creds.
Thanks
0 Karma

Piyush_Mundra
Communicator

Hi,

Can you please check messages as I have already sent the SFTP details to you.

Best Regards,

Piyush

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Recieved the creds at the alternate email addy I sent.
File uploaded.

Thanks

0 Karma

Piyush_Mundra
Communicator

Hi Johnson,

The agent configuration in appdynamics_agent.ini file under /etc/php5/cli/conf.d and /etc/php5/apache2/conf.d folder are different. Could you please check attached screen capture to correctly find the account name and account access key which needs to be updated in both of these files.

The current screen capture you shared have the account details for End User Monitoring and not for the application agents.

Please get the correct details for account name and access key from controller UI, update those in /etc/php5/cli/conf.d/appdynamics_agent.ini and /etc/php5/apache2/conf.d/appdynamics_agent.ini file and restart Apache server. Please drive some load on the application and see if agent is now able to register and report to controller.

Best Regards,

Piyush

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi piyush,

Spoke with an Engeneer re my trial.

I was looking at the User Experience Account Name and Key.

I went to the Account tab on the Licence screen in the Controller and used the Name and and Access Key located there in both the appdynamic_agent.ini files.

Agent is now sucessfully connecting to the Controller.

Thanks for your help.

0 Karma
Get Updates on the Splunk Community!

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL  The Splunk AI Assistant for SPL ...

Buttercup Games: Further Dashboarding Techniques (Part 5)

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

Customers Increasingly Choose Splunk for Observability

For the second year in a row, Splunk was recognized as a Leader in the 2024 Gartner® Magic Quadrant™ for ...