Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eunomie/app-metrics-demo
https://github.com/eunomie/app-metrics-demo
docker grafana monitoring prometheus ruby
Last synced: 24 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/eunomie/app-metrics-demo
- Owner: eunomie
- Created: 2018-01-25T14:35:23.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-10-04T09:57:06.000Z (over 5 years ago)
- Last Synced: 2024-11-08T22:20:12.152Z (3 months ago)
- Topics: docker, grafana, monitoring, prometheus, ruby
- Language: Ruby
- Size: 5.86 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Applicative Metrics Demo
========================This repository contains a very simple demo of [prometheus](https://prometheus.io) and [grafana](https://grafana.com).
This demo allows to show how easy it is to scrape an application to create applicative metrics and not only resource monitoring.
This is part of a talk about _applicative metrics_ presented at [Snowcamp 2018](http://sched.co/D2nb): [slides (FR)](https://speakerdeck.com/eunomie/metriques-applicatives-avec-prometheus-et-grafana).
Run
---The demo can be run with docker-compose or docker stack (on a local swarm by example):
### docker-compose
docker-compose up
### docker stack
docker-compose build
docker stack deploy app-metrics-demo --compose-file docker-compose.ymlThis will build the three containers (prometheus, grafana and the app) and launch them.
Browse
------- http://localhost:4000/metrics exposed metrics with random data
- http://localhost:9090 prometheus
- http://localhost:3000 grafanaConfigure
---------1. Go to [grafana](http://localhost:3000) and log in with `admin`/`admin`
2. Add Datasource
- Name: `prometheus`
- Type: `Prometheus`
- URL: `http://prometheus:9090`
- Keep Access through `Proxy`
- Scrape interval: `1s`
3. Import Dashboard
- Home button
- Import Dashboard
- Upload JSON file and select `Shop.json`
- Select prometheus datasource
- Import
4. Enjoy---
```
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004Copyright (C) 2004 Sam Hocevar
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION0. You just DO WHAT THE FUCK YOU WANT TO.
```