mirror of
https://github.com/runyanjake/olomana.git
synced 2025-10-05 05:37:29 -07:00
Add grafana
This commit is contained in:
parent
8a7b1f4242
commit
4045dea3f8
@ -44,3 +44,4 @@ https://docs.linuxserver.io/images/docker-code-server/
|
|||||||
https://coder.com/docs/code-server/latest/install#docker
|
https://coder.com/docs/code-server/latest/install#docker
|
||||||
https://hub.docker.com/r/linuxserver/code-server
|
https://hub.docker.com/r/linuxserver/code-server
|
||||||
https://github.com/coder/code-server/blob/main/docs/FAQ.md#can-i-store-my-password-hashed
|
https://github.com/coder/code-server/blob/main/docs/FAQ.md#can-i-store-my-password-hashed
|
||||||
|
|
||||||
|
@ -4,6 +4,12 @@ networks:
|
|||||||
traefik:
|
traefik:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
name: traefik
|
name: traefik
|
||||||
|
grafana:
|
||||||
|
driver: bridge
|
||||||
|
name: grafana
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
prometheus_data: {}
|
||||||
|
|
||||||
services:
|
services:
|
||||||
traefik:
|
traefik:
|
||||||
@ -44,3 +50,57 @@ services:
|
|||||||
- traefik.http.routers.code.tls.certresolver=lets-encrypt
|
- traefik.http.routers.code.tls.certresolver=lets-encrypt
|
||||||
- traefik.http.services.code.loadbalancer.server.port=8443
|
- traefik.http.services.code.loadbalancer.server.port=8443
|
||||||
|
|
||||||
|
grafana:
|
||||||
|
image: grafana/grafana
|
||||||
|
container_name: grafana
|
||||||
|
restart: unless-stopped
|
||||||
|
depends_on:
|
||||||
|
- node_exporter
|
||||||
|
- prometheus
|
||||||
|
networks:
|
||||||
|
- grafana
|
||||||
|
- traefik
|
||||||
|
user: "1003"
|
||||||
|
volumes:
|
||||||
|
- ./grafana/grafana.ini:/etc/grafana/grafana.ini
|
||||||
|
- /pwspool/software/grafana:/var/lib/grafana
|
||||||
|
labels:
|
||||||
|
- traefik.http.routers.grafana.rule=Host(`grafana.whitney.rip`)
|
||||||
|
- traefik.http.routers.grafana.tls=true
|
||||||
|
- traefik.http.routers.grafana.tls.certresolver=lets-encrypt
|
||||||
|
- traefik.http.services.grafana.loadbalancer.server.port=3000
|
||||||
|
|
||||||
|
node_exporter:
|
||||||
|
image: quay.io/prometheus/node-exporter:latest
|
||||||
|
container_name: node_exporter
|
||||||
|
restart: unless-stopped
|
||||||
|
depends_on:
|
||||||
|
- prometheus
|
||||||
|
networks:
|
||||||
|
- grafana
|
||||||
|
pid: host
|
||||||
|
user: "1003:1005"
|
||||||
|
command:
|
||||||
|
- "--path.rootfs=/host"
|
||||||
|
volumes:
|
||||||
|
- "/:/host:ro,rslave"
|
||||||
|
labels:
|
||||||
|
- traefik.enable=false
|
||||||
|
|
||||||
|
prometheus:
|
||||||
|
image: prom/prometheus:latest
|
||||||
|
container_name: prometheus
|
||||||
|
restart: unless-stopped
|
||||||
|
networks:
|
||||||
|
- grafana
|
||||||
|
volumes:
|
||||||
|
- "./grafana/prometheus.yml:/etc/prometheus.yml"
|
||||||
|
- prometheus_data:/prometheus
|
||||||
|
command:
|
||||||
|
- "--config.file=/etc/prometheus.yml"
|
||||||
|
- "--storage.tsdb.path=/prometheus"
|
||||||
|
- "--web.console.libraries=/usr/share/prometheus/console_libraries"
|
||||||
|
- "--web.console.templates=/usr/share/prometheus/consoles"
|
||||||
|
labels:
|
||||||
|
- traefik.enable=false
|
||||||
|
|
||||||
|
2
monolith/grafana/.gitignore
vendored
Normal file
2
monolith/grafana/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
grafana.ini
|
||||||
|
prometheus.yml
|
62
monolith/grafana/grafana.ini.BLANKED
Executable file
62
monolith/grafana/grafana.ini.BLANKED
Executable file
@ -0,0 +1,62 @@
|
|||||||
|
[paths]
|
||||||
|
[server]
|
||||||
|
[database]
|
||||||
|
[datasources]
|
||||||
|
[remote_cache]
|
||||||
|
[dataproxy]
|
||||||
|
[analytics]
|
||||||
|
[security]
|
||||||
|
admin_user = admin
|
||||||
|
admin_password = adminpassword
|
||||||
|
[snapshots]
|
||||||
|
[dashboards]
|
||||||
|
[users]
|
||||||
|
default_theme = dark
|
||||||
|
[auth]
|
||||||
|
signout_redirect_url = www.example.com
|
||||||
|
[auth.anonymous]
|
||||||
|
enabled = true
|
||||||
|
[auth.github]
|
||||||
|
[auth.gitlab]
|
||||||
|
[auth.google]
|
||||||
|
[auth.grafana_com]
|
||||||
|
[auth.azuread]
|
||||||
|
[auth.okta]
|
||||||
|
[auth.generic_oauth]
|
||||||
|
[auth.basic]
|
||||||
|
[auth.proxy]
|
||||||
|
[auth.jwt]
|
||||||
|
[auth.ldap]
|
||||||
|
[aws]
|
||||||
|
[smtp]
|
||||||
|
[emails]
|
||||||
|
[log]
|
||||||
|
[log.console]
|
||||||
|
[log.file]
|
||||||
|
[log.syslog]
|
||||||
|
[log.frontend]
|
||||||
|
[quota]
|
||||||
|
[alerting]
|
||||||
|
[annotations]
|
||||||
|
[annotations.dashboard]
|
||||||
|
[annotations.api]
|
||||||
|
[explore]
|
||||||
|
[metrics]
|
||||||
|
[metrics.environment_info]
|
||||||
|
[metrics.graphite]
|
||||||
|
[grafana_com]
|
||||||
|
[tracing.jaeger]
|
||||||
|
[external_image_storage]
|
||||||
|
[external_image_storage.s3]
|
||||||
|
[external_image_storage.webdav]
|
||||||
|
[external_image_storage.gcs]
|
||||||
|
[external_image_storage.azure_blob]
|
||||||
|
[external_image_storage.local]
|
||||||
|
[rendering]
|
||||||
|
[panels]
|
||||||
|
[plugins]
|
||||||
|
[plugin.grafana-image-renderer]
|
||||||
|
[enterprise]
|
||||||
|
[feature_toggles]
|
||||||
|
[date_formats]
|
||||||
|
[expressions]
|
14
monolith/grafana/prometheus.yml.BLANKED
Normal file
14
monolith/grafana/prometheus.yml.BLANKED
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
global:
|
||||||
|
scrape_interval: 15s
|
||||||
|
external_labels:
|
||||||
|
monitor: 'codelab-monitor'
|
||||||
|
scrape_configs:
|
||||||
|
- job_name: 'prometheus'
|
||||||
|
scrape_interval: 5s
|
||||||
|
static_configs:
|
||||||
|
- targets: ['localhost:9090']
|
||||||
|
- job_name: 'node_exporter'
|
||||||
|
scrape_interval: 5s
|
||||||
|
static_configs:
|
||||||
|
- targets: ['node_exporter:9100']
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user