Hi, I have the very same problem. I set up a dashboard with a time range of 24h and a single panel with a relative time of 1h. The panel with 1h reverts to 24h for a few seconds every 45 seconds. Interval is set to 5s.
This is the json for the dashboard with relative time set:
{
“annotations”: {
“list”: [
{
“builtIn”: 1,
“datasource”: {
“type”: “grafana”,
“uid”: “-- Grafana --”
},
“enable”: true,
“hide”: true,
“iconColor”: “rgba(0, 211, 255, 1)”,
“name”: “Annotations & Alerts”,
“target”: {
“limit”: 100,
“matchAny”: false,
“tags”: ,
“type”: “dashboard”
},
“type”: “dashboard”
}
]
},
“editable”: true,
“fiscalYearStartMonth”: 0,
“graphTooltip”: 0,
“id”: 61,
“links”: ,
“liveNow”: true,
“panels”: [
{
“datasource”: {
“type”: “prometheus”,
“uid”: “XomoJ9fVk”
},
“description”: “”,
“fieldConfig”: {
“defaults”: {
“color”: {
“mode”: “palette-classic”
},
“custom”: {
“axisCenteredZero”: false,
“axisColorMode”: “text”,
“axisLabel”: “”,
“axisPlacement”: “auto”,
“barAlignment”: 0,
“drawStyle”: “line”,
“fillOpacity”: 100,
“gradientMode”: “none”,
“hideFrom”: {
“legend”: false,
“tooltip”: false,
“viz”: false
},
“lineInterpolation”: “smooth”,
“lineWidth”: 2,
“pointSize”: 5,
“scaleDistribution”: {
“type”: “linear”
},
“showPoints”: “never”,
“spanNulls”: false,
“stacking”: {
“group”: “A”,
“mode”: “normal”
},
“thresholdsStyle”: {
“mode”: “off”
}
},
“mappings”: ,
“thresholds”: {
“mode”: “absolute”,
“steps”: [
{
“color”: “green”,
“value”: null
},
{
“color”: “red”,
“value”: 80
}
]
},
“unit”: “short”
},
“overrides”:
},
“gridPos”: {
“h”: 11,
“w”: 24,
“x”: 0,
“y”: 0
},
“hideTimeOverride”: false,
“id”: 2,
“interval”: “5s”,
“options”: {
“legend”: {
“calcs”: [
“max”
],
“displayMode”: “table”,
“placement”: “right”,
“showLegend”: true,
“sortBy”: “Max”,
“sortDesc”: true
},
“tooltip”: {
“mode”: “multi”,
“sort”: “desc”
}
},
“pluginVersion”: “9.4.7”,
“targets”: [
{
“datasource”: {
“type”: “prometheus”,
“uid”: “XomoJ9fVk”
},
“editorMode”: “builder”,
“exemplar”: false,
“expr”: “haproxy_frontend_current_sessions{proxy=~"AG1-FE|AG2-FE|AG3-FE|AG4-FE|AG4B-FE|AG5-FE|AG6-FE|AG7-FE|DRUPAL"}”,
“format”: “time_series”,
“instant”: false,
“interval”: “5”,
“legendFormat”: “{{proxy}}”,
“range”: true,
“refId”: “A”
}
],
“timeFrom”: “1h”,
“title”: “Sessioni ultima ora”,
“type”: “timeseries”
},
{
“datasource”: {
“type”: “prometheus”,
“uid”: “XomoJ9fVk”
},
“description”: “”,
“fieldConfig”: {
“defaults”: {
“color”: {
“fixedColor”: “green”,
“mode”: “thresholds”
},
“decimals”: 0,
“mappings”: [
{
“options”: {
“0”: {
“index”: 0,
“text”: “-”
}
},
“type”: “value”
}
],
“max”: 200,
“min”: 0,
“noValue”: “–”,
“thresholds”: {
“mode”: “absolute”,
“steps”: [
{
“color”: “green”,
“value”: null
},
{
“color”: “#EAB839”,
“value”: 100
},
{
“color”: “red”,
“value”: 200
}
]
},
“unit”: “short”
},
“overrides”: [
{
“matcher”: {
“id”: “byName”,
“options”: “[totale]”
},
“properties”: [
{
“id”: “max”,
“value”: 1000
},
{
“id”: “color”,
“value”: {
“mode”: “fixed”
}
}
]
}
]
},
“gridPos”: {
“h”: 12,
“w”: 12,
“x”: 0,
“y”: 11
},
“id”: 3,
“interval”: “5s”,
“options”: {
“colorMode”: “background”,
“graphMode”: “area”,
“justifyMode”: “auto”,
“orientation”: “auto”,
“reduceOptions”: {
“calcs”: [
“lastNotNull”
],
“fields”: “”,
“values”: false
},
“text”: {
“titleSize”: 30,
“valueSize”: 80
},
“textMode”: “value_and_name”
},
“pluginVersion”: “9.4.7”,
“targets”: [
{
“datasource”: {
“type”: “prometheus”,
“uid”: “XomoJ9fVk”
},
“editorMode”: “code”,
“exemplar”: false,
“expr”: “haproxy_frontend_current_sessions{proxy=~"AG1-FE|AG2-FE|AG3-FE|AG4-FE|AG4B-FE|AG5-FE|AG6-FE|AG7-FE|DRUPAL"}”,
“format”: “time_series”,
“instant”: true,
“interval”: “”,
“legendFormat”: “{{proxy}}”,
“range”: false,
“refId”: “A”
}
],
“title”: “Sessioni correnti”,
“transformations”: [
{
“id”: “calculateField”,
“options”: {
“alias”: “[totale]”,
“mode”: “reduceRow”,
“reduce”: {
“reducer”: “sum”
}
}
}
],
“type”: “stat”
},
{
“datasource”: {
“type”: “prometheus”,
“uid”: “XomoJ9fVk”
},
“description”: “”,
“fieldConfig”: {
“defaults”: {
“custom”: {
“hideFrom”: {
“legend”: false,
“tooltip”: false,
“viz”: false
},
“scaleDistribution”: {
“type”: “linear”
}
}
},
“overrides”:
},
“gridPos”: {
“h”: 12,
“w”: 12,
“x”: 12,
“y”: 11
},
“hideTimeOverride”: false,
“id”: 5,
“interval”: “5s”,
“options”: {
“calculate”: false,
“cellGap”: 4,
“cellValues”: {
“decimals”: 0,
“unit”: “binBps”
},
“color”: {
“exponent”: 0.5,
“fill”: “blue”,
“max”: 20971598,
“min”: 0,
“mode”: “scheme”,
“reverse”: false,
“scale”: “exponential”,
“scheme”: “Spectral”,
“steps”: 64
},
“exemplars”: {
“color”: “rgba(255,0,255,0.7)”
},
“filterValues”: {
“le”: 2048
},
“legend”: {
“show”: true
},
“rowsFrame”: {
“layout”: “unknown”
},
“tooltip”: {
“show”: true,
“yHistogram”: false
},
“yAxis”: {
“axisPlacement”: “left”,
“decimals”: 0,
“reverse”: false
}
},
“pluginVersion”: “9.4.7”,
“targets”: [
{
“datasource”: {
“type”: “prometheus”,
“uid”: “XomoJ9fVk”
},
“editorMode”: “builder”,
“expr”: “rate(haproxy_frontend_bytes_out_total{proxy=~"AG1-FE|AG2-FE|AG3-FE|AG4-FE|AG4B-FE|AG5-FE|AG6-FE|AG7-FE|DRUPAL"}[$__rate_interval])”,
“legendFormat”: “{{proxy}}”,
“range”: true,
“refId”: “A”
}
],
“title”: “Traffico ultime 24 ore”,
“type”: “heatmap”
}
],
“refresh”: “5s”,
“revision”: 1,
“schemaVersion”: 38,
“style”: “dark”,
“tags”: ,
“templating”: {
“list”:
},
“time”: {
“from”: “now-24h”,
“to”: “now”
},
“timepicker”: {
“hidden”: false
},
“timezone”: “”,
“title”: “HAProxy DMZ”,
“uid”: “80iRbrf4z”,
“version”: 35,
“weekStart”: “”
}
This is the json for the dashboard without the relative time set:
{
“annotations”: {
“list”: [
{
“builtIn”: 1,
“datasource”: {
“type”: “grafana”,
“uid”: “-- Grafana --”
},
“enable”: true,
“hide”: true,
“iconColor”: “rgba(0, 211, 255, 1)”,
“name”: “Annotations & Alerts”,
“target”: {
“limit”: 100,
“matchAny”: false,
“tags”: ,
“type”: “dashboard”
},
“type”: “dashboard”
}
]
},
“editable”: true,
“fiscalYearStartMonth”: 0,
“graphTooltip”: 0,
“id”: 61,
“links”: ,
“liveNow”: true,
“panels”: [
{
“datasource”: {
“type”: “prometheus”,
“uid”: “XomoJ9fVk”
},
“description”: “”,
“fieldConfig”: {
“defaults”: {
“color”: {
“mode”: “palette-classic”
},
“custom”: {
“axisCenteredZero”: false,
“axisColorMode”: “text”,
“axisLabel”: “”,
“axisPlacement”: “auto”,
“barAlignment”: 0,
“drawStyle”: “line”,
“fillOpacity”: 100,
“gradientMode”: “none”,
“hideFrom”: {
“legend”: false,
“tooltip”: false,
“viz”: false
},
“lineInterpolation”: “smooth”,
“lineWidth”: 2,
“pointSize”: 5,
“scaleDistribution”: {
“type”: “linear”
},
“showPoints”: “never”,
“spanNulls”: false,
“stacking”: {
“group”: “A”,
“mode”: “normal”
},
“thresholdsStyle”: {
“mode”: “off”
}
},
“mappings”: ,
“thresholds”: {
“mode”: “absolute”,
“steps”: [
{
“color”: “green”,
“value”: null
},
{
“color”: “red”,
“value”: 80
}
]
},
“unit”: “short”
},
“overrides”:
},
“gridPos”: {
“h”: 11,
“w”: 24,
“x”: 0,
“y”: 0
},
“hideTimeOverride”: false,
“id”: 2,
“interval”: “5s”,
“options”: {
“legend”: {
“calcs”: [
“max”
],
“displayMode”: “table”,
“placement”: “right”,
“showLegend”: true,
“sortBy”: “Max”,
“sortDesc”: true
},
“tooltip”: {
“mode”: “multi”,
“sort”: “desc”
}
},
“pluginVersion”: “9.4.7”,
“targets”: [
{
“datasource”: {
“type”: “prometheus”,
“uid”: “XomoJ9fVk”
},
“editorMode”: “builder”,
“exemplar”: false,
“expr”: “haproxy_frontend_current_sessions{proxy=~"AG1-FE|AG2-FE|AG3-FE|AG4-FE|AG4B-FE|AG5-FE|AG6-FE|AG7-FE|DRUPAL"}”,
“format”: “time_series”,
“instant”: false,
“interval”: “5”,
“legendFormat”: “{{proxy}}”,
“range”: true,
“refId”: “A”
}
],
“title”: “Sessioni ultima ora”,
“type”: “timeseries”
},
{
“datasource”: {
“type”: “prometheus”,
“uid”: “XomoJ9fVk”
},
“description”: “”,
“fieldConfig”: {
“defaults”: {
“color”: {
“fixedColor”: “green”,
“mode”: “thresholds”
},
“decimals”: 0,
“mappings”: [
{
“options”: {
“0”: {
“index”: 0,
“text”: “-”
}
},
“type”: “value”
}
],
“max”: 200,
“min”: 0,
“noValue”: “–”,
“thresholds”: {
“mode”: “absolute”,
“steps”: [
{
“color”: “green”,
“value”: null
},
{
“color”: “#EAB839”,
“value”: 100
},
{
“color”: “red”,
“value”: 200
}
]
},
“unit”: “short”
},
“overrides”: [
{
“matcher”: {
“id”: “byName”,
“options”: “[totale]”
},
“properties”: [
{
“id”: “max”,
“value”: 1000
},
{
“id”: “color”,
“value”: {
“mode”: “fixed”
}
}
]
}
]
},
“gridPos”: {
“h”: 12,
“w”: 12,
“x”: 0,
“y”: 11
},
“id”: 3,
“interval”: “5s”,
“options”: {
“colorMode”: “background”,
“graphMode”: “area”,
“justifyMode”: “auto”,
“orientation”: “auto”,
“reduceOptions”: {
“calcs”: [
“lastNotNull”
],
“fields”: “”,
“values”: false
},
“text”: {
“titleSize”: 30,
“valueSize”: 80
},
“textMode”: “value_and_name”
},
“pluginVersion”: “9.4.7”,
“targets”: [
{
“datasource”: {
“type”: “prometheus”,
“uid”: “XomoJ9fVk”
},
“editorMode”: “code”,
“exemplar”: false,
“expr”: “haproxy_frontend_current_sessions{proxy=~"AG1-FE|AG2-FE|AG3-FE|AG4-FE|AG4B-FE|AG5-FE|AG6-FE|AG7-FE|DRUPAL"}”,
“format”: “time_series”,
“instant”: true,
“interval”: “”,
“legendFormat”: “{{proxy}}”,
“range”: false,
“refId”: “A”
}
],
“title”: “Sessioni correnti”,
“transformations”: [
{
“id”: “calculateField”,
“options”: {
“alias”: “[totale]”,
“mode”: “reduceRow”,
“reduce”: {
“reducer”: “sum”
}
}
}
],
“type”: “stat”
},
{
“datasource”: {
“type”: “prometheus”,
“uid”: “XomoJ9fVk”
},
“description”: “”,
“fieldConfig”: {
“defaults”: {
“custom”: {
“hideFrom”: {
“legend”: false,
“tooltip”: false,
“viz”: false
},
“scaleDistribution”: {
“type”: “linear”
}
}
},
“overrides”:
},
“gridPos”: {
“h”: 12,
“w”: 12,
“x”: 12,
“y”: 11
},
“hideTimeOverride”: false,
“id”: 5,
“interval”: “5s”,
“options”: {
“calculate”: false,
“cellGap”: 4,
“cellValues”: {
“decimals”: 0,
“unit”: “binBps”
},
“color”: {
“exponent”: 0.5,
“fill”: “blue”,
“max”: 20971598,
“min”: 0,
“mode”: “scheme”,
“reverse”: false,
“scale”: “exponential”,
“scheme”: “Spectral”,
“steps”: 64
},
“exemplars”: {
“color”: “rgba(255,0,255,0.7)”
},
“filterValues”: {
“le”: 2048
},
“legend”: {
“show”: true
},
“rowsFrame”: {
“layout”: “unknown”
},
“tooltip”: {
“show”: true,
“yHistogram”: false
},
“yAxis”: {
“axisPlacement”: “left”,
“decimals”: 0,
“reverse”: false
}
},
“pluginVersion”: “9.4.7”,
“targets”: [
{
“datasource”: {
“type”: “prometheus”,
“uid”: “XomoJ9fVk”
},
“editorMode”: “builder”,
“expr”: “rate(haproxy_frontend_bytes_out_total{proxy=~"AG1-FE|AG2-FE|AG3-FE|AG4-FE|AG4B-FE|AG5-FE|AG6-FE|AG7-FE|DRUPAL"}[$__rate_interval])”,
“legendFormat”: “{{proxy}}”,
“range”: true,
“refId”: “A”
}
],
“title”: “Traffico ultime 24 ore”,
“type”: “heatmap”
}
],
“refresh”: “5s”,
“revision”: 1,
“schemaVersion”: 38,
“style”: “dark”,
“tags”: ,
“templating”: {
“list”:
},
“time”: {
“from”: “now-24h”,
“to”: “now”
},
“timepicker”: {
“hidden”: false
},
“timezone”: “”,
“title”: “HAProxy DMZ”,
“uid”: “80iRbrf4z”,
“version”: 35,
“weekStart”: “”
}
I’m using Grafana 9.4.7.
Can you help me?
Thanks,
Giovanni