Tactical Solution for integrating logs from XMCloud and other Sitecore SaaS offerings with Splunk - running note
Currently, Sitecore DXP product SaaS suite doesn't support Common Audit Logging (CAL) as an e2e solution. So, as part of integrating the logs with an SIEM service like Splunk, you need to custom-stitch the integration by pulling all the logs across the suite in order to send those for observability to Splunk. So, this post will be a running note where I will add information and analysis I make as part of the integration process. Note that since this is a WiP, the code and information will be tweaked for better and optimized platform integration.
Before proceeding further, here is some information from Sitecore:
========================================
- Sitecore Cloud Portal
- Sitecore XM Cloud
- Sitecore Search
- Sitecore Personalize
- Sitecore Connect
- Others
- Identity logs (user logins, user management, etc) are tracked by Sitecore Cloud Portal.
- Application specific logs are tracked by specific applications.
- The Sitecore Common Audit Logs is Sitecore' framework for integrating the product audit logs with external logging system (such as Splunk).
- To use the CAL today, you can create webhook (using the REST API). When an event is triggered from one of Sitecore' supported applications, it will trigger a notification with the event data to the webhook endpoint.
- The following products are supported today:
- Sitecore Personalize
- Sitecore CDP
- Sitecore Connect
- The following products are not supported but they will be delivered in the future (No ETA):
- Sitecore Cloud Portal
- Sitecore XM Cloud
- Sitecore Search
- Others
Step-1 - PS Script that downloads XMCloud related logs in one-place:
Since XMC is the center piece, consolidating logs from XMC environment/deploy logs is one of the important aspects so, sharing here some of the important tips/notes.
Tip-1: Use organization Client ID and Client Secret for non-interactive XMCloud login:
Tip-2: Set longer timeout for log download:
One of the issues i faced with the above script was the following abort state during download since the environment log files were in mega bytes. I raised a Sitecore support ticket but i myself was soon to realize that there is a way to increase the timeout default from 100s to any number you desire using the timeout arg. When I did the same, to 600s, the log file download(s) was successful:
The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.
Execution was cancelled. This occurs when the task is killed or requests timeout.
#########################
#########################
Although my purpose is to integrate Sitecore DXP logs, here are some blog posts generally discussing XMC logs:
https://thesitecorist.net/2022/12/19/sitecore-xm-cloud-logs/
https://www.sergevandenoever.nl/XM_Cloud_build_and_deploy_like_a_pro/
To be continued....
Comments
Post a Comment