AEM Cloud Service Log Tailing: Troubleshooting and Monitoring Tips
Tailing AEM (Adobe Experience Manager) logs in AEM Cloud Service is a common task for troubleshooting and monitoring purposes. AEM Cloud Service is a managed service provided by Adobe that runs AEM in a cloud environment, and accessing logs may differ slightly from an on-premises setup. Here's a general process to tail AEM logs in AEM Cloud Service:
So, here are the steps to go through to tail logs on an AEM as a Cloud Service environment:
Step 1: Set up Adobe I/O CLI
Launch the Command Prompt/Terminal and install Adobe I/O CLI. More details on Adobe IO CLI here
Check whether Node is installed or not if it's not please install. More details on installation Node
$ npm install -g @adobe/aio-cli
Post Install of adobe/ aio-cli
$ aio info
output: -
rj00752505@BGINCHAMLP00792 ~ % aio info
System:
OS: macOS 13.4.1
CPU: (10) arm64 Apple M1 Pro
Memory: 87.38 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Virtualization:
Docker: Not Found
npmGlobalPackages:
@adobe/aio-cli: 9.3.0
Step 2: Configure the Adobe IO Cloud Manager CLI Plugin
Installation
aio plugins:install @adobe/aio-cli-plugin-cloudmanager
Updating
$ aio plugins:update
Step 3: Authentication
a) Browser-Based Authentication - Browser-based authentication starts by running this command.
aio auth:login
This command will open a browser window in which you will authenticate using your Adobe Identity.
Note: You can choose any type of authentication***.***
b) Service Account Authentication To use a service account authentication, an integration (aka project) must be created in the Adobe I/O Console which has the Cloud Manager service.
The required type of server-to-server authentication
{
"client_id": "value from your CLI integration (String)",
"client_secret": "value from your CLI integration (String)",
"jwt_payload": { value from your CLI integration (JSON Object Literal) },
"token_exchange_url": "https://ims-na1.adobelogin.com/ims/exchange/jwt"
}
Step 4: Setting Up the Default Program and Default Environment
To Find the Env and Program id - Navigate to my.cloudmanager.adobe.com, you’ll see a URL after logging in like “https://experience.adobe.com/#/@the_cool_name_of_my_company/cloud-manager/home.html/program/{PROGRAM_NUMBER}”
$ aio config:set cloudmanager_programid 34562 // setting up default program
$ aio config:set cloudmanager_environmentid 124551 //setting up default env
Useful Command
- To List list all the program
$ aio cloudmanager:list-programs
Program Id Name Enabled
────────── ───────────────────── ───────
43674 sandbox-B2c true
34562 sandbox-B2b true
- To List all the Environments
$ aio cloudmanager:list-environments
Environment Id Name Type Description
────────────── ───────────────────────────────────── ───── ─────────────────
124551 demo dev dev environment n
9845628 demo-prod prod prod This is prod env.
- To List list all the log-options
$ aio cloudmanager:list-available-log-options 124551
Environment Id Service Name
────────────── ────────────────── ─────────────
124551 preview_dispatcher httpdaccess
124551 preview_dispatcher httpderror
124551 preview_dispatcher aemdispatcher
124551 author aemaccess
124551 author aemerror
124551 author aemrequest
4)To Tailing the Author error log
$ aio cloudmanager:tail-log 121351 author aemerror
25.09.2023 15:34:56.428 [cm-p33452-e121351-aem-author-54c7ddc56c-vf8vb] *INFO* [sling-oak-observation-5] com.adobe.cq.ups.user.utils.UserCreationListener UPS Feature is disabled
25.09.2023 15:34:56.452 [cm-p33452-121351-aem-author-54c7ddc56c-vf8vbJ *INFO* [188.24.112.253 [1695656096450] GET /mnt/overlay/granite/ui/content/shell/header/actions/pulse.data.jsonHTTP/1.11com.day.ca.wcm.core.imp1.designer.searchPathlimiter
Search path limiter configured with searchPathLimiterFeatureToggleOn: true and searchPathThreshold: true
25.09.2023 15:34:56.469 [cm-p33452-e121351-aem-author-54c7ddc56c-vf8vb] *INFO* [188.24.112.253 [1695656096468] GET /mnt/overlay/granite/ui/content/shell/header/actions/pulse.data.jsonHTTP/1.11com.day.cq.wcm.core.imp1.designer.SearchPathLimiter
Search path limiter configured with searchPathLimiterFeatureToggleOn: true and searchPathThreshold: true.
Similarly, you can tail any logs.
If you have any questions, please don't hesitate to ask! Linkedin
Subscribe to my newsletter
Read articles from Raushan Jaiswal directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Raushan Jaiswal
Raushan Jaiswal
AEM Enthusiast