refactor: move all remaining files to orig/ directory

Completed clean root directory structure:
- Root now contains only: .git, .env, docs/, orig/
- Moved all remaining files and directories to orig/:
  - Config files (.claude, .dockerignore, .drone.yml, etc.)
  - All .env variants (except active .env)
  - Git config (.gitconfig, .github, .gitignore, etc.)
  - Tool configs (.golangci.yml, .revive.toml, etc.)
  - Documentation (*.md files, @prompts)
  - Build files (Dockerfiles, Makefile, go.mod, go.sum)
  - Docker compose files
  - All source directories (scripts, tests, tools, etc.)
  - Runtime directories (logs, monitoring, reports)
  - Dependency files (node_modules, lib, cache)
  - Special files (--delete)

- Removed empty runtime directories (bin/, data/)

V2 structure is now clean:
- docs/planning/ - V2 planning documents
- orig/ - Complete V1 codebase preserved
- .env - Active environment config (not in git)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Administrator
2025-11-10 10:53:05 +01:00
parent 803de231ba
commit c54c569f30
718 changed files with 8304 additions and 8281 deletions

View File

@@ -0,0 +1,21 @@
groups:
- name: mev-bot-alerts
interval: 30s
rules:
- alert: MEVBotHighErrorRate
expr: mev_bot_trade_error_rate > 0.25
for: 10m
labels:
severity: critical
annotations:
summary: "MEV bot trade error rate is above 25%"
description: "Error rate has exceeded 25% for 10 minutes. Investigate RPC stability, pool state, and contract execution failures."
- alert: MEVBotDegradedProfitFactor
expr: mev_bot_profit_factor < 1
for: 15m
labels:
severity: warning
annotations:
summary: "MEV bot profit factor dropped below 1"
description: "Profit factor is below 1 for 15 minutes, indicating unprofitable execution after gas costs. Review recent opportunities and gas settings."

180
orig/monitoring/dashboard.sh Executable file
View File

@@ -0,0 +1,180 @@
#!/bin/bash
# Real-time MEV Bot Monitoring Dashboard
# Updates every 5 seconds with live statistics
set -e
# Configuration
REFRESH_INTERVAL=5
LOG_DIR="logs/24h_test"
MAIN_LOG_DIR="logs"
# Colors
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
# Function to get latest log
get_latest_log() {
# Check 24h test log first
LATEST=$(ls -t ${LOG_DIR}/test_*.log 2>/dev/null | head -1)
if [ -z "${LATEST}" ]; then
# Fall back to main log
LATEST="${MAIN_LOG_DIR}/mev_bot.log"
fi
echo "${LATEST}"
}
# Function to clear screen
clear_screen() {
clear
echo -e "${BLUE}╔════════════════════════════════════════════════════════════╗${NC}"
echo -e "${BLUE}║ MEV Bot Real-Time Monitoring Dashboard ║${NC}"
echo -e "${BLUE}╚════════════════════════════════════════════════════════════╝${NC}"
echo ""
}
# Function to display stats
display_stats() {
LOG_FILE=$(get_latest_log)
if [ ! -f "${LOG_FILE}" ]; then
echo -e "${RED}❌ No log file found${NC}"
return
fi
# Get last 1000 lines for performance
RECENT_LOGS=$(tail -1000 "${LOG_FILE}")
# Calculate stats
BLOCKS=$(echo "${RECENT_LOGS}" | grep -c "Processing.*transactions" || echo "0")
DEX=$(echo "${RECENT_LOGS}" | grep -c "DEX Transaction detected" || echo "0")
OPPS=$(echo "${RECENT_LOGS}" | grep -c "ARBITRAGE OPPORTUNITY" || echo "0")
PROFITABLE=$(echo "${RECENT_LOGS}" | grep "ARBITRAGE OPPORTUNITY" | grep -c "isExecutable:true" || echo "0")
ERRORS=$(echo "${RECENT_LOGS}" | grep -c "\[ERROR\]" || echo "0")
WARNS=$(echo "${RECENT_LOGS}" | grep -c "\[WARN\]" || echo "0")
# Check if bot is running
PID_FILE="${LOG_DIR}/mev-bot.pid"
BOT_STATUS="${RED}❌ Not Running${NC}"
UPTIME="N/A"
if [ -f "${PID_FILE}" ]; then
PID=$(cat "${PID_FILE}")
if ps -p "${PID}" > /dev/null 2>&1; then
BOT_STATUS="${GREEN}✅ Running (PID: ${PID})${NC}"
UPTIME=$(ps -o etime= -p "${PID}" | tr -d ' ')
fi
fi
# Display
echo -e "${BLUE}📊 System Status${NC}"
echo " Status: ${BOT_STATUS}"
echo " Uptime: ${UPTIME}"
echo " Log: ${LOG_FILE}"
echo ""
echo -e "${BLUE}📈 Performance (Last 1000 lines)${NC}"
echo " Blocks Processed: ${BLOCKS}"
echo " DEX Transactions: ${DEX}"
if [ "${BLOCKS}" -gt "0" ]; then
DEX_RATE=$(awk "BEGIN {printf \"%.2f\", (${DEX} / ${BLOCKS}) * 100}")
echo " DEX Rate: ${DEX_RATE}%"
fi
echo ""
echo -e "${BLUE}🎯 Opportunities${NC}"
echo " Total Detected: ${OPPS}"
echo -e " Profitable: ${GREEN}${PROFITABLE}${NC}"
echo " Rejected: $((OPPS - PROFITABLE))"
if [ "${OPPS}" -gt "0" ]; then
SUCCESS_RATE=$(awk "BEGIN {printf \"%.2f\", (${PROFITABLE} / ${OPPS}) * 100}")
echo " Success Rate: ${SUCCESS_RATE}%"
fi
echo ""
# Latest opportunities
echo -e "${BLUE}💰 Recent Opportunities (Last 5)${NC}"
echo "${RECENT_LOGS}" | grep "netProfitETH:" | tail -5 | while read line; do
PROFIT=$(echo "$line" | grep -o 'netProfitETH:[^ ]*' | cut -d: -f2)
EXECUTABLE=$(echo "$line" | grep -o 'isExecutable:[^ ]*' | cut -d: -f2)
if [ "${EXECUTABLE}" = "true" ]; then
echo -e " ${GREEN}${NC} ${PROFIT} ETH"
else
echo -e " ${RED}${NC} ${PROFIT} ETH"
fi
done || echo " No opportunities yet"
echo ""
# Cache metrics
echo -e "${BLUE}💾 Cache Performance${NC}"
CACHE=$(echo "${RECENT_LOGS}" | grep "Reserve cache metrics" | tail -1)
if [ -n "${CACHE}" ]; then
HIT_RATE=$(echo "${CACHE}" | grep -o 'hitRate=[0-9.]*' | cut -d= -f2)
HITS=$(echo "${CACHE}" | grep -o 'hits=[0-9]*' | cut -d= -f2)
MISSES=$(echo "${CACHE}" | grep -o 'misses=[0-9]*' | cut -d= -f2)
ENTRIES=$(echo "${CACHE}" | grep -o 'entries=[0-9]*' | cut -d= -f2)
if [ -n "${HIT_RATE}" ]; then
HIT_RATE_INT=$(echo "${HIT_RATE}" | cut -d. -f1)
if [ "${HIT_RATE_INT}" -ge "75" ]; then
COLOR="${GREEN}"
elif [ "${HIT_RATE_INT}" -ge "60" ]; then
COLOR="${YELLOW}"
else
COLOR="${RED}"
fi
echo -e " Hit Rate: ${COLOR}${HIT_RATE}%${NC}"
fi
echo " Hits: ${HITS}"
echo " Misses: ${MISSES}"
echo " Entries: ${ENTRIES}"
else
echo " Not available (multihop not triggered)"
fi
echo ""
# Errors
echo -e "${BLUE}⚠️ Issues${NC}"
if [ "${ERRORS}" -gt "0" ]; then
echo -e " Errors: ${RED}${ERRORS}${NC}"
else
echo -e " Errors: ${GREEN}0${NC}"
fi
if [ "${WARNS}" -gt "10" ]; then
echo -e " Warnings: ${YELLOW}${WARNS}${NC}"
else
echo " Warnings: ${WARNS}"
fi
# Recent error
if [ "${ERRORS}" -gt "0" ]; then
echo ""
echo " Latest Error:"
echo "${RECENT_LOGS}" | grep "\[ERROR\]" | tail -1 | sed 's/^/ /' | cut -c1-80
fi
echo ""
# Protocol distribution
echo -e "${BLUE}📊 Protocol Distribution (Last 100 opportunities)${NC}"
echo "${RECENT_LOGS}" | grep "protocol:" | tail -100 | \
grep -o 'protocol:[A-Za-z0-9_]*' | \
sort | uniq -c | sort -rn | head -5 | \
awk '{printf " %-20s %d\n", substr($2, 10), $1}' || echo " No data yet"
echo ""
# Footer
echo -e "${BLUE}════════════════════════════════════════════════════════════${NC}"
echo "Last updated: $(date)"
echo "Press Ctrl+C to exit | Refreshing every ${REFRESH_INTERVAL}s"
}
# Main loop
trap "echo ''; echo 'Dashboard stopped'; exit 0" INT TERM
while true; do
clear_screen
display_stats
sleep ${REFRESH_INTERVAL}
done

View File

@@ -0,0 +1,15 @@
# Grafana Dashboard Provisioning Configuration for MEV Bot
apiVersion: 1
providers:
- name: 'MEV Bot Dashboards'
orgId: 1
folder: ''
type: file
disableDeletion: false
updateIntervalSeconds: 10
allowUiUpdates: true
options:
path: /etc/grafana/provisioning/dashboards
foldersFromFilesStructure: true

View File

@@ -0,0 +1,830 @@
{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "8.0.0"
},
{
"type": "panel",
"id": "graph",
"name": "Graph",
"version": ""
},
{
"type": "datasource",
"id": "prometheus",
"name": "Prometheus",
"version": "1.0.0"
},
{
"type": "panel",
"id": "stat",
"name": "Stat",
"version": ""
},
{
"type": "panel",
"id": "table",
"name": "Table",
"version": ""
}
],
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": null,
"links": [],
"panels": [
{
"collapsed": false,
"datasource": "${DS_PROMETHEUS}",
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 0
},
"id": 2,
"panels": [],
"title": "Overview",
"type": "row"
},
{
"datasource": "${DS_PROMETHEUS}",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 4,
"x": 0,
"y": 1
},
"id": 4,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.0.0",
"targets": [
{
"expr": "mev_bot_blocks_processed_total",
"interval": "",
"legendFormat": "",
"refId": "A"
}
],
"title": "Blocks Processed",
"type": "stat"
},
{
"datasource": "${DS_PROMETHEUS}",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 4,
"x": 4,
"y": 1
},
"id": 6,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.0.0",
"targets": [
{
"expr": "mev_bot_swaps_detected_total",
"interval": "",
"legendFormat": "",
"refId": "A"
}
],
"title": "Swaps Detected",
"type": "stat"
},
{
"datasource": "${DS_PROMETHEUS}",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 4,
"x": 8,
"y": 1
},
"id": 8,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.0.0",
"targets": [
{
"expr": "mev_bot_arbitrage_opportunities_total",
"interval": "",
"legendFormat": "",
"refId": "A"
}
],
"title": "Arbitrage Opportunities",
"type": "stat"
},
{
"datasource": "${DS_PROMETHEUS}",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "percent"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 4,
"x": 12,
"y": 1
},
"id": 10,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.0.0",
"targets": [
{
"expr": "rate(mev_bot_successful_arbitrages_total[5m]) / rate(mev_bot_arbitrage_attempts_total[5m]) * 100",
"interval": "",
"legendFormat": "",
"refId": "A"
}
],
"title": "Success Rate",
"type": "stat"
},
{
"datasource": "${DS_PROMETHEUS}",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "currencyUSD"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 4,
"x": 16,
"y": 1
},
"id": 12,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.0.0",
"targets": [
{
"expr": "mev_bot_total_profit_usd",
"interval": "",
"legendFormat": "",
"refId": "A"
}
],
"title": "Total Profit",
"type": "stat"
},
{
"datasource": "${DS_PROMETHEUS}",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 4,
"x": 20,
"y": 1
},
"id": 14,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.0.0",
"targets": [
{
"expr": "mev_bot_pools_tracked",
"interval": "",
"legendFormat": "",
"refId": "A"
}
],
"title": "Pools Tracked",
"type": "stat"
},
{
"collapsed": false,
"datasource": "${DS_PROMETHEUS}",
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 9
},
"id": 16,
"panels": [],
"title": "Performance Metrics",
"type": "row"
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_PROMETHEUS}",
"fieldConfig": {
"defaults": {
"unit": "short"
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 10
},
"hiddenSeries": false,
"id": 18,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "8.0.0",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "rate(mev_bot_blocks_processed_total[5m])",
"interval": "",
"legendFormat": "Blocks Processed",
"refId": "A"
},
{
"expr": "rate(mev_bot_swaps_detected_total[5m])",
"interval": "",
"legendFormat": "Swaps Detected",
"refId": "B"
},
{
"expr": "rate(mev_bot_arbitrage_opportunities_total[5m])",
"interval": "",
"legendFormat": "Arbitrage Opportunities",
"refId": "C"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Event Processing Rates",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_PROMETHEUS}",
"fieldConfig": {
"defaults": {
"unit": "ms"
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 10
},
"hiddenSeries": false,
"id": 20,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "8.0.0",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "mev_bot_avg_processing_time_ms",
"interval": "",
"legendFormat": "Avg Processing Time",
"refId": "A"
},
{
"expr": "mev_bot_max_processing_time_ms",
"interval": "",
"legendFormat": "Max Processing Time",
"refId": "B"
},
{
"expr": "mev_bot_min_processing_time_ms",
"interval": "",
"legendFormat": "Min Processing Time",
"refId": "C"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Processing Time Metrics",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "ms",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"collapsed": false,
"datasource": "${DS_PROMETHEUS}",
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 18
},
"id": 22,
"panels": [],
"title": "Profitability Analytics",
"type": "row"
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_PROMETHEUS}",
"fieldConfig": {
"defaults": {
"unit": "currencyUSD"
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 19
},
"hiddenSeries": false,
"id": 24,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "8.0.0",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "mev_bot_total_profit_usd",
"interval": "",
"legendFormat": "Total Profit",
"refId": "A"
},
{
"expr": "mev_bot_total_gas_cost_usd",
"interval": "",
"legendFormat": "Total Gas Cost",
"refId": "B"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Profit vs Gas Cost",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "currencyUSD",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"columns": [],
"datasource": "${DS_PROMETHEUS}",
"fontSize": "100%",
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 19
},
"id": 26,
"pageSize": null,
"showHeader": true,
"sort": {
"col": 0,
"desc": true
},
"styles": [
{
"alias": "Time",
"align": "auto",
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"pattern": "Time",
"type": "date"
},
{
"alias": "",
"align": "auto",
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"decimals": 2,
"pattern": "/.*/",
"thresholds": [],
"type": "number",
"unit": "short"
}
],
"targets": [
{
"expr": "topk(10, mev_bot_top_arbitrage_opportunities)",
"format": "table",
"instant": true,
"interval": "",
"legendFormat": "",
"refId": "A"
}
],
"title": "Top Arbitrage Opportunities",
"transform": "table",
"type": "table"
}
],
"refresh": "5s",
"schemaVersion": 30,
"style": "dark",
"tags": [
"mev",
"arbitrum",
"arbitrage",
"defi"
],
"templating": {
"list": []
},
"time": {
"from": "now-1h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "MEV Bot Dashboard",
"uid": "mev-bot-dashboard",
"version": 1
}

View File

@@ -0,0 +1,30 @@
# Grafana Datasource Configuration for MEV Bot Monitoring
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
access: proxy
url: http://prometheus:9090
isDefault: true
jsonData:
timeInterval: "15s"
editable: true
- name: PostgreSQL
type: postgres
access: proxy
url: postgres:5432
database: mevbot_production
user: mevbot_production
secureJsonData:
password: $POSTGRES_PASSWORD
jsonData:
sslmode: "disable"
maxOpenConns: 10
maxIdleConns: 5
connMaxLifetime: 14400
postgresVersion: 1500
timescaledb: false
editable: true

View File

@@ -0,0 +1,49 @@
# Prometheus Configuration for MEV Bot Monitoring
global:
scrape_interval: 15s
evaluation_interval: 15s
external_labels:
monitor: 'mev-bot-monitor'
rule_files:
- "alerts.yml"
scrape_configs:
- job_name: 'mev-bot'
static_configs:
- targets: ['mev-bot-arbitrum:9090']
scrape_interval: 10s
scrape_timeout: 5s
- job_name: 'postgres'
static_configs:
- targets: ['mev-bot-postgres:9187']
scrape_interval: 30s
scrape_timeout: 10s
- job_name: 'redis'
static_configs:
- targets: ['mev-bot-redis:9121']
scrape_interval: 30s
scrape_timeout: 10s
- job_name: 'node-exporter'
static_configs:
- targets: ['mev-bot-node-exporter:9100']
scrape_interval: 30s
scrape_timeout: 10s
alerting:
alertmanagers:
- static_configs:
- targets:
# - alertmanager:9093
# Remote write configuration for long-term storage (optional)
#remote_write:
# - url: "http://your-remote-storage:9090/api/v1/write"
# write_relabel_configs:
# - source_labels: [__name__]
# regex: 'mev_bot_.*'
# action: keep