mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 10:25:47 +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'
|
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:
|
volumes:
|
||||||
prometheus_data:
|
prometheus_data:
|
||||||
grafana_data:
|
grafana_data:
|
||||||
|
@ -98,6 +104,17 @@ services:
|
||||||
depends_on:
|
depends_on:
|
||||||
- memcached
|
- 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:
|
renderer:
|
||||||
image: grafana/grafana-image-renderer:latest
|
image: grafana/grafana-image-renderer:latest
|
||||||
ports:
|
ports:
|
||||||
|
|
|
@ -328,7 +328,7 @@
|
||||||
"axisPlacement": "auto",
|
"axisPlacement": "auto",
|
||||||
"barAlignment": 0,
|
"barAlignment": 0,
|
||||||
"drawStyle": "line",
|
"drawStyle": "line",
|
||||||
"fillOpacity": 0,
|
"fillOpacity": 22,
|
||||||
"gradientMode": "none",
|
"gradientMode": "none",
|
||||||
"hideFrom": {
|
"hideFrom": {
|
||||||
"legend": false,
|
"legend": false,
|
||||||
|
@ -342,11 +342,11 @@
|
||||||
"scaleDistribution": {
|
"scaleDistribution": {
|
||||||
"type": "linear"
|
"type": "linear"
|
||||||
},
|
},
|
||||||
"showPoints": "auto",
|
"showPoints": "never",
|
||||||
"spanNulls": false,
|
"spanNulls": false,
|
||||||
"stacking": {
|
"stacking": {
|
||||||
"group": "A",
|
"group": "A",
|
||||||
"mode": "none"
|
"mode": "normal"
|
||||||
},
|
},
|
||||||
"thresholdsStyle": {
|
"thresholdsStyle": {
|
||||||
"mode": "off"
|
"mode": "off"
|
||||||
|
@ -366,7 +366,8 @@
|
||||||
"value": 80
|
"value": 80
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
"unit": "short"
|
||||||
},
|
},
|
||||||
"overrides": []
|
"overrides": []
|
||||||
},
|
},
|
||||||
|
@ -399,7 +400,7 @@
|
||||||
},
|
},
|
||||||
"editorMode": "code",
|
"editorMode": "code",
|
||||||
"exemplar": true,
|
"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",
|
"format": "time_series",
|
||||||
"interval": "",
|
"interval": "",
|
||||||
"intervalFactor": 2,
|
"intervalFactor": 2,
|
||||||
|
@ -469,7 +470,8 @@
|
||||||
"value": 80
|
"value": 80
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
"unit": "bytes"
|
||||||
},
|
},
|
||||||
"overrides": []
|
"overrides": []
|
||||||
},
|
},
|
||||||
|
@ -897,13 +899,11 @@
|
||||||
"mode": "palette-classic"
|
"mode": "palette-classic"
|
||||||
},
|
},
|
||||||
"custom": {
|
"custom": {
|
||||||
"axisBorderShow": false,
|
|
||||||
"axisCenteredZero": false,
|
"axisCenteredZero": false,
|
||||||
"axisColorMode": "text",
|
"axisColorMode": "text",
|
||||||
"axisLabel": "",
|
"axisLabel": "",
|
||||||
"axisPlacement": "auto",
|
"axisPlacement": "auto",
|
||||||
"barAlignment": 0,
|
"barAlignment": 0,
|
||||||
"barWidthFactor": 0.6,
|
|
||||||
"drawStyle": "line",
|
"drawStyle": "line",
|
||||||
"fillOpacity": 0,
|
"fillOpacity": 0,
|
||||||
"gradientMode": "none",
|
"gradientMode": "none",
|
||||||
|
@ -935,7 +935,8 @@
|
||||||
"mode": "absolute",
|
"mode": "absolute",
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"color": "green"
|
"color": "green",
|
||||||
|
"value": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "red",
|
"color": "red",
|
||||||
|
@ -1018,13 +1019,11 @@
|
||||||
"mode": "palette-classic"
|
"mode": "palette-classic"
|
||||||
},
|
},
|
||||||
"custom": {
|
"custom": {
|
||||||
"axisBorderShow": false,
|
|
||||||
"axisCenteredZero": false,
|
"axisCenteredZero": false,
|
||||||
"axisColorMode": "text",
|
"axisColorMode": "text",
|
||||||
"axisLabel": "",
|
"axisLabel": "",
|
||||||
"axisPlacement": "auto",
|
"axisPlacement": "auto",
|
||||||
"barAlignment": 0,
|
"barAlignment": 0,
|
||||||
"barWidthFactor": 0.6,
|
|
||||||
"drawStyle": "line",
|
"drawStyle": "line",
|
||||||
"fillOpacity": 0,
|
"fillOpacity": 0,
|
||||||
"gradientMode": "none",
|
"gradientMode": "none",
|
||||||
|
@ -1056,7 +1055,8 @@
|
||||||
"mode": "absolute",
|
"mode": "absolute",
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"color": "green"
|
"color": "green",
|
||||||
|
"value": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "red",
|
"color": "red",
|
||||||
|
@ -1132,13 +1132,11 @@
|
||||||
"mode": "palette-classic"
|
"mode": "palette-classic"
|
||||||
},
|
},
|
||||||
"custom": {
|
"custom": {
|
||||||
"axisBorderShow": false,
|
|
||||||
"axisCenteredZero": false,
|
"axisCenteredZero": false,
|
||||||
"axisColorMode": "text",
|
"axisColorMode": "text",
|
||||||
"axisLabel": "",
|
"axisLabel": "",
|
||||||
"axisPlacement": "auto",
|
"axisPlacement": "auto",
|
||||||
"barAlignment": 0,
|
"barAlignment": 0,
|
||||||
"barWidthFactor": 0.6,
|
|
||||||
"drawStyle": "line",
|
"drawStyle": "line",
|
||||||
"fillOpacity": 0,
|
"fillOpacity": 0,
|
||||||
"gradientMode": "none",
|
"gradientMode": "none",
|
||||||
|
@ -1169,7 +1167,8 @@
|
||||||
"mode": "absolute",
|
"mode": "absolute",
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"color": "green"
|
"color": "green",
|
||||||
|
"value": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "red",
|
"color": "red",
|
||||||
|
@ -1246,13 +1245,11 @@
|
||||||
"mode": "palette-classic"
|
"mode": "palette-classic"
|
||||||
},
|
},
|
||||||
"custom": {
|
"custom": {
|
||||||
"axisBorderShow": false,
|
|
||||||
"axisCenteredZero": false,
|
"axisCenteredZero": false,
|
||||||
"axisColorMode": "text",
|
"axisColorMode": "text",
|
||||||
"axisLabel": "",
|
"axisLabel": "",
|
||||||
"axisPlacement": "auto",
|
"axisPlacement": "auto",
|
||||||
"barAlignment": 0,
|
"barAlignment": 0,
|
||||||
"barWidthFactor": 0.6,
|
|
||||||
"drawStyle": "line",
|
"drawStyle": "line",
|
||||||
"fillOpacity": 0,
|
"fillOpacity": 0,
|
||||||
"gradientMode": "none",
|
"gradientMode": "none",
|
||||||
|
@ -1283,7 +1280,8 @@
|
||||||
"mode": "absolute",
|
"mode": "absolute",
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"color": "green"
|
"color": "green",
|
||||||
|
"value": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "red",
|
"color": "red",
|
||||||
|
@ -1629,6 +1627,6 @@
|
||||||
"timezone": "browser",
|
"timezone": "browser",
|
||||||
"title": "Dragonfly Dashboard",
|
"title": "Dragonfly Dashboard",
|
||||||
"uid": "xDLNRKUWz",
|
"uid": "xDLNRKUWz",
|
||||||
"version": 5,
|
"version": 1,
|
||||||
"weekStart": ""
|
"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']
|
- targets: ['host.docker.internal:6379']
|
||||||
|
|
||||||
- job_name: 'prometheus'
|
- job_name: 'prometheus'
|
||||||
|
|
||||||
# Override the global default and scrape targets from this job every 5 seconds.
|
|
||||||
scrape_interval: 1s
|
scrape_interval: 1s
|
||||||
|
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets: ['localhost:9090']
|
- targets: ['localhost:9090']
|
||||||
|
|
||||||
|
@ -52,3 +49,8 @@ scrape_configs:
|
||||||
scrape_interval: 1s
|
scrape_interval: 1s
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets: ['memcached-exporter:9150']
|
- 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