91d54f4ef0
- Remove dashboard wrapper from JSON files - Dashboards now load successfully - Update monitoring guide with correct instructions
231 lines
5.7 KiB
JSON
231 lines
5.7 KiB
JSON
{
|
|
"title": "Spring Boot Application Metrics",
|
|
"tags": ["spring-boot", "todo-app"],
|
|
"timezone": "browser",
|
|
"schemaVersion": 16,
|
|
"version": 0,
|
|
"refresh": "5s",
|
|
"panels": [
|
|
{
|
|
"id": 1,
|
|
"title": "HTTP Request Rate",
|
|
"type": "timeseries",
|
|
"gridPos": {"x": 0, "y": 0, "w": 12, "h": 8},
|
|
"targets": [
|
|
{
|
|
"expr": "rate(http_server_requests_seconds_count{application=\"todo\"}[1m])",
|
|
"legendFormat": "{{method}} {{uri}} - {{status}}",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "reqps",
|
|
"custom": {}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 2,
|
|
"title": "HTTP Request Duration (p95, p99)",
|
|
"type": "timeseries",
|
|
"gridPos": {"x": 12, "y": 0, "w": 12, "h": 8},
|
|
"targets": [
|
|
{
|
|
"expr": "histogram_quantile(0.95, sum(rate(http_server_requests_seconds_bucket{application=\"todo\"}[5m])) by (le, uri))",
|
|
"legendFormat": "p95 - {{uri}}",
|
|
"refId": "A"
|
|
},
|
|
{
|
|
"expr": "histogram_quantile(0.99, sum(rate(http_server_requests_seconds_bucket{application=\"todo\"}[5m])) by (le, uri))",
|
|
"legendFormat": "p99 - {{uri}}",
|
|
"refId": "B"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "s",
|
|
"custom": {}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 3,
|
|
"title": "HTTP Status Codes",
|
|
"type": "timeseries",
|
|
"gridPos": {"x": 0, "y": 8, "w": 12, "h": 8},
|
|
"targets": [
|
|
{
|
|
"expr": "sum(rate(http_server_requests_seconds_count{application=\"todo\"}[1m])) by (status)",
|
|
"legendFormat": "{{status}}",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "reqps",
|
|
"custom": {}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 4,
|
|
"title": "JVM Memory Used",
|
|
"type": "timeseries",
|
|
"gridPos": {"x": 12, "y": 8, "w": 12, "h": 8},
|
|
"targets": [
|
|
{
|
|
"expr": "jvm_memory_used_bytes{application=\"todo\", area=\"heap\"}",
|
|
"legendFormat": "Heap",
|
|
"refId": "A"
|
|
},
|
|
{
|
|
"expr": "jvm_memory_used_bytes{application=\"todo\", area=\"nonheap\"}",
|
|
"legendFormat": "Non-Heap",
|
|
"refId": "B"
|
|
},
|
|
{
|
|
"expr": "jvm_memory_max_bytes{application=\"todo\", area=\"heap\"}",
|
|
"legendFormat": "Heap Max",
|
|
"refId": "C"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "bytes",
|
|
"custom": {}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 5,
|
|
"title": "Database Connection Pool",
|
|
"type": "timeseries",
|
|
"gridPos": {"x": 0, "y": 16, "w": 12, "h": 8},
|
|
"targets": [
|
|
{
|
|
"expr": "hikaricp_connections_active{application=\"todo\"}",
|
|
"legendFormat": "Active",
|
|
"refId": "A"
|
|
},
|
|
{
|
|
"expr": "hikaricp_connections_idle{application=\"todo\"}",
|
|
"legendFormat": "Idle",
|
|
"refId": "B"
|
|
},
|
|
{
|
|
"expr": "hikaricp_connections{application=\"todo\"}",
|
|
"legendFormat": "Total",
|
|
"refId": "C"
|
|
},
|
|
{
|
|
"expr": "hikaricp_connections_max{application=\"todo\"}",
|
|
"legendFormat": "Max",
|
|
"refId": "D"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "short",
|
|
"custom": {}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 6,
|
|
"title": "Database Connection Acquire Time",
|
|
"type": "timeseries",
|
|
"gridPos": {"x": 12, "y": 16, "w": 12, "h": 8},
|
|
"targets": [
|
|
{
|
|
"expr": "rate(hikaricp_connections_acquire_seconds_sum{application=\"todo\"}[1m]) / rate(hikaricp_connections_acquire_seconds_count{application=\"todo\"}[1m])",
|
|
"legendFormat": "Avg Acquire Time",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "s",
|
|
"custom": {}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 7,
|
|
"title": "JVM Threads",
|
|
"type": "timeseries",
|
|
"gridPos": {"x": 0, "y": 24, "w": 8, "h": 8},
|
|
"targets": [
|
|
{
|
|
"expr": "jvm_threads_live_threads{application=\"todo\"}",
|
|
"legendFormat": "Live",
|
|
"refId": "A"
|
|
},
|
|
{
|
|
"expr": "jvm_threads_daemon_threads{application=\"todo\"}",
|
|
"legendFormat": "Daemon",
|
|
"refId": "B"
|
|
},
|
|
{
|
|
"expr": "jvm_threads_peak_threads{application=\"todo\"}",
|
|
"legendFormat": "Peak",
|
|
"refId": "C"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "short",
|
|
"custom": {}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 8,
|
|
"title": "GC Pause Time",
|
|
"type": "timeseries",
|
|
"gridPos": {"x": 8, "y": 24, "w": 8, "h": 8},
|
|
"targets": [
|
|
{
|
|
"expr": "rate(jvm_gc_pause_seconds_sum{application=\"todo\"}[1m])",
|
|
"legendFormat": "{{action}} - {{cause}}",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "s",
|
|
"custom": {}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 9,
|
|
"title": "System CPU Usage",
|
|
"type": "timeseries",
|
|
"gridPos": {"x": 16, "y": 24, "w": 8, "h": 8},
|
|
"targets": [
|
|
{
|
|
"expr": "system_cpu_usage{application=\"todo\"}",
|
|
"legendFormat": "System",
|
|
"refId": "A"
|
|
},
|
|
{
|
|
"expr": "process_cpu_usage{application=\"todo\"}",
|
|
"legendFormat": "Process",
|
|
"refId": "B"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "percentunit",
|
|
"custom": {}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"time": {
|
|
"from": "now-15m",
|
|
"to": "now"
|
|
}
|
|
}
|