Skip to content

Commit

Permalink
Merge pull request #12 from Iajrdev/grafana-prometheus
Browse files Browse the repository at this point in the history
Add p50, p90, and p99 Percentile Calculations to Grafana HTTP Requests Dashboard
  • Loading branch information
alipourhabibi authored Aug 16, 2024
2 parents 2ab3851 + 108e33f commit eca5b17
Showing 1 changed file with 31 additions and 23 deletions.
54 changes: 31 additions & 23 deletions grafana/provisioning/dashboards/my_dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,39 @@
"datasource": "Prometheus",
"targets": [
{
"expr": "myapp_request_duration_seconds_bucket",
"legendFormat": "{{handler}}",
"expr": "histogram_quantile(0.50, sum(rate(myapp_request_duration_seconds_bucket[5m])) by (le))",
"legendFormat": "p50",
"refId": "A",
"editorMode": "code",
"range": true
},
{
"expr": "myapp_request_duration_seconds_count",
"legendFormat": "__auto",
"expr": "histogram_quantile(0.90, sum(rate(myapp_request_duration_seconds_bucket[5m])) by (le))",
"legendFormat": "p90",
"refId": "B",
"editorMode": "code",
"range": true
},
{
"expr": "myapp_request_duration_seconds_sum",
"legendFormat": "__auto",
"expr": "histogram_quantile(0.99, sum(rate(myapp_request_duration_seconds_bucket[5m])) by (le))",
"legendFormat": "p99",
"refId": "C",
"editorMode": "builder",
"editorMode": "code",
"range": true
},
{
"expr": "myapp_requests_total",
"legendFormat": "__auto",
"expr": "sum(rate(myapp_request_duration_seconds_count[5m]))",
"legendFormat": "Total Requests",
"refId": "D",
"editorMode": "builder",
"range": true
},
{
"expr": "sum(myapp_request_duration_seconds_sum)",
"legendFormat": "Sum Duration",
"refId": "E",
"editorMode": "builder",
"range": true
}
],
"fieldConfig": {
Expand Down Expand Up @@ -74,21 +81,22 @@
"showLegend": true,
"displayMode": "list",
"placement": "bottom"
}
},
"xaxis": {
"mode": "time",
"show": true
},
"yaxes": [
{
"format": "short",
"show": true
},
{
"connectNulls": true,
"xaxis": {
"mode": "time",
"show": true
}
]
},
"yaxes": [
{
"format": "short",
"show": true
},
{
"show": true
}
]
}
}
]
}
}

0 comments on commit eca5b17

Please sign in to comment.