Skip to content

Commit

Permalink
Merge pull request #2073 from valentijnscholten/grafana-replace-heap-…
Browse files Browse the repository at this point in the history
…gauge

grafana: replace broken heap usage gauge
  • Loading branch information
nscuro authored Oct 21, 2022
2 parents 7878b03 + 14d6c55 commit ecbe957
Showing 1 changed file with 108 additions and 44 deletions.
152 changes: 108 additions & 44 deletions docs/files/grafana-dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -201,21 +201,24 @@
"color": {
"mode": "thresholds"
},
"mappings": [],
"decimals": 2,
"mappings": [
{
"options": {
"match": "null",
"result": {
"text": "N/A"
}
},
"type": "special"
}
],
"thresholds": {
"mode": "percentage",
"mode": "absolute",
"steps": [
{
"color": "green",
"color": "rgba(50, 172, 45, 0.97)",
"value": null
},
{
"color": "#EAB839",
"value": 65
},
{
"color": "red",
"value": 85
}
]
},
Expand All @@ -224,23 +227,27 @@
"overrides": []
},
"gridPos": {
"h": 6,
"h": 3,
"w": 5,
"x": 11,
"y": 0
},
"id": 24,
"links": [],
"maxDataPoints": 100,
"options": {
"orientation": "auto",
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true
"textMode": "auto"
},
"pluginVersion": "9.0.3",
"targets": [
Expand All @@ -249,39 +256,18 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "sum(jvm_memory_used_bytes{instance=\"$instance\", area=\"heap\"})",
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"expr": "sum(jvm_memory_max_bytes{instance=\"$instance\", area=\"heap\"})",
"hide": false,
"refId": "B"
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "",
"range": true,
"refId": "A",
"step": 14400
}
],
"title": "Current Heap Usage",
"transformations": [
{
"id": "configFromData",
"options": {
"configRefId": "B",
"mappings": [
{
"fieldName": "Time",
"handlerKey": "__ignore"
},
{
"fieldName": "sum(jvm_memory_max_bytes{instance=\"apiserver:8080\", area=\"heap\"})",
"handlerKey": "max"
}
]
}
}
],
"type": "gauge"
"type": "stat"
},
{
"datasource": {
Expand Down Expand Up @@ -460,6 +446,84 @@
"title": "Java Runtime",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 2,
"mappings": [
{
"options": {
"match": "null",
"result": {
"text": "N/A"
}
},
"type": "special"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "rgba(50, 172, 45, 0.97)",
"value": null
}
]
},
"unit": "bytes"
},
"overrides": []
},
"gridPos": {
"h": 3,
"w": 5,
"x": 11,
"y": 3
},
"id": 45,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "9.2.1",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "sum(jvm_memory_max_bytes{instance=\"$instance\", area=\"heap\"})",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "",
"range": true,
"refId": "A",
"step": 14400
}
],
"title": "Total Heap Size",
"type": "stat"
},
{
"collapsed": false,
"gridPos": {
Expand Down

0 comments on commit ecbe957

Please sign in to comment.