Skip to content

Commit

Permalink
[Grafana] Fix rate intervals in API dashboard.
Browse files Browse the repository at this point in the history
  • Loading branch information
gmarciani committed Dec 1, 2024
1 parent 8bd45e8 commit 54e8c29
Showing 1 changed file with 24 additions and 12 deletions.
36 changes: 24 additions & 12 deletions grafana/dashboards/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
},
"editorMode": "code",
"exemplar": true,
"expr": "sum(rate(http_server_requests_seconds_count{application=\"$application\", stack=\"$stack\", region=\"$region\", operation=\"$operation\"}[1h])*3600)",
"expr": "sum(rate(http_server_requests_seconds_count{application=\"$application\", stack=\"$stack\", region=\"$region\", operation=\"$operation\"}[1h]))",
"format": "time_series",
"interval": "",
"intervalFactor": 1,
Expand Down Expand Up @@ -518,7 +518,7 @@
"disableTextWrap": false,
"editorMode": "code",
"exemplar": false,
"expr": "sum(rate(http_server_requests_seconds_count{application=\"$application\", stack=\"$stack\", region=\"$region\", operation=\"$operation\"}[1m])*60)",
"expr": "sum(rate(http_server_requests_seconds_count{application=\"$application\", stack=\"$stack\", region=\"$region\", operation=\"$operation\"}[1m]))",
"format": "time_series",
"fullMetaSearch": false,
"hide": false,
Expand Down Expand Up @@ -747,7 +747,7 @@
},
"editorMode": "code",
"exemplar": true,
"expr": "sum(rate(http_server_requests_seconds_count{application=\"$application\", stack=\"$stack\", region=\"$region\", operation=\"$operation\"}[1m])*60)",
"expr": "sum(rate(http_server_requests_seconds_count{application=\"$application\", stack=\"$stack\", region=\"$region\", operation=\"$operation\"}[1m]))",
"format": "time_series",
"hide": false,
"interval": "",
Expand All @@ -763,14 +763,16 @@
"type": "prometheus",
"uid": "PF1524B2611758E37"
},
"editorMode": "code",
"exemplar": true,
"expr": "sum(rate(http_server_requests_seconds_count{application=\"$application\", stack=\"$stack\", region=\"$region\", operation=\"$operation\", outcome=\"SUCCESS\"}[1m])*60)",
"expr": "sum(rate(http_server_requests_seconds_count{application=\"$application\", stack=\"$stack\", region=\"$region\", operation=\"$operation\", outcome=\"SUCCESS\"}[1m]))",
"format": "time_series",
"hide": false,
"interval": "",
"intervalFactor": 1,
"legendFormat": "SUCCESS",
"metric": "",
"range": true,
"refId": "B",
"step": 2400
},
Expand All @@ -779,14 +781,16 @@
"type": "prometheus",
"uid": "PF1524B2611758E37"
},
"editorMode": "code",
"exemplar": true,
"expr": "sum(rate(http_server_requests_seconds_count{application=\"$application\", stack=\"$stack\", region=\"$region\", operation=\"$operation\", outcome=\"SERVER_ERROR\"}[1m])*60)",
"expr": "sum(rate(http_server_requests_seconds_count{application=\"$application\", stack=\"$stack\", region=\"$region\", operation=\"$operation\", outcome=\"SERVER_ERROR\"}[1m]))",
"format": "time_series",
"hide": false,
"interval": "",
"intervalFactor": 1,
"legendFormat": "SERVER_ERROR",
"metric": "",
"range": true,
"refId": "C",
"step": 2400
},
Expand All @@ -795,14 +799,16 @@
"type": "prometheus",
"uid": "PF1524B2611758E37"
},
"editorMode": "code",
"exemplar": true,
"expr": "sum(rate(http_server_requests_seconds_count{application=\"$application\", stack=\"$stack\", region=\"$region\", operation=\"$operation\", outcome=\"CLIENT_ERROR\"}[1m])*60)",
"expr": "sum(rate(http_server_requests_seconds_count{application=\"$application\", stack=\"$stack\", region=\"$region\", operation=\"$operation\", outcome=\"CLIENT_ERROR\"}[1m]))",
"format": "time_series",
"hide": false,
"interval": "",
"intervalFactor": 1,
"legendFormat": "CLIENT_ERROR",
"metric": "",
"range": true,
"refId": "D",
"step": 2400
}
Expand Down Expand Up @@ -905,7 +911,7 @@
},
"editorMode": "code",
"exemplar": true,
"expr": "sum(rate(http_server_requests_seconds_count{application=\"$application\", stack=\"$stack\", region=\"$region\", operation=\"$operation\", outcome=\"SERVER_ERROR\"}[1m])*60) ",
"expr": "sum(rate(http_server_requests_seconds_count{application=\"$application\", stack=\"$stack\", region=\"$region\", operation=\"$operation\", outcome=\"SERVER_ERROR\"}[1m])) ",
"format": "time_series",
"hide": false,
"interval": "",
Expand All @@ -921,14 +927,16 @@
"type": "prometheus",
"uid": "PF1524B2611758E37"
},
"editorMode": "code",
"exemplar": true,
"expr": "sum(rate(http_server_requests_seconds_count{application=\"$application\", stack=\"$stack\", region=\"$region\", operation=\"$operation\", outcome=\"SERVER_ERROR\"}[1m])*60) by(exception)",
"expr": "sum(rate(http_server_requests_seconds_count{application=\"$application\", stack=\"$stack\", region=\"$region\", operation=\"$operation\", outcome=\"SERVER_ERROR\"}[1m])) by(exception)",
"format": "time_series",
"hide": false,
"interval": "",
"intervalFactor": 1,
"legendFormat": "{{exception}}",
"metric": "",
"range": true,
"refId": "B",
"step": 2400
}
Expand Down Expand Up @@ -1031,7 +1039,7 @@
},
"editorMode": "code",
"exemplar": true,
"expr": "sum(rate(http_server_requests_seconds_count{application=\"$application\", stack=\"$stack\", region=\"$region\", operation=\"$operation\", outcome=\"CLIENT_ERROR\"}[1m])*60)",
"expr": "sum(rate(http_server_requests_seconds_count{application=\"$application\", stack=\"$stack\", region=\"$region\", operation=\"$operation\", outcome=\"CLIENT_ERROR\"}[1m]))",
"format": "time_series",
"hide": false,
"interval": "",
Expand All @@ -1047,14 +1055,16 @@
"type": "prometheus",
"uid": "PF1524B2611758E37"
},
"editorMode": "code",
"exemplar": true,
"expr": "sum(rate(http_server_requests_seconds_count{application=\"$application\", stack=\"$stack\", region=\"$region\", operation=\"$operation\", outcome=\"CLIENT_ERROR\"}[1m])*60) by(exception)",
"expr": "sum(rate(http_server_requests_seconds_count{application=\"$application\", stack=\"$stack\", region=\"$region\", operation=\"$operation\", outcome=\"CLIENT_ERROR\"}[1m])) by(exception)",
"format": "time_series",
"hide": false,
"interval": "",
"intervalFactor": 1,
"legendFormat": "{{exception}}",
"metric": "",
"range": true,
"refId": "B",
"step": 2400
}
Expand Down Expand Up @@ -1177,13 +1187,15 @@
"type": "prometheus",
"uid": "PF1524B2611758E37"
},
"editorMode": "code",
"exemplar": true,
"expr": "sum(rate(http_server_requests_seconds_sum{application=\"$application\", stack=\"$stack\", region=\"$region\", operation=\"$operation\", outcome=\"SUCCESS\"}[1m])*60) / sum(rate(http_server_requests_seconds_count{application=\"$application\", stack=\"$stack\", region=\"$region\", operation=\"$operation\", outcome=\"SUCCESS\"}[1m])*60)",
"expr": "sum(rate(http_server_requests_seconds_sum{application=\"$application\", stack=\"$stack\", region=\"$region\", operation=\"$operation\", outcome=\"SUCCESS\"}[1m])) / sum(rate(http_server_requests_seconds_count{application=\"$application\", stack=\"$stack\", region=\"$region\", operation=\"$operation\", outcome=\"SUCCESS\"}[1m]))",
"format": "time_series",
"hide": false,
"interval": "",
"intervalFactor": 1,
"legendFormat": "SUCCESS",
"range": true,
"refId": "B"
},
{
Expand Down Expand Up @@ -1395,6 +1407,6 @@
"timezone": "utc",
"title": "YAWA API",
"uid": "yawa-api",
"version": 3,
"version": 11,
"weekStart": ""
}

0 comments on commit 54e8c29

Please sign in to comment.