question

Jadumani J. avatar image
Jadumani J. asked ·

Magento: php-cli process not being monitored

Hi,

I'm running Magento using LAMP stack. DT detects a process "PHP-CLI" but gives an error that "Dynatrace OneAgent has no access to this process. Restart the process with PID(s) 24384, 24378, 24380, and 24382 to start its monitoring"

When I killed the above process, they restarted automatically as the cron job (using the process) is scheduled. Still then I'm getting the same error. I restarted apache, still no luck.

Anything I can do make it work?


The meta data for the process is as below:

Command line args: /usr/bin/php7.2 /var/www/html/bin/magento queue:consumers:start product_action_attribute.website.update --single-thread --max-messages=10000

EXE name: php*

EXE path: /usr/bin/php*

Main technology: PHP

PHP script: /var/www/html/bin/magento

PHP working directory: /home/magento

oneagentprocess groupsphp
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

1 Answer

Sebastian K. avatar image
Sebastian K. answered ·

Do you have selinux or something like that co figured? If prices is sandboxed and started via cron it may be inaccessible by Agent.

I suggest downloading support archive from this agent and check logs. There may be more information about issue you have here. If there will not be any clue I suggest support ticket. Guy from dynatrace can enable some debug flags and collect more data :)

Sebastian

1 comment Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Thanks.

No, SELinux is not configured. The cron job basically runs to check price rules, reindexing, alerts, emails etc. I downloaded the process support archive (attached) but not able to interpret much.

PHP-CLI process support archive

monitoring_state.json file reads as below:

{

"state": {

"injectionFailed": false,

"outdatedAgent": false,

"processAvailable": true,

"noInjectionAvailable": false,

"missingAgents": [

"PHP"

],

"processGroupConfigState": {

"state": "CONFIG_ACTIVE",

"isBadVersion": false

},

"extendedInjectionSupportState": {

"injectionSupportState": "SUPPORTED"

},

"infrastructureOnly": false,

"agentReportedState": {

"injectionFailed": false,

"agentInjectionInformation": {

"actualAgentInjectionInformation": {

"configRevision": 1585429818098,

"processAgentInjectionInformation": {

"agentPresent": true,

"agentVersion": "1.187.154.20200303-135131",

"mmapPresent": true

},

"specialAgentInjectionInformation": {

"injectionDecisions": {

"PHP": {

"agentType": "PHP",

"injectionDecision": "INJECTION_DECISION_AGENTTYPE_BASED_INJECTION_DISABLED",

"injectionDecisionId": 10,

"injectionStatus": "INJECTION_STATUS_PENDING"

}

},

"injectableTechnologies": {

"PHP_CLI": {

"type": "PHP_CLI",

"version": "7.2.29"

}

},

"missingMonitoringReasons": {}

}

}

},

"agentInjectionInformationPerPid": {

"infoPerPid": {}

},

"fallbackConfigState": {

"state": "CONFIG_ACTIVE",

"isBadVersion": false

},

"aixKernelExtensionsSupport": false

},

"isBlacklisted": false,

"isManuallyInjected": false,

"hasRestartableParentProcess": false,

"osType": "OS_TYPE_LINUX",

"lastSeenDiffMs": 216976,

"agentReportedPotentiallyInjected": false

},

"extendedProcessGroupConfigState": {

"state": "CONFIG_ACTIVE",

"isBadVersion": false

},

"agentTechnologyTypes": [

"PHP"

],

"agentAvailable": true,

"areAllAgentsInjected": false,

"isRestartRequired": true,

"pgInjectionRuleCheck": {

"input": {

"PG_ID_CALC_INPUT_KEY_PHP_CLI_SCRIPT_PATH": "/var/www/html/bin/magento",

"PG_ID_CALC_INPUT_KEY_PHP_CLI_WORKING_DIR": "/home/magento",

"PG_ID_CALC_INPUT_KEY_EXE_PATH": "/usr/bin/php*",

"PG_ID_CALC_INPUT_KEY_EXE_NAME": "php*",

"PG_ID_CALC_INPUT_KEY_COMMAND_LINE_ARGS": "/usr/bin/php7.2 /var/www/html/bin/magento queue:consumers:start product_action_attribute.website.update --single-thread --max-messages\u003d10000"

},

"result": "noMatch"

},

"osAgentInjections": {

"AGENT_TYPE_DOTNET": [

"IIS"

],

"AGENT_TYPE_JAVA": [

"ON"

],

"AGENT_TYPE_PHP": [

"APACHE",

"PHP_FPM"

],

"AGENT_TYPE_LOG_ANALYTICS": [

"ON"

],

"AGENT_TYPE_NGINX": [

"ON"

],

"AGENT_TYPE_IIS": [

"ON"

],

"AGENT_TYPE_PLUGIN": [

"ON"

],

"AGENT_TYPE_NET": [

"ON"

],

"AGENT_TYPE_NODEJS": [

"ON"

],

"AGENT_TYPE_APACHE": [

"ON"

],

"AGENT_TYPE_GO": [

"ON"

],

"AGENT_TYPE_SDK": [

"ON"

]

},

"hostInjections": {},

"hostExperimentalInjections": {},

"mergedInjections": {

"AGENT_TYPE_JAVA": [

"ON"

],

"AGENT_TYPE_NGINX": [

"ON"

],

"AGENT_TYPE_IIS": [

"ON"

],

"AGENT_TYPE_LOG_ANALYTICS": [

"ON"

],

"AGENT_TYPE_GO": [

"ON"

],

"AGENT_TYPE_SDK": [

"ON"

],

"AGENT_TYPE_PHP": [

"APACHE",

"PHP_FPM"

],

"AGENT_TYPE_NET": [

"ON"

],

"AGENT_TYPE_PLUGIN": [

"ON"

],

"AGENT_TYPE_APACHE": [

"ON"

],

"AGENT_TYPE_NODEJS": [

"ON"

],

"AGENT_TYPE_DOTNET": [

"IIS"

]

}

}

0 Likes 0 · ·