Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xiaopeng163/docker-compose-tpg
Docker compose for Telegraf, Prometheus and Grafana
https://github.com/xiaopeng163/docker-compose-tpg
Last synced: 2 months ago
JSON representation
Docker compose for Telegraf, Prometheus and Grafana
- Host: GitHub
- URL: https://github.com/xiaopeng163/docker-compose-tpg
- Owner: xiaopeng163
- Created: 2020-08-25T22:20:09.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-06-19T10:02:48.000Z (7 months ago)
- Last Synced: 2024-08-01T15:35:56.859Z (6 months ago)
- Language: Python
- Homepage:
- Size: 2.24 MB
- Stars: 25
- Watchers: 3
- Forks: 11
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Telegraf + Prometheus + Grafana Local Testing Environments
Setup learning environment for Telegraf, Prometheus and Grafana with docker-compose. (include SNMP simulators)
## Requirements
install docker https://docs.docker.com/get-docker/
install docker-compose https://docs.docker.com/compose/install/
`docker` and `docker-compose` installed.
```
$ docker version
Client: Docker Engine - Community
Version: 19.03.13
API version: 1.40
Go version: go1.13.15
Git commit: 4484c46d9d
Built: Wed Sep 16 17:02:52 2020
OS/Arch: linux/amd64
Experimental: falseServer: Docker Engine - Community
Engine:
Version: 19.03.13
API version: 1.40 (minimum version 1.12)
Go version: go1.13.15
Git commit: 4484c46d9d
Built: Wed Sep 16 17:01:20 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.3.7
GitCommit: 8fba4e9a7d01810a393d5d25a3621dc101981175
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
docker-init:
Version: 0.18.0
GitCommit: fec3683
$ docker compose --version
Docker version 19.03.13, build 4484c46d9d
$
```## Quick Start
```shell
./start.sh
```### Grafana
http://127.0.0.1:3000 username:password admin:admin
### Scaling
```shell
$ export COMPOSE_PROJECT_NAME=demo
$ docker-compose up -d --scale cisco_router=3 --scale palo_alto=3
grafana is up-to-date
telegraf is up-to-date
prometheus is up-to-date
Creating demo_cisco_router_2 ... done
Creating demo_cisco_router_3 ... done
Creating demo_palo_alto_2 ... done
Creating demo_palo_alto_3 ... done
```change telegraf cfg
`telegraf/telegraf.conf`
```
[[inputs.snmp]]
agents = [
"demo_cisco_router_1:161",
"demo_cisco_router_2:161",
"demo_cisco_router_3:161",
"demo_palo_alto_1:161",
"demo_palo_alto_2:161",
"demo_palo_alto_3:161"
]
```restart telegraf
```shell
docker restart telegraf
```## Stop and cleanup
```shell
./stop.sh
```