cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Abhi.Bajaj
AppDynamics Team

A Step-by-Step Guide to Setting Up and Monitoring Redis with AppDynamics on Ubuntu EC2

Monitoring your Redis instance is essential for ensuring optimal performance and identifying potential bottlenecks in real-time. In this guide, we’ll walk through the process of setting up Redis on an Ubuntu EC2 instance and configuring SplunkAppDynamics Redis Monitoring Extension to capture key metrics.

Step 1: Setting up Redis on Ubuntu

Prerequisites

  • An AWS account with an EC2 instance running Ubuntu.
  • SSH access to your EC2 instance.

Installing Redis

  1. Update package lists and install Redis:
    sudo apt-get update
    sudo apt-get install redis-server​
  2. Verify the installation:
    redis-server --version​
  3. Ensure Redis is running:
    sudo systemctl status redis​

Step 2: Installing AppDynamics Machine Agent

  1. Download the Machine Agent:
    Visit AppDynamics and download the Machine Agent for your environment.
  2. Install the Machine Agent: Follow the installation steps provided in the AppDynamics Machine Agent documentation.
    https://docs.appdynamics.com/appd/24.x/24.11/en/infrastructure-visibility/machine-agent/install-the-...
  3. Verify Installation: Start the Machine Agent and confirm it connects to your AppDynamics Controller.

Step 3: Configuring AppDynamics Redis Monitoring Extension

  1. Clone the Redis Monitoring Extension Repository
    git clone https://github.com/Appdynamics/redis-monitoring-extension.git
    cd redis-monitoring-extension
  2. Build the Extension
    sudo apt-get install openjdk-8-jdk maven
    mvn clean install
    Locate the .zip file in the target folder and extract it:
    unzip target/RedisMonitor-*.zip -d <MachineAgent_Dir>/monitors/
  3. Edit the Configuration File
    Navigate to the extracted folder and edit config.yml:
    metricPrefix: "Custom Metrics|Redis"
    
    #Add your list of Redis servers here.
    servers:
      - name: "localhost"
        host: "localhost"
        port: "6379"
        password: ""
        #encryptedPassword: ""
        useSSL: false
  4. Restart the Machine Agent
    .<MachineAgent_Dir>/bin/machine-agent

Step 4: Verifying Metrics in AppDynamics

  1. Log in to your AppDynamics Controller.
  2. Navigate to the Metric Browser.
  3. Look for metrics under the path:
Custom Metrics|Redis
AbhiBajaj_1-1733341672205.png

 

Verify that metrics like used_memory, connected_clients, and keyspace_hits are visible.

Conclusion

By combining the power of Redis with the advanced monitoring capabilities of AppDynamics, you can ensure your application remains scalable and responsive under varying workloads. Whether you’re troubleshooting an issue or optimizing performance, this setup gives you full visibility into your Redis instance.

If you found this guide helpful, please share and connect with me for more DevOps insights!

Version history
Last update:
‎12-04-2024 12:05 PM
Updated by:
Join Us On December 10
Learn how Splunk and AppDynamics are redefining observability


Register Now!

Observe and Explore
Dive into our Community Blog for the Latest Insights and Updates!


Read the blog here