Update readme with metrics info + example dashboard json

This commit is contained in:
kdeme 2019-12-18 16:44:13 +01:00 committed by zah
parent b761d1b7e4
commit 8f18ac7ed1
2 changed files with 649 additions and 0 deletions

View File

@ -33,3 +33,20 @@ Example of a quick test with nim-web3:
./build/quicksim ./build/quicksim
``` ```
# Using Metrics
Metrics are available for valid envelopes and dropped envelopes.
To compile in an HTTP endpoint for accessing the metrics we need to provide the
`insecure` flag:
```bash
make NIMFLAGS="-d:insecure" wakunode
./build/wakunode --metrics-server
```
For visualisation, similar steps can be used as is written down for Nimbus
[here](https://github.com/status-im/nimbus#metric-visualisation).
There is a similar example dashboard that includes visualisation of the
envelopes available at `waku/examples/waku-grafana-dashboard.json`.

View File

@ -0,0 +1,632 @@
{
"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": 4,
"links": [],
"panels": [
{
"datasource": null,
"gridPos": {
"h": 5,
"w": 8,
"x": 0,
"y": 0
},
"id": 14,
"options": {
"fieldOptions": {
"calcs": [
"lastNotNull"
],
"defaults": {
"mappings": [],
"max": 200,
"min": 0,
"thresholds": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 200
}
],
"unit": "percent"
},
"override": {},
"values": false
},
"orientation": "auto",
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"pluginVersion": "6.4.5",
"targets": [
{
"expr": "rate(process_cpu_seconds_total[5s]) * 100",
"legendFormat": "CPU Usage",
"refId": "A"
}
],
"timeFrom": null,
"timeShift": null,
"title": "CPU Usage",
"type": "gauge"
},
{
"datasource": null,
"gridPos": {
"h": 5,
"w": 8,
"x": 8,
"y": 0
},
"id": 16,
"options": {
"fieldOptions": {
"calcs": [
"last"
],
"defaults": {
"mappings": [],
"max": 100,
"min": 0,
"thresholds": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"override": {},
"values": false
},
"orientation": "auto",
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"pluginVersion": "6.4.5",
"targets": [
{
"expr": "connected_peers",
"refId": "A"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Connected Peers",
"type": "gauge"
},
{
"datasource": null,
"gridPos": {
"h": 5,
"w": 8,
"x": 16,
"y": 0
},
"id": 18,
"options": {
"fieldOptions": {
"calcs": [
"lastNotNull"
],
"defaults": {
"mappings": [],
"max": 2147483648,
"min": 0,
"thresholds": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 2147483648
}
],
"unit": "bytes"
},
"override": {},
"values": false
},
"orientation": "auto",
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"pluginVersion": "6.4.5",
"targets": [
{
"expr": "process_resident_memory_bytes",
"refId": "A"
}
],
"timeFrom": null,
"timeShift": null,
"title": "RSS Memory",
"type": "gauge"
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": null,
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 9,
"w": 12,
"x": 0,
"y": 5
},
"id": 6,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"dataLinks": []
},
"percentage": false,
"pluginVersion": "6.4.5",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "valid_envelopes_total",
"hide": false,
"instant": false,
"legendFormat": "Valid",
"refId": "A"
},
{
"expr": "dropped_benign_duplicate_envelopes_total",
"hide": false,
"instant": false,
"legendFormat": "Benign duplicate",
"refId": "B"
},
{
"expr": "dropped_malicious_duplicate_envelopes_total",
"hide": false,
"legendFormat": "Malicious duplicate",
"refId": "C"
},
{
"expr": "dropped_expired_envelopes_total",
"hide": false,
"legendFormat": "Expired",
"refId": "D"
},
{
"expr": "dropped_from_future_envelopes_total",
"hide": false,
"legendFormat": "Future timestamped",
"refId": "E"
},
{
"expr": "dropped_low_pow_envelopes_total",
"hide": false,
"legendFormat": "Too low PoW",
"refId": "F"
},
{
"expr": "dropped_bloom_filter_mismatch_envelopes_total",
"hide": false,
"legendFormat": "Bloom filter mismatch",
"refId": "G"
},
{
"expr": "dropped_topic_mismatch_envelopes_total",
"hide": false,
"legendFormat": "Topic mismatch",
"refId": "H"
},
{
"expr": "dropped_too_large_envelopes_total",
"hide": false,
"legendFormat": "Too Large",
"refId": "I"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Waku Envelopes",
"tooltip": {
"shared": true,
"sort": 1,
"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": null,
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 9,
"w": 12,
"x": 12,
"y": 5
},
"id": 2,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [
{
"alias": "RSS Memory",
"yaxis": 2
}
],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "connected_peers",
"intervalFactor": 1,
"legendFormat": "Connected Peers",
"refId": "A"
},
{
"expr": "process_resident_memory_bytes",
"interval": "",
"intervalFactor": 1,
"legendFormat": "RSS Memory",
"refId": "B"
},
{
"expr": "rate(process_cpu_seconds_total[15s]) * 100",
"legendFormat": "CPU usage %",
"refId": "C"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Waku Node",
"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": null,
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 14
},
"id": 8,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "process_max_fds",
"legendFormat": "Maximum file descriptors",
"refId": "A"
},
{
"expr": "process_open_fds",
"legendFormat": "Open file descriptors",
"refId": "B"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "File Descriptors",
"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": null,
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 14
},
"id": 4,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "nim_gc_mem_bytes",
"legendFormat": "Nim GC total memory",
"refId": "A"
},
{
"expr": "nim_gc_mem_occupied_bytes",
"legendFormat": "Nim GC used memory",
"refId": "B"
},
{
"expr": "process_resident_memory_bytes",
"legendFormat": "RSS memory",
"refId": "C"
},
{
"expr": "process_virtual_memory_bytes",
"legendFormat": "Virtual memory",
"refId": "D"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Memory Usage",
"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
}
}
],
"refresh": "5s",
"schemaVersion": 20,
"style": "dark",
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-1h",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
]
},
"timezone": "",
"title": "Waku Node",
"uid": "K7Z6IoBZk",
"version": 10
}