Hi,
I have a gauge which measures how much percentage memory is used in a cluster.
However the bar for for example 60% is less far then 10%?
So what am I doing wrong? JSON panel:
{
"datasource": {
"type": "prometheus",
"uid": "thanos"
},
"fieldConfig": {
"defaults": {
"mappings": [],
"thresholds": {
"mode": "percentage",
"steps": [
{
"color": "green",
"value": null
},
{
"value": 80,
"color": "#EAB839"
},
{
"value": 90,
"color": "semi-dark-red"
}
]
},
"custom": {
"neutral": 0
},
"unit": "percent"
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 4.8,
"x": 0,
"y": 8
},
"id": 14,
"links": [
{
"targetBlank": true,
"title": "x",
"url": "X"
}
],
"maxPerRow": 12,
"options": {
"reduceOptions": {
"values": false,
"calcs": [
"mean"
],
"fields": ""
},
"orientation": "auto",
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"pluginVersion": "9.5.1",
"repeat": "cluster",
"repeatDirection": "h",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "thanos"
},
"editorMode": "code",
"expr": "(sum(node_memory_MemTotal_bytes{cluster=~\"$cluster\",hostname=~\"$hostname\",namespace=\"monitoring\"} - node_memory_MemFree_bytes{cluster=~\"$cluster\",hostname=~\"$hostname\",namespace=\"monitoring\"} - (node_memory_Cached_bytes{cluster=~\"$cluster\",hostname=~\"$hostname\",namespace=\"monitoring\"} + node_memory_Buffers_bytes{cluster=~\"$cluster\",hostname=~\"$hostname\",namespace=\"monitoring\"} + node_memory_SReclaimable_bytes{cluster=~\"$cluster\",hostname=~\"$hostname\",namespace=\"monitoring\"}))) / (sum(node_memory_MemTotal_bytes{cluster=~\"$cluster\",hostname=~\"$hostname\",namespace=\"monitoring\"})) * 100",
"legendFormat": "__auto",
"range": true,
"refId": "A"
}
],
"title": "Memory $cluster",
"type": "gauge",
"scopedVars": {
"cluster": {
"text": "cak91001",
"value": "cak91001",
"selected": true
}
}
}