Hey everyone! I'm working on setting up monitoring for Kubernetes and I've been tasked with testing out Thanos for metrics and Loki for logs. To get started, I need a sample application that can generate logs and metrics for me to monitor. Any suggestions for simple applications I can deploy for testing? Thanks for your help!
4 Answers
For something really simple, you can run BusyBox and use a command that echoes a log line to standard output every second. You can set it up like this: `/bin/bash -c 'i=0; while true; echo "$(date) test log line $i"; i=$((i+1)); sleep 1; done'`. It's easy and generates a steady stream of logs to work with.
If you're looking for something a bit more set up, the team at Tigera has this storefront web app deployment template. It includes a front-end pod, two microservices, and a backend pod that all communicate. It's great for testing things like network policies with Calico or Cilium, plus it provides a basic setup for web app monitoring. You can deploy it with this command: `kubectl apply -f https://installer.calicocloud.io/storefront-demo.yaml`. Super easy!
The Google Cloud Platform team has an even more detailed version of this for more complex monitoring, including L7 activity and Istio monitoring—check it out at https://github.com/GoogleCloudPlatform/microservices-demo.
Check out the OpenTelemetry demo! It was created specifically for situations like this, so it should give you a good starting point for testing your metrics and logs.
You could try deploying Nginx and then use curl to hit various endpoints to generate 200 and 400 status codes. If you're looking for something else, there's a project called Flog on GitHub that might be worth checking out. Just a heads up, make sure your deployments pass CVE checks if your workplace is strict about security! Also, consider looking into the OpenTelemetry collector for more options.
Thank you! I'll check it out.

Thanks! I'll keep it in mind.