Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swarm: implement blackhole detection #2320

Merged
merged 2 commits into from
Jun 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
254 changes: 253 additions & 1 deletion dashboards/swarm/swarm.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@
"name": "Prometheus",
"version": "1.0.0"
},
{
"type": "panel",
"id": "stat",
"name": "Stat",
"version": ""
},
{
"type": "panel",
"id": "state-timeline",
"name": "State timeline",
"version": ""
},
{
"type": "panel",
"id": "timeseries",
Expand Down Expand Up @@ -3026,8 +3038,248 @@
],
"title": "Dials per connection",
"type": "piechart"
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 84
},
"id": 44,
"panels": [],
"title": "Black Hole Detection",
"type": "row"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "fixed"
},
"custom": {
"fillOpacity": 76,
"lineWidth": 0,
"spanNulls": true
},
"mappings": [
{
"options": {
"0": {
"color": "blue",
"index": 0,
"text": "Probing"
},
"1": {
"color": "green",
"index": 1,
"text": "Allowed"
},
"2": {
"color": "purple",
"index": 2,
"text": "Blocked"
}
},
"type": "value"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 24,
"x": 0,
"y": 85
},
"id": 46,
"options": {
"alignValue": "center",
"legend": {
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"mergeValues": true,
"rowHeight": 0.9,
"showValue": "always",
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "libp2p_swarm_black_hole_filter_state{instance=~\"$instance\"}",
"legendFormat": "{{instance}} {{name}}",
"range": true,
"refId": "A"
}
],
"title": "Black Hole Filter State",
"type": "state-timeline"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
"color": {
"fixedColor": "purple",
"mode": "fixed"
},
"mappings": [
{
"options": {
"0": {
"index": 0,
"text": "-"
}
},
"type": "value"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 12,
"x": 0,
"y": 91
},
"id": 49,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "value_and_name"
},
"pluginVersion": "9.3.6",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "libp2p_swarm_black_hole_filter_next_request_allowed_after{instance=~\"$instance\"}",
"legendFormat": "{{instance}}: {{name}}",
"range": true,
"refId": "A"
}
],
"title": "Black Hole Filter Requests Till Next Probe",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"max": 10,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "purple",
"value": null
},
{
"color": "green",
"value": 5
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 12,
"x": 12,
"y": 91
},
"id": 47,
"options": {
"orientation": "vertical",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"pluginVersion": "9.3.6",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"exemplar": false,
"expr": "libp2p_swarm_black_hole_filter_success_fraction{instance=~\"$instance\"} * 100",
"instant": true,
"legendFormat": "{{instance}} {{name}}",
"range": false,
"refId": "A"
}
],
"title": "Black Hole Filter Success Percentage",
"type": "gauge"
}
],
"refresh": false,
"schemaVersion": 37,
"style": "dark",
"tags": [],
Expand Down Expand Up @@ -3065,6 +3317,6 @@
"timezone": "",
"title": "libp2p Swarm",
"uid": "a15PyhO4z",
"version": 6,
"version": 7,
"weekStart": ""
}
Loading