Expand my Community achievements bar.

Integrate splunk with aemaacs

Avatar

Level 4

Hello guys I want to integrate splunk with aemaacs. I establishing splunk enterprise edition in VM. can anyone provide the steps i should follow for settingup splunk in vm and integrating it with aemaacs.

6 Replies

Avatar

Level 4

I have some questions.

1.so do i need 2 ssl certificates? one for HEC endpoint and one for host machine which is a VM.

2. in aem config. should i mention HEC endpoint or host address? 

In blog you mentioned it is saying hec endpoint adderess. check here

https://blog.arborydigital.com/splunk-setup-aem-cloud-service-aemaacs#:~:text=Splunk%20HEC%20endpoin... .

but in docs it mentions host address. check here

https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/dev...

 

I am really confused about configuration please help with it. If possible give me steps about setting up the splunk and aem from scrath . I will be real helpful.

 

Thank you very much.

syed ali.

Avatar

Level 3

Hey Syed -
On your question on SSL certificates, I should have probably made that clearer in the blog post - because Splunk is listening on two different ports (one for the Splunk HEC and one for Splunk Web) those are two different SSL configurations.  They can share the same certificate if you want, but both have to be configured to make it work.  And Adobe does prefer that you keep HEC on 443, even though I've seen it if you plead your case nicely, they'll sometimes let you use an alternate port.  Let me know if that works, I'll definitely update the article accordingly.

Avatar

Level 4

1.is it ok to not get any domain name or ssl certificate for vm in which my splunk is installed for integration with aemaacs?

2. how to open a ticket with adobe support?

 

I am totally new with this things . please provide detailed explaination.

 

Thank you.

Avatar

Level 2

Integrating Splunk with AEM as a Cloud Service (AEMaaCS) involves setting up Splunk on a Virtual Machine (VM) and configuring it to gather and process logs and metrics from AEMaaCS. The setup process will generally involve the following steps:

1. Setting up Splunk Enterprise on VM

Step 1: Install Splunk Enterprise on the VM

  1. Download Splunk Enterprise:

    • Go to the Splunk Downloads page and select the version for your operating system (Linux/Windows/Mac). For a VM setup, you’ll typically choose a Linux version (e.g., .rpm for RHEL/CentOS or .deb for Ubuntu).
  2. Install Splunk on the VM:

    • For Linux (Debian-based systems like Ubuntu):
      wget -O splunk-8.x.x-xxxxxx-Linux-x86_64.deb https://download.splunk.com/path/to/splunk-package.deb
      sudo dpkg -i splunk-8.x.x-xxxxxx-Linux-x86_64.deb
    • For RHEL/CentOS (RPM-based systems):
      wget -O splunk-8.x.x-xxxxxx-Linux-x86_64.rpm https://download.splunk.com/path/to/splunk-package.rpm
      sudo rpm -i splunk-8.x.x-xxxxxx-Linux-x86_64.rpm
  3. Start Splunk: After installation, you can start Splunk by running:

    sudo /opt/splunk/bin/splunk start

    The default login credentials are typically admin and changeme, which should be changed after your first login.

  4. Set Splunk to Start on Boot:

    sudo /opt/splunk/bin/splunk enable boot-start

Step 2: Configure Splunk

  1. Access Splunk Web Interface by navigating to http://<vm-ip>:8000 in your browser.
  2. Log in using the admin credentials you set up.
  3. Change the admin password after your first login.
  4. Set up indexing, monitoring, and data inputs. You'll need to configure the Splunk instance to accept incoming logs and data from AEMaaCS.

2. Integrating AEMaaCS with Splunk

Step 1: Install the Splunk HTTP Event Collector (HEC) on Splunk

  1. Enable the HTTP Event Collector:

    • In Splunk, go to Settings > Data Inputs and click on HTTP Event Collector.
    • Click New Token to create a new token. This token will be used to authenticate AEM with Splunk.
    • Provide a meaningful name (e.g., "AEM Integration") and configure the token settings.
  2. Configure the HTTP Event Collector:

    • Enable the HTTP Event Collector (HEC) if it’s not already.
    • Configure the port (usually 8088), and ensure that it’s open in your VM's firewall settings.
    • Make a note of the token value generated by Splunk for the HTTP Event Collector. This token will be used to authenticate AEMaaCS to Splunk.

Step 2: Configure AEMaaCS to Send Logs to Splunk

To send logs from AEMaaCS to Splunk, you can use Splunk Universal Forwarder or the HTTP Event Collector (HEC). Since AEMaaCS is a cloud service, the most suitable way is to use HEC or log forwarding via a logging service (e.g., Loggly or AWS CloudWatch).

Here’s how to configure AEMaaCS to send logs to Splunk:

  1. Set up Splunk HTTP Event Collector (HEC):

    • Log into AEMaaCS and configure the logging mechanism. AEMaaCS typically uses the Sling Logging framework and supports log forwarding.
    • In your AEMaaCS instance, go to /etc/sling/logging configuration, and set up a custom logging configuration to send logs to Splunk HEC.
  2. Configure AEMaaCS to Forward Logs to Splunk:

    • Use the Splunk HEC API to forward logs directly from AEMaaCS to Splunk.
    • This will involve setting up a logging framework in AEMaaCS that pushes log data to the Splunk HEC endpoint.

    Example configuration for a logger in AEMaaCS:

    {
      "logger": {
        "level": "INFO",
        "handlers": [
          {
            "type": "splunk_hec",
            "url": "http://<splunk-ip>:8088",
            "token": "<your-hec-token>",
            "source": "aem-logs"
          }
        ]
      }
    }
  3. Configure AEM Logging Services:

    • In AEMaaCS, configure the Sling Logger or other appropriate loggers to send log data via HEC. You may need to create a custom handler if one doesn’t already exist. Ensure the handler uses the token and endpoint you created in the Splunk HEC setup.

Step 3: Verify Data Flow into Splunk

  1. Once the AEMaaCS logs are being forwarded to Splunk via HEC, you can verify the log entries are showing up by querying Splunk's index. In the Splunk web interface, go to the Search & Reporting app and query logs to see if the data from AEMaaCS is appearing.

    Example query in Splunk:

    index="aem_logs" source="aem-logs"
  2. Monitor Logs:

    • You can create custom dashboards in Splunk to monitor the AEM logs. This can include performance metrics, error logs, and other key data points like request/response times, page load times, etc.

3. Set Up Alerts and Dashboards in Splunk

After AEMaaCS logs are flowing into Splunk, you can create customized alerts and dashboards for real-time monitoring and proactive alerting based on certain conditions (like errors, performance issues, or slow response times). For example:

  1. Create a Dashboard:

    • You can create a custom dashboard in Splunk that visualizes logs from AEM, such as error logs, page load time, etc.
    • Use Splunk Search Processing Language (SPL) to define your queries.
  2. Set up Alerts:

    • Configure alerts in Splunk for specific log conditions like errors or high response times to get notified when issues arise.

4. Optional: Use Splunk Apps for AEM

You can also look for Splunk Apps that are designed to integrate with Adobe Experience Manager (AEM). These apps typically come pre-configured with dashboards and searches tailored for AEM. This can help reduce the effort involved in setting up a complete monitoring solution.

Some popular Splunk Apps might include:

  • Splunk for AEM (Adobe Experience Manager): Available on Splunkbase, these apps can simplify integration.
  • Splunk App for Web Analytics: Useful for monitoring AEM-related analytics.

Conclusion

To integrate Splunk with AEMaaCS, you need to:

  1. Install Splunk on your VM and set it up to collect data.
  2. Configure AEMaaCS to send logs and metrics to Splunk, using HTTP Event Collector (HEC) or other logging methods.
  3. Monitor and visualize the data in Splunk through dashboards and alerts.

While Splunk offers a lot of flexibility for logging and monitoring, the key challenge with AEMaaCS (being a cloud-native solution) is ensuring that logs are properly forwarded from AEMaaCS to Splunk using the right data input methods.

Avatar

Level 2

Adobe suggesting Log forwarding with splunk with below yaml file

kind: "LogForwarding"
version: "1"
metadata:
envTypes: ["dev"]
data:
splunk:
default:
enabled: true
host: "splunk-host.example.com"
token: "${{SPLUNK_TOKEN}}"
index: "aemaacs"

 

https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/dev...

Kindly suggest why we need to create Configure AEM Logging Services

AEM AS Cloud service suggest with above yaml however that is not working . I am also checking with Adobe