Learning Prometheus, Grafana, and Loki with Docker

Getting Started

git clone https://github.com/dmuth/grafana-playground.git
cd grafana-playground
docker-compose up -d
docker-compose exec tools bash # Start a bash shell in the tools container
cat /mnt/config/dashboards.json | /mnt/bin/manage-dashboards.py --import --api-key API_KEY
/mnt/bin/manage-data-sources.py --api-key API_KEY
exit # Exit the tools container

Viewing Dashboards

Exporting Dashboards

docker-compose exec tools bash # Spawn a bash shell in tools container
/mnt/bin/manage-dashboards.py --export --api-key API_KEY > /mnt/dashboards.json
exit # Leave tools container

Running Ad-hoc Queries in Grafana

Manually Injecting Logs

docker-compose run logs n
{filename=~"/logs/synthetic/manual.log"}

Changing Which Hosts are Pinged

Command Line Utilities

Closing Thoughts

--

--

--

Engineer. AWS, CyberSec, DMARC, Docker, Splunk, White Mage. Staffs way too many cons. he/him. 28% Cheetah.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

PHP Form Handling

Recursion in algorithms…

Algorithmic Analysis of Cryptocurrency Market — Steps to Algorithmic Trading

Incentivized Testnet — “Seinami”

AMA Highlights at CryptoTiTans: StrongNode CEO Daniel Saito and CPO Gil Bashan talk key points on…

How to choose the right database for your system?

Action Syntax in DecleX, an elegant code, easier to read and write.

CSS Preprocessor Are Fun To Use, Especially SCSS

Me, just doing silly stuff with CSS

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Douglas Muth

Douglas Muth

Engineer. AWS, CyberSec, DMARC, Docker, Splunk, White Mage. Staffs way too many cons. he/him. 28% Cheetah.

More from Medium

Octant with Metrics Server | Kubernetes Dashboard

Industrial use cases of Openshift

GKE AutoPilot, Locust, and DataDog — The Three Horsemen of the Distributed Load Testing Apocalypse

Prometheus for Monitoring System Performance Metrics