mirror of
https://github.com/0x1d/drift-keeper.git
synced 2025-12-15 18:58:21 +01:00
Multi-Cloud Deployment (#1)
* Introduce instances list to scale bots and add config templating * Use env var for wallet address if not provided as path param * Expose SOL price as metric * Update docs * Add auto-swap * Add Panopticon * implement backoff stategy in autoswap * Add retry logic for withdraw and swap * bump drift-sdk, update ctl.sh and docs * Update filler bot, add tx metrics * Add user-metrics * Update build and dashboard
This commit is contained in:
27
panopticon/docker-compose.yaml
Normal file
27
panopticon/docker-compose.yaml
Normal file
@@ -0,0 +1,27 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
|
||||
prometheus:
|
||||
image: prom/prometheus
|
||||
command:
|
||||
- '--config.file=/etc/prometheus/prometheus.yml'
|
||||
- '--web.config.file=/etc/prometheus/web.yml'
|
||||
ports:
|
||||
- 9090:9090
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./prometheus:/etc/prometheus
|
||||
- prom_data:/prometheus
|
||||
grafana:
|
||||
image: grafana/grafana
|
||||
env_file: .env.monitoring
|
||||
ports:
|
||||
- 3000:3000
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./grafana/provisioning:/etc/grafana/provisioning
|
||||
- ./grafana/dashboards:/var/lib/grafana/dashboards
|
||||
|
||||
volumes:
|
||||
prom_data:
|
||||
3
panopticon/example.env.monitoring
Normal file
3
panopticon/example.env.monitoring
Normal file
@@ -0,0 +1,3 @@
|
||||
GF_SECURITY_ADMIN_USER=admin
|
||||
GF_SECURITY_ADMIN_PASSWORD=grafana
|
||||
PROMETHEUS_PASSWORD=prompass
|
||||
1877
panopticon/grafana/dashboards/drift-keeper.json
Normal file
1877
panopticon/grafana/dashboards/drift-keeper.json
Normal file
File diff suppressed because it is too large
Load Diff
1011
panopticon/grafana/dashboards/node-resources.json
Normal file
1011
panopticon/grafana/dashboards/node-resources.json
Normal file
File diff suppressed because it is too large
Load Diff
24
panopticon/grafana/provisioning/dashboards/providers.yml
Normal file
24
panopticon/grafana/provisioning/dashboards/providers.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
apiVersion: 1
|
||||
|
||||
providers:
|
||||
# <string> an unique provider name. Required
|
||||
- name: 'a unique provider name'
|
||||
# <int> Org id. Default to 1
|
||||
orgId: 1
|
||||
# <string> name of the dashboard folder.
|
||||
folder: ''
|
||||
# <string> folder UID. will be automatically generated if not specified
|
||||
folderUid: ''
|
||||
# <string> provider type. Default to 'file'
|
||||
type: file
|
||||
# <bool> disable dashboard deletion
|
||||
disableDeletion: false
|
||||
# <int> how often Grafana will scan for changed dashboards
|
||||
updateIntervalSeconds: 10
|
||||
# <bool> allow updating provisioned dashboards from the UI
|
||||
allowUiUpdates: true
|
||||
options:
|
||||
# <string, required> path to dashboard files on disk. Required when using the 'file' type
|
||||
path: /var/lib/grafana/dashboards
|
||||
# <bool> use folder names from filesystem to create folders in Grafana
|
||||
foldersFromFilesStructure: true
|
||||
13
panopticon/grafana/provisioning/datasources/datasource.yml
Normal file
13
panopticon/grafana/provisioning/datasources/datasource.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
- name: Prometheus
|
||||
type: prometheus
|
||||
url: http://prometheus:9090
|
||||
isDefault: true
|
||||
access: proxy
|
||||
editable: true
|
||||
basicAuth: true
|
||||
basicAuthUser: prom
|
||||
secureJsonData:
|
||||
basicAuthPassword: ${PROMETHEUS_PASSWORD}
|
||||
29
panopticon/prometheus/prometheus.yml
Normal file
29
panopticon/prometheus/prometheus.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
global:
|
||||
scrape_interval: 60s
|
||||
scrape_timeout: 10s
|
||||
evaluation_interval: 15s
|
||||
alerting:
|
||||
alertmanagers:
|
||||
- static_configs:
|
||||
- targets: []
|
||||
scheme: http
|
||||
timeout: 10s
|
||||
api_version: v1
|
||||
scrape_configs:
|
||||
- job_name: 'federate'
|
||||
scrape_interval: 60s
|
||||
|
||||
honor_labels: true
|
||||
metrics_path: '/federate'
|
||||
|
||||
basic_auth:
|
||||
username: '${user}'
|
||||
password: '${password}'
|
||||
|
||||
params:
|
||||
'match[]':
|
||||
- '{instance="node-exporter:9100"}'
|
||||
- '{__name__=~"up:.*"}'
|
||||
|
||||
static_configs:
|
||||
${targets}
|
||||
4
panopticon/prometheus/web.yml
Normal file
4
panopticon/prometheus/web.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
basic_auth_users:
|
||||
# bcrypt "prompass"
|
||||
# e.g. htpasswd -bnBC 10 "" prompass | tr -d ':\n'
|
||||
prom: $2y$10$oWtHm79bh0D1CnNC4brGiOU7y6MbYa6cgklF/g6ek9YZYkgXfeOIu
|
||||
Reference in New Issue
Block a user