mirror of
https://github.com/lalanza808/xmr.sh.git
synced 2025-05-12 16:42:12 -04:00
add grafana labels
This commit is contained in:
parent
1d641da19b
commit
720974857d
9 changed files with 5574 additions and 3 deletions
4
.env
4
.env
|
@ -18,3 +18,7 @@ TOR_HTTP_PORT=80
|
|||
|
||||
EXPLORER_TAG=v0.17
|
||||
EXPLORER_PORT=8081
|
||||
|
||||
GRAFANA_TAG=7.3.10
|
||||
|
||||
PROMETHEUS_TAG=v2.22.2
|
||||
|
|
|
@ -13,9 +13,9 @@ Tested on:
|
|||
|
||||
- [x] Add wizard for DNS domain selection.
|
||||
- [x] Status and node info at finish.
|
||||
- [ ] Mainnet / Stagenet / Testnet selection
|
||||
- [x] Mainnet / Stagenet / Testnet selection
|
||||
- [ ] Pruning option
|
||||
- [ ] Clearnet TLS port selection
|
||||
- [x] Clearnet TLS port selection
|
||||
- [ ] Uninstall script
|
||||
- [ ] Documentation
|
||||
- [x] Make tor service optional
|
||||
|
@ -23,4 +23,4 @@ Tested on:
|
|||
- [ ] Grafana dashboard
|
||||
- [ ] arm64 support for all images.
|
||||
- [ ] monerod-lws support.
|
||||
- [ ] monerod-proxy support for fallback nodes.
|
||||
- [ ] monerod-proxy support.
|
||||
|
|
5426
config/grafana/dashboards/monero.json
Normal file
5426
config/grafana/dashboards/monero.json
Normal file
File diff suppressed because it is too large
Load diff
29
config/grafana/grafana.ini
Normal file
29
config/grafana/grafana.ini
Normal file
|
@ -0,0 +1,29 @@
|
|||
[analytics]
|
||||
reporting_enabled = false
|
||||
check_for_updates = false
|
||||
|
||||
|
||||
[auth]
|
||||
disable_login_form = true
|
||||
|
||||
|
||||
[auth.anonymous]
|
||||
enabled = true
|
||||
org_role = Admin
|
||||
|
||||
|
||||
[dashboards]
|
||||
min_refresh_interval = 1m
|
||||
|
||||
|
||||
[paths]
|
||||
provisioning = /etc/grafana/provisioning
|
||||
|
||||
|
||||
[server]
|
||||
enable_gzip = true
|
||||
read_timeout = 2m
|
||||
|
||||
|
||||
[snapshots]
|
||||
external_enabled = false
|
12
config/grafana/provisioning/dashboards/all.yaml
Normal file
12
config/grafana/provisioning/dashboards/all.yaml
Normal file
|
@ -0,0 +1,12 @@
|
|||
apiVersion: 1
|
||||
|
||||
providers:
|
||||
- name: 'fs'
|
||||
orgId: 1
|
||||
folder: ''
|
||||
type: 'file'
|
||||
updateIntervalSeconds: 30
|
||||
allowUiUpdates: true
|
||||
options:
|
||||
path: '/var/lib/grafana/dashboards'
|
||||
foldersFromFilesStructure: true
|
12
config/grafana/provisioning/datasources/all.yaml
Normal file
12
config/grafana/provisioning/datasources/all.yaml
Normal file
|
@ -0,0 +1,12 @@
|
|||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
- name: prometheus
|
||||
type: prometheus
|
||||
access: proxy
|
||||
orgId: 1
|
||||
url: http://prometheus:9090
|
||||
isDefault: true
|
||||
version: 1
|
||||
editable: false
|
||||
timeInterval: 30s
|
29
config/prometheus/Dockerfile
Normal file
29
config/prometheus/Dockerfile
Normal file
|
@ -0,0 +1,29 @@
|
|||
ARG BUILDER_IMAGE=index.docker.io/library/ubuntu@sha256:82becede498899ec668628e7cb0ad87b6e1c371cb8a1e597d83a47fac21d6af3
|
||||
ARG RUNTIME_IMAGE=gcr.io/distroless/base@sha256:97f9cbf81590c7dd878d7e10c20116fa7488c2fb91b3c839df1ebdcb61ab13ca
|
||||
|
||||
|
||||
FROM $BUILDER_IMAGE AS builder
|
||||
|
||||
ARG VERSION=2.28.1
|
||||
ARG SHA256=91dd91e13f30fe520e01175ca1027dd09a458d4421a584ba557ba88b38803f27
|
||||
|
||||
RUN set -ex && \
|
||||
apt update && \
|
||||
apt install -y curl gzip
|
||||
|
||||
RUN set -ex && \
|
||||
curl -SOL https://github.com/prometheus/prometheus/releases/download/v${VERSION}/prometheus-${VERSION}.linux-amd64.tar.gz && \
|
||||
echo "${SHA256} prometheus-${VERSION}.linux-amd64.tar.gz" | sha256sum -c && \
|
||||
tar xvzf prometheus-${VERSION}.linux-amd64.tar.gz --strip-components=1 && \
|
||||
mv ./prometheus /usr/local/bin/prometheus
|
||||
|
||||
RUN mkdir /data
|
||||
|
||||
|
||||
FROM $RUNTIME_IMAGE
|
||||
|
||||
COPY --from=builder --chown=nonroot:nonroot /data /data
|
||||
COPY --from=builder --chown=nonroot:nonroot /usr/local/bin/prometheus /usr/local/bin/prometheus
|
||||
USER nonroot:nonroot
|
||||
|
||||
ENTRYPOINT [ "prometheus" ]
|
8
config/prometheus/config.yaml
Normal file
8
config/prometheus/config.yaml
Normal file
|
@ -0,0 +1,8 @@
|
|||
global:
|
||||
scrape_interval: '15s'
|
||||
evaluation_interval: '15s'
|
||||
scrape_configs:
|
||||
- job_name: 'monerod'
|
||||
static_configs:
|
||||
- targets:
|
||||
- 'monerod:9000'
|
|
@ -67,6 +67,50 @@ x-explorer-service: &explorer-service
|
|||
- "traefik.http.routers.explorer.service=explorer"
|
||||
- "traefik.http.services.explorer.loadbalancer.server.port=${EXPLORER_PORT}"
|
||||
|
||||
x-monero-exporter-service: &monero-exporter-service
|
||||
monero-exporter:
|
||||
command:
|
||||
- --monero-addr=http://monerod:${MONEROD_RPC_PORT}
|
||||
container_name: monero-exporter
|
||||
image: utxobr/monero-exporter@sha256:737413b1054583535e835e1417b61a8d59a4c08723e4a15c61c4249c2a7d69a4
|
||||
network_mode: service:monerod
|
||||
|
||||
x-grafana-service: &grafana-service
|
||||
grafana:
|
||||
command:
|
||||
- -config=/etc/grafana/grafana.ini
|
||||
container_name: grafana
|
||||
image: grafana/grafana:${GRAFANA_TAG}
|
||||
ports:
|
||||
- 3000
|
||||
volumes:
|
||||
- ./config/grafana/grafana.ini:/etc/grafana/grafana.ini:ro
|
||||
- ./config/grafana/provisioning:/etc/grafana/provisioning:ro
|
||||
- ./config/grafana/dashboards:/var/lib/grafana/dashboards:ro
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.grafana.rule=(PathPrefix(`/grafana`) )" #!nole
|
||||
# - "traefik.http.routers.grafana.rule=(Host(`${DOMAIN}`) && PathPrefix(`/grafana`) )" #!le
|
||||
# - "traefik.http.routers.grafana.tls.certresolver=le" #!le
|
||||
- "traefik.http.middlewares.stripprefix.stripprefix.prefixes=/grafana"
|
||||
- "traefik.http.routers.grafana.middlewares=stripprefix"
|
||||
- "traefik.http.routers.grafana.entrypoints=websecure"
|
||||
- "traefik.http.routers.grafana.tls"
|
||||
- "traefik.http.routers.grafana.service=grafana"
|
||||
- "traefik.http.services.grafana.loadbalancer.server.port=3000"
|
||||
|
||||
x-prometheus-service: &prometheus-service
|
||||
prometheus:
|
||||
command:
|
||||
- --config.file=/etc/prometheus/config.yaml
|
||||
- --storage.tsdb.path=/data
|
||||
- --storage.tsdb.retention.time=30d
|
||||
container_name: prometheus
|
||||
image: prom/prometheus:${PROMETHEUS_TAG}
|
||||
volumes:
|
||||
- prometheus-data:/data
|
||||
- ./config/prometheus/config.yaml:/etc/prometheus/config.yaml:ro
|
||||
|
||||
x-watchtower-service: &watchtower-service
|
||||
watchtower:
|
||||
container_name: watchtower
|
||||
|
@ -113,7 +157,14 @@ services:
|
|||
|
||||
# <<: *tor-service #!tor
|
||||
# <<: *explorer-service #!explorer
|
||||
<<: *monero-exporter-service #!monero-exporter
|
||||
|
||||
<<: *grafana-service #!grafana
|
||||
|
||||
<<: *prometheus-service #!prometheus
|
||||
# <<: *watchtower-service #!watchtower
|
||||
|
||||
volumes:
|
||||
monerod-data: {}
|
||||
# tor-keys: {} #!tor
|
||||
prometheus-data: {} #!prometheus
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue