Difficulty: beginner
Estimated Time: 10-15 minutes

Sysdig is an open source tool for deep system visibility that comes with container native support.

Think of all the system health and performance monitoring tools you used for troubleshooting but but working together and container-aware:

  • strace
  • tcpdump
  • htop
  • iftop
  • lsof and way more... awesome sauce.

This means that you can gain visibility inside the containers, filter or aggregate metrics using container names/ids or your orchestration tool resources (Kubernetes pods, deployments, etc or Mesos tasks and Marathon apps and groups).

In this scenario, you will learn with some basic and cool examples of how to add container visibility on a simple Wordpress deployment using Docker. We are going to cover:

  • How Sysdig works, using filters and chisels.

  • Basic container and containerized processes exploration: monitoring CPU, network, file I/O, etc.

  • Troubleshooting use cases in a Wordpress scenario.

Based on Sysdig Blog articles https://sysdig.com/blog/.

This is done without having to attach to the containers and/or install anything in them.

Don’t stop now! The next scenario will only take about 10 minutes to complete.

Sysdig: Container Troubleshooting and Visibility

Step 1 of 6

Step 1 - Setup Scenario

In this scenario, you will explore a two instances Wordpress with an HAproxy load-balancer and a MySQL database. All services will be deployed using Docker containers.

Setup scenario

To begin, execute the following commands to launch the scenario:

docker run --name mysql -v /data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD='password' -d mysql docker run --name wp1 -e VIRTUAL_HOST=wp --link mysql:mysql -d wordpress docker run --name wp2 -e VIRTUAL_HOST=wp --link mysql:mysql -d wordpress docker run --name proxy -p 80:80 -e DEFAULT_HOST=wp -v /var/run/docker.sock:/tmp/docker.sock:ro -d jwilder/nginx-proxy:alpine

Automatically, a background script will setup Wordpress and start making requests against the Wordpress load balancer so we can simulate some live connections and traffic.

Note: you can access yourself to this Wordpress installation here: https://[[HOST_SUBDOMAIN]]-80-[[KATACODA_HOST]].environments.katacoda.com/