How can i turn no data to zero in Loki

Hi all , Im looking for a way to turn the null/no data return to zero in logql. Im trying to get the percent of the request just like

sum(count_over_time({app="xxx"}|="{"|json|route="POST /api/a" , status=~`200|400|401|403|429|404` [1m])) / sum(count_over_time({app="xxx"}|="{"|json|route="POST /api/a" [1m]))

But when there is no 200|400|401|403|429|404 of /api/a the return of sum(count_over_time({app="xxx"}|="{"|json|route="POST /api/a" , status=~200|400|401|403|429|404 [1m])) is no data ,and i wanna turn it to zero. So the total result can be 0%

This is a good question, I’m not sure if this is currently possible but will ask the team for options here!

I am also interested in this. Any way to make a logql query return zero when theres no data ?

It’d be really helpful to get an answer on this. Now that we can alert based on Loki LogQL metric queries, sending alerts based on error logs seems like a common use case. But if your query returns no data when there are no error logs, it’s impossible to get your alert to work properly.

this is a useful feature, like the or on() vector(0) in prometheus query, which will help on alerting and also some calculation.

Any progress on it?

Came up with kinda ugly solution. Basic idea is that you should negate your regexp first, and than subtract this value from sum without conditions. Something like this:
sum(x) - sum ( x | code !~"^5…")

I agree that this is a useful feature.
For example if I display graph line of number of errors in logs - if there are none I want it to be displayed as 0 and that it won’t disappear from the graph.

I used a Grafana transformation which seems to work

Add field from calculation → Binary operation
Select the query and do + 0
I then hide the original query

It would be easier if we could do this in the original query though

Agreed! I opened a discussion on Github as well to follow this: How can i turn no data to zero in Loki · Discussion #39742 · grafana/grafana · GitHub

If we have an option to join with a vector of 0 and do a sum, would be good.

I would like this too!

[doc] logql: logql engine support exec vector(0) grama #7044

The transformation hack no longer appears to work.

I’ve arrived here looking for a solution. If anyone is too, nowadays is quite simple:
In grafana / Edit panel / Standard options / No value = 0

To handle cases in LogQL where a query returns null or “no data” and convert it to zero, you can use the or operator along with a conditional expression. Here’s how you can modify your query to achieve that:

Modified Query

logql

sum(count_over_time({app=“xxx”}|=“{”|json|route=“POST /api/a”, status=~“200|400|401|403|429|404”[1m])) or 0


Complete Percent Calculation

To ensure the entire percentage calculation correctly handles cases where the numerator might be zero (resulting in "no data"), you can wrap your entire division in an `or` statement:

logql
(sum(count_over_time({app="xxx"}|="{"|json|route="POST /api/a", status=~"200|400|401|403|429|404"[1m])) or 0) / 
(sum(count_over_time({app="xxx"}|="{"|json|route="POST /api/a"[1m])) or 1) * 100

1. **Handling No Data:** The `or 0` part ensures that if the `sum(count_over_time(...))` returns `no data`, it will instead return `0`.
2. **Preventing Division by Zero:** The second part of the division uses `or 1`. This means that if there are no requests at all (the denominator is `0`), it will default to `1` instead. This prevents division by zero, and if the numerator is also `0`, the entire expression will yield `0%`.
3. **Calculating Percentage:** Finally, multiplying by `100` at the end gives you the percentage value.

In Loki, you can use the fill() function to convert no data (null values) to zero. Apply it to your query like this:

scss

Copy code
sum(rate(your_query[1m])) or vector(0).
This will display zero where there’s no data.

In Grafana Loki, “no data” usually happens when a query returns no log streams for the selected time range. If you want it to behave like 0 instead of no data, you typically handle it in Grafana using query tricks or panel transformations.

:one: Use or vector(0) (most common method)

Add or vector(0) to your query so that when no data is returned, 0 is used instead.

Example:

sum(rate({app="my-app"}[5m])) or vector(0)

Explanation

  • sum(rate(...)) → your normal metric calculation

  • or vector(0) → if the query returns nothing, Grafana shows 0


:two: Use Grafana Panel Settings

In the panel:

  1. Open panel → Edit

  2. Go to Field → Standard options

  3. Set No value → 0

This makes the panel display 0 instead of “No data.”


:three: Use clamp_min()

If the result may go negative or empty, you can force a minimum of 0:

clamp_min(sum(rate({app="my-app"}[5m])), 0)

:white_check_mark: Most reliable approach:

Use or vector(0) in the query.

{
“\__inputs”: \[
{
“name”: “DS_PROMETHEUS”,
“label”: “prometheus”,
“description”: “”,
“type”: “datasource”,
“pluginId”: “prometheus”,
“pluginName”: “Prometheus”
}
\],
“\__elements”: {},
“\__requires”: \[
{
“type”: “grafana”,
“id”: “grafana”,
“name”: “Grafana”,
“version”: “12.2.0”
},
{
“type”: “datasource”,
“id”: “prometheus”,
“name”: “Prometheus”,
“version”: “1.0.0”
},
{
“type”: “panel”,
“id”: “stat”,
“name”: “Stat”,
“version”: “”
},
{
“type”: “panel”,
“id”: “table”,
“name”: “Table”,
“version”: “”
},
{
“type”: “panel”,
“id”: “timeseries”,
“name”: “Time series”,
“version”: “”
}
\],
“annotations”: {
“list”: \[
{
“builtIn”: 1,
“datasource”: {
“type”: “grafana”,
“uid”: “-- Grafana --”
},
“enable”: true,
“hide”: true,
“iconColor”: “rgba(0, 211, 255, 1)”,
“name”: “Annotations & Alerts”,
“type”: “dashboard”
}
\]
},
“description”: “Oracle dashboard monitors db status, active sessions, user commits, wait times and more.”,
“editable”: true,
“fiscalYearStartMonth”: 0,
“graphTooltip”: 1,
“id”: null,
“links”: \[
{
“asDropdown”: true,
“icon”: “external link”,
“tags”: [ ],
“type”: “dashboards”
}
\],
“panels”: \[
{
“datasource”: {
“type”: “prometheus”,
“uid”: “${DS_PROMETHEUS}”
},
“fieldConfig”: {
“defaults”: {
“color”: {
“mode”: “thresholds”
},
“decimals”: 0,
“mappings”: [ ],
“noValue”: “N/A”,
“thresholds”: {
“mode”: “absolute”,
“steps”: \[
{
“color”: “green”,
“value”: 0
},
{
“color”: “red”,
“value”: 80
}
\]
},
“unit”: “none”
},
“overrides”: [ ]
},
“gridPos”: {
“h”: 4,
“w”: 8,
“x”: 0,
“y”: 0
},
“id”: 65,
“options”: {
“colorMode”: “none”,
“graphMode”: “none”,
“justifyMode”: “center”,
“orientation”: “auto”,
“percentChangeColorMode”: “standard”,
“reduceOptions”: {
“calcs”: \[
“lastNotNull”
\],
“fields”: “”,
“values”: false
},
“showPercentChange”: true,
“textMode”: “auto”,
“wideLayout”: true
},
“pluginVersion”: “12.2.0”,
“targets”: \[
{
“datasource”: {
“type”: “prometheus”,
“uid”: “${DS_PROMETHEUS}”
},
“editorMode”: “code”,
“exemplar”: false,
“expr”: “oracledb_db_system_value{database="fin"}”,
“format”: “time_series”,
“instant”: false,
“legendFormat”: “{{name}}”,
“range”: true,
“refId”: “A”
}
\],
“title”: “FIN DB Configuraion”,
“transparent”: true,
“type”: “stat”
},
{
“datasource”: {
“type”: “prometheus”,
“uid”: “${DS_PROMETHEUS}”
},
“fieldConfig”: {
“defaults”: {
“color”: {
“mode”: “thresholds”
},
“decimals”: 0,
“mappings”: [ ],
“noValue”: “N/A”,
“thresholds”: {
“mode”: “absolute”,
“steps”: \[
{
“color”: “green”,
“value”: 0
},
{
“color”: “red”,
“value”: 80
}
\]
},
“unit”: “none”
},
“overrides”: [ ]
},
“gridPos”: {
“h”: 4,
“w”: 8,
“x”: 8,
“y”: 0
},
“id”: 66,
“options”: {
“colorMode”: “none”,
“graphMode”: “none”,
“justifyMode”: “center”,
“orientation”: “auto”,
“percentChangeColorMode”: “standard”,
“reduceOptions”: {
“calcs”: \[
“lastNotNull”
\],
“fields”: “”,
“values”: false
},
“showPercentChange”: true,
“textMode”: “auto”,
“wideLayout”: true
},
“pluginVersion”: “12.2.0”,
“targets”: \[
{
“datasource”: {
“type”: “prometheus”,
“uid”: “${DS_PROMETHEUS}”
},
“editorMode”: “code”,
“exemplar”: false,
“expr”: “oracledb_db_system_value{database="mlc"}”,
“format”: “time_series”,
“instant”: false,
“legendFormat”: “{{name}}”,
“range”: true,
“refId”: “A”
}
\],
“title”: “MLC DB Configuraion”,
“transparent”: true,
“type”: “stat”
},
{
“datasource”: {
“type”: “prometheus”,
“uid”: “${DS_PROMETHEUS}”
},
“fieldConfig”: {
“defaults”: {
“color”: {
“mode”: “thresholds”
},
“decimals”: 0,
“mappings”: [ ],
“noValue”: “N/A”,
“thresholds”: {
“mode”: “absolute”,
“steps”: \[
{
“color”: “green”,
“value”: 0
},
{
“color”: “red”,
“value”: 80
}
\]
},
“unit”: “none”
},
“overrides”: [ ]
},
“gridPos”: {
“h”: 4,
“w”: 8,
“x”: 16,
“y”: 0
},
“id”: 67,
“options”: {
“colorMode”: “none”,
“graphMode”: “none”,
“justifyMode”: “center”,
“orientation”: “auto”,
“percentChangeColorMode”: “standard”,
“reduceOptions”: {
“calcs”: \[
“lastNotNull”
\],
“fields”: “”,
“values”: false
},
“showPercentChange”: true,
“textMode”: “auto”,
“wideLayout”: true
},
“pluginVersion”: “12.2.0”,
“targets”: \[
{
“datasource”: {
“type”: “prometheus”,
“uid”: “${DS_PROMETHEUS}”
},
“editorMode”: “code”,
“exemplar”: false,
“expr”: “oracledb_db_system_value{database="REP"}”,
“format”: “time_series”,
“instant”: false,
“legendFormat”: “{{name}}”,
“range”: true,
“refId”: “A”
}
\],
“title”: “FIN DB Configuraion”,
“transparent”: true,
“type”: “stat”
},
{
“datasource”: {
“type”: “prometheus”,
“uid”: “${DS_PROMETHEUS}”
},
“fieldConfig”: {
“defaults”: {
“color”: {
“mode”: “thresholds”
},
“custom”: {
“align”: “auto”,
“cellOptions”: {
“type”: “auto”
},
“footer”: {
“reducers”: [ ]
},
“inspect”: false
},
“mappings”: [ ],
“thresholds”: {
“mode”: “absolute”,
“steps”: \[
{
“color”: “green”,
“value”: 0
},
{
“color”: “red”,
“value”: 80
}
\]
}
},
“overrides”: [ ]
},
“gridPos”: {
“h”: 5,
“w”: 24,
“x”: 0,
“y”: 4
},
“id”: 64,
“options”: {
“cellHeight”: “sm”,
“showHeader”: true
},
“pluginVersion”: “12.2.0”,
“targets”: \[
{
“datasource”: {
“type”: “prometheus”,
“uid”: “${DS_PROMETHEUS}”
},
“editorMode”: “code”,
“exemplar”: false,
“expr”: “oracledb_db_platform_value”,
“format”: “table”,
“instant”: true,
“legendFormat”: “\__auto”,
“range”: false,
“refId”: “A”
}
\],
“title”: “DATABASE INFO”,
“transformations”: \[
{
“id”: “organize”,
“options”: {
“excludeByName”: {
“Time”: true,
“Value”: true,
“**name**”: true,
“instance”: true,
“job”: true
},
“includeByName”: {},
“indexByName”: {
“Time”: 0,
“Value”: 8,
“**name**”: 1,
“database”: 2,
“instance”: 4,
“job”: 5,
“pdb”: 6,
“platform_name”: 7,
“sid”: 3
},
“renameByName”: {
“database”: “DATABASE”,
“pdb”: “PDB”,
“platform_name”: “OS - PLATFORM”,
“sid”: “SID”
}
}
}
\],
“transparent”: true,
“type”: “table”
},
{
“collapsed”: false,
“gridPos”: {
“h”: 1,
“w”: 24,
“x”: 0,
“y”: 9
},
“id”: 61,
“panels”: [ ],
“title”: “Widgets”,
“type”: “row”
},
{
“datasource”: {
“type”: “prometheus”,
“uid”: “${DS_PROMETHEUS}”
},
“fieldConfig”: {
“defaults”: {
“color”: {
“mode”: “thresholds”
},
“mappings”: \[
{
“options”: {
“0”: {
“text”: “DEAD”
},
“1”: {
“text”: “ALIVE”
}
},
“type”: “value”
}
\],
“thresholds”: {
“mode”: “absolute”,
“steps”: \[
{
“color”: “rgba(245, 54, 54, 0.9)”,
“value”: 0
},
{
“color”: “rgba(237, 129, 40, 0.89)”,
“value”: 0
},
{
“color”: “rgba(50, 172, 45, 0.97)”,
“value”: 1
}
\]
},
“unit”: “none”
},
“overrides”: [ ]
},
“gridPos”: {
“h”: 4,
“w”: 6,
“x”: 0,
“y”: 10
},
“id”: 12,
“interval”: “$interval”,
“maxDataPoints”: 100,
“options”: {
“colorMode”: “value”,
“graphMode”: “area”,
“justifyMode”: “auto”,
“orientation”: “horizontal”,
“percentChangeColorMode”: “standard”,
“reduceOptions”: {
“calcs”: \[
“lastNotNull”
\],
“fields”: “”,
“values”: false
},
“showPercentChange”: true,
“textMode”: “auto”,
“wideLayout”: true
},
“pluginVersion”: “12.2.0”,
“targets”: \[
{
“calculatedInterval”: “10m”,
“datasource”: {
“type”: “prometheus”,
“uid”: “${DS_PROMETHEUS}”
},
“datasourceErrors”: {},
“errors”: {},
“expr”: “oracledb_up{instance="$host"}”,
“format”: “time_series”,
“interval”: “5m”,
“intervalFactor”: 1,
“legendFormat”: “”,
“metric”: “”,
“refId”: “A”,
“step”: 300
}
\],
“title”: “oracledb status”,
“transparent”: true,
“type”: “stat”
},
{
“datasource”: {
“type”: “prometheus”,
“uid”: “${DS_PROMETHEUS}”
},
“fieldConfig”: {
“defaults”: {
“color”: {
“mode”: “thresholds”
},
“mappings”: [ ],
“thresholds”: {
“mode”: “absolute”,
“steps”: \[
{
“color”: “green”,
“value”: 0
},
{
“color”: “red”,
“value”: 80
}
\]
},
“unit”: “short”
},
“overrides”: [ ]
},
“gridPos”: {
“h”: 4,
“w”: 6,
“x”: 6,
“y”: 10
},
“id”: 13,
“interval”: “$interval”,
“maxDataPoints”: 100,
“options”: {
“colorMode”: “value”,
“graphMode”: “area”,
“justifyMode”: “auto”,
“orientation”: “horizontal”,
“percentChangeColorMode”: “standard”,
“reduceOptions”: {
“calcs”: \[
“lastNotNull”
\],
“fields”: “”,
“values”: false
},
“showPercentChange”: false,
“textMode”: “auto”,
“wideLayout”: true
},
“pluginVersion”: “12.2.0”,
“targets”: \[
{
“calculatedInterval”: “10m”,
“datasource”: {
“type”: “prometheus”,
“uid”: “${DS_PROMETHEUS}”
},
“datasourceErrors”: {},
“editorMode”: “code”,
“errors”: {},
“exemplar”: false,
“expr”: “oracledb_sessions_value{instance="$host", type="USER",status="ACTIVE"}”,
“format”: “time_series”,
“instant”: true,
“interval”: “$interval”,
“intervalFactor”: 1,
“legendFormat”: “”,
“metric”: “”,
“range”: false,
“refId”: “A”,
“step”: 60
}
\],
“title”: “active sessions”,
“transparent”: true,
“type”: “stat”
},
{
“datasource”: {
“type”: “prometheus”,
“uid”: “${DS_PROMETHEUS}”
},
“fieldConfig”: {
“defaults”: {
“color”: {
“fixedColor”: “rgb(31, 120, 193)”,
“mode”: “fixed”
},
“mappings”: [ ],
“thresholds”: {
“mode”: “absolute”,
“steps”: \[
{
“color”: “rgba(50, 172, 45, 0.97)”,
“value”: 0
},
{
“color”: “rgba(237, 129, 40, 0.89)”,
“value”: 90
},
{
“color”: “rgba(245, 54, 54, 0.9)”,
“value”: 95
}
\]
},
“unit”: “none”
},
“overrides”: [ ]
},
“gridPos”: {
“h”: 4,
“w”: 6,
“x”: 12,
“y”: 10
},
“id”: 51,
“interval”: “$interval”,
“maxDataPoints”: 100,
“options”: {
“colorMode”: “none”,
“graphMode”: “area”,
“justifyMode”: “auto”,
“orientation”: “horizontal”,
“percentChangeColorMode”: “standard”,
“reduceOptions”: {
“calcs”: \[
“lastNotNull”
\],
“fields”: “”,
“values”: false
},
“showPercentChange”: false,
“textMode”: “auto”,
“wideLayout”: true
},
“pluginVersion”: “12.2.0”,
“targets”: \[
{
“calculatedInterval”: “10m”,
“datasource”: {
“type”: “prometheus”,
“uid”: “${DS_PROMETHEUS}”
},
“datasourceErrors”: {},
“errors”: {},
“expr”: “oracledb_activity_user_commits{instance="$host"}”,
“format”: “time_series”,
“interval”: “5m”,
“intervalFactor”: 1,
“legendFormat”: “”,
“metric”: “”,
“refId”: “A”,
“step”: 300
}
\],
“title”: “user commits”,
“transparent”: true,
“type”: “stat”
},
{
“datasource”: {
“type”: “prometheus”,
“uid”: “${DS_PROMETHEUS}”
},
“fieldConfig”: {
“defaults”: {
“color”: {
“mode”: “thresholds”
},
“mappings”: [ ],
“thresholds”: {
“mode”: “absolute”,
“steps”: \[
{
“color”: “green”,
“value”: 0
},
{
“color”: “red”,
“value”: 80
}
\]
},
“unit”: “none”
},
“overrides”: [ ]
},
“gridPos”: {
“h”: 4,
“w”: 6,
“x”: 18,
“y”: 10
},
“id”: 52,
“interval”: “$interval”,
“maxDataPoints”: 100,
“options”: {
“colorMode”: “value”,
“graphMode”: “area”,
“justifyMode”: “auto”,
“orientation”: “horizontal”,
“percentChangeColorMode”: “standard”,
“reduceOptions”: {
“calcs”: \[
“lastNotNull”
\],
“fields”: “”,
“values”: false
},
“showPercentChange”: false,
“textMode”: “auto”,
“wideLayout”: true
},
“pluginVersion”: “12.2.0”,
“targets”: \[
{
“calculatedInterval”: “10m”,
“datasource”: {
“type”: “prometheus”,
“uid”: “${DS_PROMETHEUS}”
},
“datasourceErrors”: {},
“errors”: {},
“expr”: “oracledb_activity_execute_count{instance="$host"}”,
“format”: “time_series”,
“interval”: “5m”,
“intervalFactor”: 1,
“legendFormat”: “”,
“metric”: “”,
“refId”: “A”,
“step”: 300
}
\],
“title”: “execute count”,
“transparent”: true,
“type”: “stat”
},
{
“collapsed”: false,
“gridPos”: {
“h”: 1,
“w”: 24,
“x”: 0,
“y”: 14
},
“id”: 63,
“panels”: [ ],
“title”: “Table Locks”,
“type”: “row”
},
{
“datasource”: {
“type”: “prometheus”,
“uid”: “${DS_PROMETHEUS}”
},
“fieldConfig”: {
“defaults”: {
“color”: {
“mode”: “palette-classic”
},
“custom”: {
“axisBorderShow”: false,
“axisCenteredZero”: false,
“axisColorMode”: “text”,
“axisLabel”: “”,
“axisPlacement”: “auto”,
“barAlignment”: 0,
“barWidthFactor”: 0.6,
“drawStyle”: “line”,
“fillOpacity”: 20,
“gradientMode”: “none”,
“hideFrom”: {
“legend”: false,
“tooltip”: false,
“viz”: false
},
“insertNulls”: false,
“lineInterpolation”: “linear”,
“lineWidth”: 2,
“pointSize”: 5,
“scaleDistribution”: {
“type”: “linear”
},
“showPoints”: “never”,
“showValues”: false,
“spanNulls”: false,
“stacking”: {
“group”: “A”,
“mode”: “none”
},
“thresholdsStyle”: {
“mode”: “off”
}
},
“mappings”: [ ],
“min”: 0,
“thresholds”: {
“mode”: “absolute”,
“steps”: \[
{
“color”: “green”,
“value”: 0
},
{
“color”: “red”,
“value”: 80
}
\]
},
“unit”: “short”
},
“overrides”: [ ]
},
“gridPos”: {
“h”: 7,
“w”: 12,
“x”: 0,
“y”: 15
},
“id”: 53,
“options”: {
“legend”: {
“calcs”: [ ],
“displayMode”: “list”,
“placement”: “bottom”,
“showLegend”: false
},
“tooltip”: {
“hideZeros”: false,
“mode”: “multi”,
“sort”: “none”
}
},
“pluginVersion”: “12.2.0”,
“targets”: \[
{
“calculatedInterval”: “2m”,
“datasource”: {
“type”: “prometheus”,
“uid”: “${DS_PROMETHEUS}”
},
“datasourceErrors”: {},
“errors”: {},
“expr”: “oracledb_wait_time_concurrency{instance="$host"}”,
“format”: “time_series”,
“interval”: “$interval”,
“intervalFactor”: 1,
“legendFormat”: “”,
“metric”: “”,
“refId”: “A”,
“step”: 60
}
\],
“title”: “wait time concurrency”,
“transparent”: true,
“type”: “timeseries”
},
{
“datasource”: {
“type”: “prometheus”,
“uid”: “${DS_PROMETHEUS}”
},
“fieldConfig”: {
“defaults”: {
“color”: {
“mode”: “palette-classic”
},
“custom”: {
“axisBorderShow”: false,
“axisCenteredZero”: false,
“axisColorMode”: “text”,
“axisLabel”: “”,
“axisPlacement”: “auto”,
“barAlignment”: 0,
“barWidthFactor”: 0.6,
“drawStyle”: “line”,
“fillOpacity”: 20,
“gradientMode”: “none”,
“hideFrom”: {
“legend”: false,
“tooltip”: false,
“viz”: false
},
“insertNulls”: false,
“lineInterpolation”: “linear”,
“lineWidth”: 2,
“pointSize”: 5,
“scaleDistribution”: {
“type”: “linear”
},
“showPoints”: “never”,
“showValues”: false,
“spanNulls”: false,
“stacking”: {
“group”: “A”,
“mode”: “none”
},
“thresholdsStyle”: {
“mode”: “off”
}
},
“mappings”: [ ],
“min”: 0,
“thresholds”: {
“mode”: “absolute”,
“steps”: \[
{
“color”: “green”,
“value”: 0
},
{
“color”: “red”,
“value”: 80
}
\]
},
“unit”: “short”
},
“overrides”: [ ]
},
“gridPos”: {
“h”: 7,
“w”: 12,
“x”: 12,
“y”: 15
},
“id”: 54,
“options”: {
“legend”: {
“calcs”: [ ],
“displayMode”: “list”,
“placement”: “bottom”,
“showLegend”: false
},
“tooltip”: {
“hideZeros”: false,
“mode”: “multi”,
“sort”: “none”
}
},
“pluginVersion”: “12.2.0”,
“targets”: \[
{
“calculatedInterval”: “2m”,
“datasource”: {
“type”: “prometheus”,
“uid”: “${DS_PROMETHEUS}”
},
“datasourceErrors”: {},
“errors”: {},
“expr”: “oracledb_wait_time_commit{instance="$host"}”,
“format”: “time_series”,
“interval”: “$interval”,
“intervalFactor”: 1,
“legendFormat”: “”,
“metric”: “”,
“refId”: “A”,
“step”: 60
}
\],
“title”: “wait time commit”,
“transparent”: true,
“type”: “timeseries”
},
{
“datasource”: {
“type”: “prometheus”,
“uid”: “${DS_PROMETHEUS}”
},
“fieldConfig”: {
“defaults”: {
“color”: {
“mode”: “palette-classic”
},
“custom”: {
“axisBorderShow”: false,
“axisCenteredZero”: false,
“axisColorMode”: “text”,
“axisLabel”: “”,
“axisPlacement”: “auto”,
“barAlignment”: 0,
“barWidthFactor”: 0.6,
“drawStyle”: “line”,
“fillOpacity”: 20,
“gradientMode”: “none”,
“hideFrom”: {
“legend”: false,
“tooltip”: false,
“viz”: false
},
“insertNulls”: false,
“lineInterpolation”: “linear”,
“lineWidth”: 2,
“pointSize”: 5,
“scaleDistribution”: {
“type”: “linear”
},
“showPoints”: “never”,
“showValues”: false,
“spanNulls”: false,
“stacking”: {
“group”: “A”,
“mode”: “none”
},
“thresholdsStyle”: {
“mode”: “off”
}
},
“mappings”: [ ],
“min”: 0,
“thresholds”: {
“mode”: “absolute”,
“steps”: \[
{
“color”: “green”,
“value”: 0
},
{
“color”: “red”,
“value”: 80
}
\]
},
“unit”: “short”
},
“overrides”: [ ]
},
“gridPos”: {
“h”: 7,
“w”: 12,
“x”: 0,
“y”: 22
},
“id”: 55,
“options”: {
“legend”: {
“calcs”: [ ],
“displayMode”: “list”,
“placement”: “bottom”,
“showLegend”: false
},
“tooltip”: {
“hideZeros”: false,
“mode”: “multi”,
“sort”: “none”
}
},
“pluginVersion”: “12.2.0”,
“targets”: \[
{
“calculatedInterval”: “2m”,
“datasource”: {
“type”: “prometheus”,
“uid”: “${DS_PROMETHEUS}”
},
“datasourceErrors”: {},
“errors”: {},
“expr”: “oracledb_wait_time_system_io{instance="$host"}”,
“format”: “time_series”,
“interval”: “$interval”,
“intervalFactor”: 1,
“legendFormat”: “”,
“metric”: “”,
“refId”: “A”,
“step”: 60
}
\],
“title”: “wait time system io”,
“transparent”: true,
“type”: “timeseries”
},
{
“datasource”: {
“type”: “prometheus”,
“uid”: “${DS_PROMETHEUS}”
},
“fieldConfig”: {
“defaults”: {
“color”: {
“mode”: “palette-classic”
},
“custom”: {
“axisBorderShow”: false,
“axisCenteredZero”: false,
“axisColorMode”: “text”,
“axisLabel”: “”,
“axisPlacement”: “auto”,
“barAlignment”: 0,
“barWidthFactor”: 0.6,
“drawStyle”: “line”,
“fillOpacity”: 20,
“gradientMode”: “none”,
“hideFrom”: {
“legend”: false,
“tooltip”: false,
“viz”: false
},
“insertNulls”: false,
“lineInterpolation”: “linear”,
“lineWidth”: 2,
“pointSize”: 5,
“scaleDistribution”: {
“type”: “linear”
},
“showPoints”: “never”,
“showValues”: false,
“spanNulls”: false,
“stacking”: {
“group”: “A”,
“mode”: “none”
},
“thresholdsStyle”: {
“mode”: “off”
}
},
“mappings”: [ ],
“min”: 0,
“thresholds”: {
“mode”: “absolute”,
“steps”: \[
{
“color”: “green”,
“value”: 0
},
{
“color”: “red”,
“value”: 80
}
\]
},
“unit”: “short”
},
“overrides”: [ ]
},
“gridPos”: {
“h”: 7,
“w”: 12,
“x”: 12,
“y”: 22
},
“id”: 56,
“options”: {
“legend”: {
“calcs”: [ ],
“displayMode”: “list”,
“placement”: “bottom”,
“showLegend”: false
},
“tooltip”: {
“hideZeros”: false,
“mode”: “multi”,
“sort”: “none”
}
},
“pluginVersion”: “12.2.0”,
“targets”: \[
{
“calculatedInterval”: “2m”,
“datasource”: {
“type”: “prometheus”,
“uid”: “${DS_PROMETHEUS}”
},
“datasourceErrors”: {},
“errors”: {},
“expr”: “oracledb_wait_time_user_io{instance="$host"}\\t”,
“format”: “time_series”,
“interval”: “$interval”,
“intervalFactor”: 1,
“legendFormat”: “”,
“metric”: “”,
“refId”: “A”,
“step”: 60
}
\],
“title”: “wait time user io”,
“transparent”: true,
“type”: “timeseries”
},
{
“datasource”: {
“type”: “prometheus”,
“uid”: “${DS_PROMETHEUS}”
},
“fieldConfig”: {
“defaults”: {
“color”: {
“mode”: “palette-classic”
},
“custom”: {
“axisBorderShow”: false,
“axisCenteredZero”: false,
“axisColorMode”: “text”,
“axisLabel”: “”,
“axisPlacement”: “auto”,
“barAlignment”: 0,
“drawStyle”: “line”,
“fillOpacity”: 20,
“gradientMode”: “none”,
“hideFrom”: {
“legend”: false,
“tooltip”: false,
“viz”: false
},
“insertNulls”: false,
“lineInterpolation”: “linear”,
“lineWidth”: 2,
“pointSize”: 5,
“scaleDistribution”: {
“type”: “linear”
},
“showPoints”: “never”,
“spanNulls”: false,
“stacking”: {
“group”: “A”,
“mode”: “none”
},
“thresholdsStyle”: {
“mode”: “off”
}
},
“mappings”: [ ],
“min”: 0,
“thresholds”: {
“mode”: “absolute”,
“steps”: \[
{
“color”: “green”
},
{
“color”: “red”,
“value”: 80
}
\]
},
“unit”: “short”
},
“overrides”: [ ]
},
“gridPos”: {
“h”: 7,
“w”: 12,
“x”: 0,
“y”: 29
},
“id”: 59,
“options”: {
“legend”: {
“calcs”: [ ],
“displayMode”: “list”,
“placement”: “bottom”,
“showLegend”: false
},
“tooltip”: {
“mode”: “multi”,
“sort”: “none”
}
},
“pluginVersion”: “10.4.5”,
“targets”: \[
{
“calculatedInterval”: “2m”,
“datasource”: {
“type”: “prometheus”,
“uid”: “${DS_PROMETHEUS}”
},
“datasourceErrors”: {},
“errors”: {},
“expr”: “oracledb_wait_time_application{instance="$host"}\\t”,
“format”: “time_series”,
“interval”: “$interval”,
“intervalFactor”: 1,
“legendFormat”: “”,
“metric”: “”,
“refId”: “A”,
“step”: 60
}
\],
“title”: “wait time application”,
“transparent”: true,
“type”: “timeseries”
},
{
“datasource”: {
“type”: “prometheus”,
“uid”: “${DS_PROMETHEUS}”
},
“fieldConfig”: {
“defaults”: {
“color”: {
“mode”: “palette-classic”
},
“custom”: {
“axisBorderShow”: false,
“axisCenteredZero”: false,
“axisColorMode”: “text”,
“axisLabel”: “”,
“axisPlacement”: “auto”,
“barAlignment”: 0,
“drawStyle”: “line”,
“fillOpacity”: 20,
“gradientMode”: “none”,
“hideFrom”: {
“legend”: false,
“tooltip”: false,
“viz”: false
},
“insertNulls”: false,
“lineInterpolation”: “linear”,
“lineWidth”: 2,
“pointSize”: 5,
“scaleDistribution”: {
“type”: “linear”
},
“showPoints”: “never”,
“spanNulls”: false,
“stacking”: {
“group”: “A”,
“mode”: “none”
},
“thresholdsStyle”: {
“mode”: “off”
}
},
“mappings”: [ ],
“min”: 0,
“thresholds”: {
“mode”: “absolute”,
“steps”: \[
{
“color”: “green”
},
{
“color”: “red”,
“value”: 80
}
\]
},
“unit”: “short”
},
“overrides”: [ ]
},
“gridPos”: {
“h”: 7,
“w”: 12,
“x”: 12,
“y”: 29
},
“id”: 60,
“options”: {
“legend”: {
“calcs”: [ ],
“displayMode”: “list”,
“placement”: “bottom”,
“showLegend”: false
},
“tooltip”: {
“mode”: “multi”,
“sort”: “none”
}
},
“pluginVersion”: “10.4.5”,
“targets”: \[
{
“calculatedInterval”: “2m”,
“datasource”: {
“type”: “prometheus”,
“uid”: “${DS_PROMETHEUS}”
},
“datasourceErrors”: {},
“errors”: {},
“expr”: “oracledb_wait_time_network{instance="$host"}\\t”,
“format”: “time_series”,
“interval”: “$interval”,
“intervalFactor”: 1,
“legendFormat”: “”,
“metric”: “”,
“refId”: “A”,
“step”: 60
}
\],
“title”: “wait time network”,
“transparent”: true,
“type”: “timeseries”
},
{
“collapsed”: false,
“gridPos”: {
“h”: 1,
“w”: 24,
“x”: 0,
“y”: 36
},
“id”: 62,
“panels”: [ ],
“title”: “Exporter Status”,
“type”: “row”
},
{
“datasource”: {
“type”: “prometheus”,
“uid”: “${DS_PROMETHEUS}”
},
“fieldConfig”: {
“defaults”: {
“color”: {
“mode”: “palette-classic”
},
“custom”: {
“axisBorderShow”: false,
“axisCenteredZero”: false,
“axisColorMode”: “text”,
“axisLabel”: “”,
“axisPlacement”: “auto”,
“barAlignment”: 0,
“drawStyle”: “line”,
“fillOpacity”: 10,
“gradientMode”: “none”,
“hideFrom”: {
“legend”: false,
“tooltip”: false,
“viz”: false
},
“insertNulls”: false,
“lineInterpolation”: “linear”,
“lineWidth”: 2,
“pointSize”: 5,
“scaleDistribution”: {
“type”: “linear”
},
“showPoints”: “never”,
“spanNulls”: false,
“stacking”: {
“group”: “A”,
“mode”: “none”
},
“thresholdsStyle”: {
“mode”: “off”
}
},
“mappings”: [ ],
“thresholds”: {
“mode”: “absolute”,
“steps”: \[
{
“color”: “green”
},
{
“color”: “red”,
“value”: 80
}
\]
},
“unit”: “short”
},
“overrides”: [ ]
},
“gridPos”: {
“h”: 7,
“w”: 12,
“x”: 0,
“y”: 37
},
“id”: 57,
“options”: {
“legend”: {
“calcs”: [ ],
“displayMode”: “list”,
“placement”: “bottom”,
“showLegend”: false
},
“tooltip”: {
“mode”: “multi”,
“sort”: “none”
}
},
“pluginVersion”: “10.4.5”,
“targets”: \[
{
“datasource”: {
“type”: “prometheus”,
“uid”: “${DS_PROMETHEUS}”
},
“expr”: “oracledb_exporter_last_scrape_duration_seconds{instance="$host"}\\t”,
“format”: “time_series”,
“intervalFactor”: 2,
“refId”: “A”,
“step”: 10
}
\],
“title”: “last scrape duration seconds”,
“transparent”: true,
“type”: “timeseries”
},
{
“datasource”: {
“type”: “prometheus”,
“uid”: “${DS_PROMETHEUS}”
},
“fieldConfig”: {
“defaults”: {
“color”: {
“mode”: “palette-classic”
},
“custom”: {
“axisBorderShow”: false,
“axisCenteredZero”: false,
“axisColorMode”: “text”,
“axisLabel”: “”,
“axisPlacement”: “auto”,
“barAlignment”: 0,
“drawStyle”: “line”,
“fillOpacity”: 10,
“gradientMode”: “none”,
“hideFrom”: {
“legend”: false,
“tooltip”: false,
“viz”: false
},
“insertNulls”: false,
“lineInterpolation”: “linear”,
“lineWidth”: 2,
“pointSize”: 5,
“scaleDistribution”: {
“type”: “linear”
},
“showPoints”: “never”,
“spanNulls”: false,
“stacking”: {
“group”: “A”,
“mode”: “none”
},
“thresholdsStyle”: {
“mode”: “off”
}
},
“mappings”: [ ],
“thresholds”: {
“mode”: “absolute”,
“steps”: \[
{
“color”: “green”
},
{
“color”: “red”,
“value”: 80
}
\]
},
“unit”: “short”
},
“overrides”: [ ]
},
“gridPos”: {
“h”: 7,
“w”: 12,
“x”: 12,
“y”: 37
},
“id”: 58,
“options”: {
“legend”: {
“calcs”: [ ],
“displayMode”: “list”,
“placement”: “bottom”,
“showLegend”: false
},
“tooltip”: {
“mode”: “multi”,
“sort”: “none”
}
},
“pluginVersion”: “10.4.5”,
“targets”: \[
{
“datasource”: {
“type”: “prometheus”,
“uid”: “${DS_PROMETHEUS}”
},
“expr”: “oracledb_exporter_scrapes_total{instance="$host"}”,
“format”: “time_series”,
“intervalFactor”: 2,
“refId”: “A”,
“step”: 10
}
\],
“title”: “total scrapes”,
“transparent”: true,
“type”: “timeseries”
}
\],
“refresh”: “30s”,
“schemaVersion”: 42,
“tags”: \[
“oracle”
\],
“templating”: {
“list”: \[
{
“current”: {},
“datasource”: {
“type”: “prometheus”,
“uid”: “${DS_PROMETHEUS}”
},
“definition”: “”,
“includeAll”: false,
“name”: “host”,
“options”: [ ],
“query”: “label_values(oracledb_up, instance)”,
“refresh”: 1,
“regex”: “”,
“sort”: 1,
“type”: “query”
},
{
“auto”: true,
“auto_count”: 200,
“auto_min”: “1s”,
“current”: {
“text”: “1m”,
“value”: “1m”
},
“label”: “Interval”,
“name”: “interval”,
“options”: \[
{
“selected”: false,
“text”: “1s”,
“value”: “1s”
},
{
“selected”: false,
“text”: “5s”,
“value”: “5s”
},
{
“selected”: true,
“text”: “1m”,
“value”: “1m”
},
{
“selected”: false,
“text”: “5m”,
“value”: “5m”
},
{
“selected”: false,
“text”: “1h”,
“value”: “1h”
},
{
“selected”: false,
“text”: “6h”,
“value”: “6h”
},
{
“selected”: false,
“text”: “1d”,
“value”: “1d”
}
\],
“query”: “1s,5s,1m,5m,1h,6h,1d”,
“refresh”: 2,
“type”: “interval”
}
\]
},
“time”: {
“from”: “now-30m”,
“to”: “now”
},
“timepicker”: {},
“timezone”: “browser”,
“title”: “Oracledb”,
“uid”: “eevft1h2a1b0gf”,
“version”: 7,
“weekStart”: “”
}