Grafana Influx Telegraf, versión 1.8
This commit is contained in:
parent
025de1c91b
commit
d3090e3214
|
@ -0,0 +1,25 @@
|
|||
# Installation
|
||||
|
||||
```
|
||||
git clone https://github.com/atareao/self-hosted.git
|
||||
cd self-hosted/dnote
|
||||
cp sample.env .env
|
||||
sed -i "s/grafana.tudominio.es/el_fqdn_que_quieras/g" .env
|
||||
```
|
||||
|
||||
Si quieres puedes cambiar tambiar las variables correspondientes al usuario y administrador de `GRAFANA`, y en el caso de que quieras añadir masa usuarios, tendrás que modificar la variable `GF_SECURITY_ADMIN_PASSWORD`.
|
||||
|
||||
A la hora de levantar el servicio dependerá del proxy inverso que hayas seleccionado. Si has elegido Caddy, simplemente,
|
||||
|
||||
```
|
||||
docker-compose -f docker-compose.yml -f docker-compose.caddy.yml up -d
|
||||
docker-compose logs -f
|
||||
```
|
||||
|
||||
Mientras que si has elegido Traefik,
|
||||
|
||||
```
|
||||
docker-compose -f docker-compose.yml -f docker-compose.traefik.yml up -d
|
||||
docker-compose logs -f
|
||||
```
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
version: '3.7'
|
||||
|
||||
services:
|
||||
|
||||
grafana:
|
||||
labels:
|
||||
- caddy="${FQDN}"
|
||||
- caddy.reverse_proxy="{{upstreams 3000}}"
|
||||
networks:
|
||||
- proxy
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
external: true
|
|
@ -0,0 +1,23 @@
|
|||
version: '3.7'
|
||||
|
||||
services:
|
||||
|
||||
grafana:
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.services.grafana.loadbalancer.server.port=3000
|
||||
- traefik.http.routers.grafana.entrypoints=http
|
||||
- traefik.http.routers.grafana.rule=Host(`${FQDN}`)
|
||||
- traefik.http.middlewares.grafana-https-redirect.redirectscheme.scheme=https
|
||||
- traefik.http.routers.grafana.middlewares=grafana-https-redirect
|
||||
- traefik.http.routers.grafana-secure.entrypoints=https
|
||||
- traefik.http.routers.grafana-secure.rule=Host(`${FQDN}`)
|
||||
- traefik.http.routers.grafana-secure.tls=true
|
||||
- traefik.http.routers.grafana-secure.tls.certresolver=myresolver
|
||||
networks:
|
||||
- proxy
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
external: true
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
version: '3.7'
|
||||
|
||||
services:
|
||||
|
||||
influxdb:
|
||||
image: influxdb:1.8
|
||||
container_name: influxdb
|
||||
init: true
|
||||
environment:
|
||||
- GF_INSTALL_PLUGINS
|
||||
- GF_SECURITY_ADMIN_USER
|
||||
- GF_SECURITY_ADMIN_PASSWORD
|
||||
- GF_USERS_ALLOW_SIGN_UP
|
||||
volumes:
|
||||
- data_influxdb:/var/lib/influxdb
|
||||
networks:
|
||||
- internal
|
||||
|
||||
telegraf:
|
||||
image: telegraf:latest
|
||||
container_name: telegraf
|
||||
init: true
|
||||
links:
|
||||
- influxdb
|
||||
volumes:
|
||||
- ./telegraf.conf:/etc/telegraf/telegraf.conf:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
- /usr/lib/sysstat:/usr/lib/sysstat
|
||||
networks:
|
||||
- internal
|
||||
|
||||
grafana:
|
||||
image: grafana/grafana:latest
|
||||
container_name: grafana
|
||||
init: true
|
||||
environment:
|
||||
- INFLUXDB_DATA_ENGINE
|
||||
- INFLUXDB_REPORTING_DISABLED
|
||||
user: "0"
|
||||
links:
|
||||
- influxdb
|
||||
volumes:
|
||||
- data_grafana:/var/lib/grafana
|
||||
networks:
|
||||
- internal
|
||||
|
||||
volumes:
|
||||
data_influxdb: {}
|
||||
data_grafana: {}
|
||||
|
||||
networks:
|
||||
internal:
|
|
@ -0,0 +1,4 @@
|
|||
GF_INSTALL_PLUGINS=grafana-clock-panel,briangann-gauge-panel,natel-plotly-panel,grafana-simple-json-datasource
|
||||
GF_SECURITY_ADMIN_USER=lorenzo
|
||||
GF_SECURITY_ADMIN_PASSWORD=nW82DeEpmhSNz5rTdadCXpZuBEF8zZ7avA
|
||||
GF_USERS_ALLOW_SIGN_UP=FALSE
|
|
@ -0,0 +1,2 @@
|
|||
INFLUXDB_DATA_ENGINE=tsm1
|
||||
INFLUXDB_REPORTING_DISABLED=false
|
|
@ -0,0 +1,7 @@
|
|||
FQDN=grafana.tudominio.es
|
||||
GF_INSTALL_PLUGINS=grafana-clock-panel,briangann-gauge-panel,natel-plotly-panel,grafana-simple-json-datasource
|
||||
GF_SECURITY_ADMIN_USER=admin
|
||||
GF_SECURITY_ADMIN_PASSWORD=adminpassword
|
||||
GF_USERS_ALLOW_SIGN_UP=FALSE
|
||||
INFLUXDB_DATA_ENGINE=tsm1
|
||||
INFLUXDB_REPORTING_DISABLED=false
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue