# Magento: php-cli process not being monitored

**URL:** <https://community.dynatrace.com/t/magento-php-cli-process-not-being-monitored/18918>\
**Category:** Open Q&A\
**Tags:** php, process-groups, oneagent\
**Created:** [March 28, 2020, 9:52pm UTC](https://community.dynatrace.com/t/magento-php-cli-process-not-being-monitored/18918 "2020-03-28T21:52:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jenaja1982](https://avatars.discourse-cdn.com/v4/letter/j/ecd19e/32.png) [@jenaja1982](https://community.dynatrace.com/u/jenaja1982)\
**Post date:** [March 28, 2020, 9:52pm UTC](https://community.dynatrace.com/t/magento-php-cli-process-not-being-monitored/18918/1 "2020-03-28T21:52:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![skrystosik](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/skrystosik/32/21133_2.png) [@skrystosik](https://community.dynatrace.com/u/skrystosik)\
**Post date:** [March 29, 2020, 6:29am UTC](https://community.dynatrace.com/t/magento-php-cli-process-not-being-monitored/18918/2 "2020-03-29T06:29:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jenaja1982](https://avatars.discourse-cdn.com/v4/letter/j/ecd19e/32.png) [@jenaja1982](https://community.dynatrace.com/u/jenaja1982)\
**Post date:** [March 29, 2020, 2:18pm UTC](https://community.dynatrace.com/t/magento-php-cli-process-not-being-monitored/18918/3 "2020-03-29T14:18:50Z")

</div>

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.

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”

]

}

}

---

<div class="post-metadata">

**Author:** ![javed\_gardezi](https://avatars.discourse-cdn.com/v4/letter/j/76d3ee/32.png) [@javed\_gardezi](https://community.dynatrace.com/u/javed_gardezi)\
**Post date:** [September 9, 2021, 2:01am UTC](https://community.dynatrace.com/t/magento-php-cli-process-not-being-monitored/18918/4 "2021-09-09T02:01:42Z")

</div>

I am kind of having a similar issue with PHP-CLI Laravel console process i.e.&nbsp;  
/usr/local/bin/php /var/www/artisan queue:work redis

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [September 9, 2021, 7:14am UTC](https://community.dynatrace.com/t/magento-php-cli-process-not-being-monitored/18918/5 "2021-09-09T07:14:45Z")

</div>

[@javed\_gardezi](https://community.dynatrace.com/user/9138)&nbsp; Monitoring of php-cli has to be [explicitly enabled](https://www.dynatrace.com/support/help/shortlink/full-stack-monitoring#monitoring-php-cli).
