mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-10 18:05:44 +02:00
feat(dev): allow monitoring a valkey server on localhost (#4467)
This commit is contained in:
parent
6f0072e462
commit
6265f52bff
4 changed files with 1620 additions and 23 deletions
|
@ -1,5 +1,11 @@
|
|||
version: '3.8'
|
||||
|
||||
# To run redis exporter, run: docker compose --profile redis up
|
||||
# To run memcached and its exporter: docker compose --profile memcached up
|
||||
#
|
||||
# Note you may still need to disable/change scraping job configs
|
||||
# in prometheus.yml
|
||||
#
|
||||
volumes:
|
||||
prometheus_data:
|
||||
grafana_data:
|
||||
|
@ -98,6 +104,17 @@ services:
|
|||
depends_on:
|
||||
- memcached
|
||||
|
||||
redis-exporter:
|
||||
image: quay.io/oliver006/redis_exporter
|
||||
profiles: [redis]
|
||||
ports:
|
||||
- 9121:9121
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
restart: always
|
||||
environment:
|
||||
- REDIS_ADDR=host.docker.internal:6379
|
||||
|
||||
renderer:
|
||||
image: grafana/grafana-image-renderer:latest
|
||||
ports:
|
||||
|
|
|
@ -328,7 +328,7 @@
|
|||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 0,
|
||||
"fillOpacity": 22,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
|
@ -342,11 +342,11 @@
|
|||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "auto",
|
||||
"showPoints": "never",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
"mode": "normal"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
|
@ -366,7 +366,8 @@
|
|||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
|
@ -399,7 +400,7 @@
|
|||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": true,
|
||||
"expr": "rate(dragonfly_commands_processed_total{namespace=\"$namespace\",pod=~\"$pod_name\"}[1m])",
|
||||
"expr": "sum(rate(dragonfly_commands_total{namespace=\"$namespace\",pod=~\"$pod_name\"}[1m])) by (cmd)",
|
||||
"format": "time_series",
|
||||
"interval": "",
|
||||
"intervalFactor": 2,
|
||||
|
@ -469,7 +470,8 @@
|
|||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"unit": "bytes"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
|
@ -897,13 +899,11 @@
|
|||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"barWidthFactor": 0.6,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
|
@ -935,7 +935,8 @@
|
|||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
|
@ -1018,13 +1019,11 @@
|
|||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"barWidthFactor": 0.6,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
|
@ -1056,7 +1055,8 @@
|
|||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
|
@ -1132,13 +1132,11 @@
|
|||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"barWidthFactor": 0.6,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
|
@ -1169,7 +1167,8 @@
|
|||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
|
@ -1246,13 +1245,11 @@
|
|||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"barWidthFactor": 0.6,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
|
@ -1283,7 +1280,8 @@
|
|||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
|
@ -1629,6 +1627,6 @@
|
|||
"timezone": "browser",
|
||||
"title": "Dragonfly Dashboard",
|
||||
"uid": "xDLNRKUWz",
|
||||
"version": 5,
|
||||
"version": 1,
|
||||
"weekStart": ""
|
||||
}
|
||||
}
|
||||
|
|
1580
tools/local/monitoring/grafana/provisioning/dashboards/redis.json
Normal file
1580
tools/local/monitoring/grafana/provisioning/dashboards/redis.json
Normal file
File diff suppressed because it is too large
Load diff
|
@ -33,10 +33,7 @@ scrape_configs:
|
|||
- targets: ['host.docker.internal:6379']
|
||||
|
||||
- job_name: 'prometheus'
|
||||
|
||||
# Override the global default and scrape targets from this job every 5 seconds.
|
||||
scrape_interval: 1s
|
||||
|
||||
static_configs:
|
||||
- targets: ['localhost:9090']
|
||||
|
||||
|
@ -52,3 +49,8 @@ scrape_configs:
|
|||
scrape_interval: 1s
|
||||
static_configs:
|
||||
- targets: ['memcached-exporter:9150']
|
||||
|
||||
- job_name: 'redis-exporter'
|
||||
scrape_interval: 1s
|
||||
static_configs:
|
||||
- targets: ['redis-exporter:9121']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue