project initialization
Some checks failed
System Monitoring / Health Checks (push) Has been cancelled
System Monitoring / Performance Monitoring (push) Has been cancelled
System Monitoring / Database Monitoring (push) Has been cancelled
System Monitoring / Cache Monitoring (push) Has been cancelled
System Monitoring / Log Monitoring (push) Has been cancelled
System Monitoring / Resource Monitoring (push) Has been cancelled
System Monitoring / Uptime Monitoring (push) Has been cancelled
System Monitoring / Backup Monitoring (push) Has been cancelled
System Monitoring / Security Monitoring (push) Has been cancelled
System Monitoring / Monitoring Dashboard (push) Has been cancelled
System Monitoring / Alerting (push) Has been cancelled
Security Scanning / Dependency Scanning (push) Has been cancelled
Security Scanning / Code Security Scanning (push) Has been cancelled
Security Scanning / Secrets Scanning (push) Has been cancelled
Security Scanning / Container Security Scanning (push) Has been cancelled
Security Scanning / Compliance Checking (push) Has been cancelled
Security Scanning / Security Dashboard (push) Has been cancelled
Security Scanning / Security Remediation (push) Has been cancelled

This commit is contained in:
2025-10-05 02:37:33 +08:00
parent 2cbb6d5fa1
commit b3fff546e9
226 changed files with 97805 additions and 35 deletions

View File

@@ -0,0 +1,163 @@
{
"dashboard": {
"id": null,
"title": "Application Performance",
"tags": ["application", "performance"],
"timezone": "Asia/Kuala_Lumpur",
"panels": [
{
"id": 1,
"title": "HTTP Requests Rate",
"type": "graph",
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 0},
"targets": [
{
"expr": "rate(http_requests_total[5m])",
"legendFormat": "{{method}} {{status}}"
}
],
"yaxes": [{"label": "Requests/sec"}]
},
{
"id": 2,
"title": "Response Time Percentiles",
"type": "graph",
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 0},
"targets": [
{
"expr": "histogram_quantile(0.50, rate(http_request_duration_seconds_bucket[5m]))",
"legendFormat": "P50"
},
{
"expr": "histogram_quantile(0.95, rate(http_request_duration_seconds_bucket[5m]))",
"legendFormat": "P95"
},
{
"expr": "histogram_quantile(0.99, rate(http_request_duration_seconds_bucket[5m]))",
"legendFormat": "P99"
}
],
"yaxes": [{"label": "Seconds"}]
},
{
"id": 3,
"title": "Error Rate",
"type": "graph",
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 8},
"targets": [
{
"expr": "rate(http_requests_total{status=~\"4..\"}[5m])",
"legendFormat": "4xx"
},
{
"expr": "rate(http_requests_total{status=~\"5..\"}[5m])",
"legendFormat": "5xx"
}
],
"yaxes": [{"label": "Errors/sec"}]
},
{
"id": 4,
"title": "Application Memory Usage",
"type": "graph",
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 8},
"targets": [
{
"expr": "process_resident_memory_bytes{job=\"backend\"}",
"legendFormat": "{{instance}}"
}
],
"yaxes": [{"label": "Bytes"}]
},
{
"id": 5,
"title": "Application CPU Usage",
"type": "graph",
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 16},
"targets": [
{
"expr": "rate(process_cpu_seconds_total{job=\"backend\"}[5m]) * 100",
"legendFormat": "{{instance}}"
}
],
"yaxes": [{"label": "CPU %"}]
},
{
"id": 6,
"title": "Active Users",
"type": "stat",
"gridPos": {"h": 4, "w": 6, "x": 12, "y": 16},
"targets": [
{
"expr": "active_users",
"legendFormat": "Active Users"
}
]
},
{
"id": 7,
"title": "Database Connection Pool",
"type": "graph",
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 24},
"targets": [
{
"expr": "database_connections_active",
"legendFormat": "Active"
},
{
"expr": "database_connections_idle",
"legendFormat": "Idle"
},
{
"expr": "database_connections_total",
"legendFormat": "Total"
}
],
"yaxes": [{"label": "Connections"}]
},
{
"id": 8,
"title": "Cache Hit Rate",
"type": "graph",
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 24},
"targets": [
{
"expr": "rate(redis_keyspace_hits_total[5m]) / (rate(redis_keyspace_hits_total[5m]) + rate(redis_keyspace_misses_total[5m])) * 100",
"legendFormat": "Hit Rate %"
}
],
"yaxes": [{"label": "Hit Rate %"}]
},
{
"id": 9,
"title": "Error Budget Remaining",
"type": "gauge",
"gridPos": {"h": 4, "w": 6, "x": 18, "y": 16},
"targets": [
{
"expr": "error_budget_remaining_percentage",
"legendFormat": "Error Budget %"
}
],
"fieldConfig": {
"defaults": {
"min": 0,
"max": 100,
"thresholds": {
"steps": [
{"color": "green", "value": 0},
{"color": "yellow", "value": 50},
{"color": "red", "value": 10}
]
}
}
}
}
],
"time": {
"from": "now-1h",
"to": "now"
},
"refresh": "30s"
}
}

View File

@@ -0,0 +1,266 @@
{
"dashboard": {
"id": null,
"title": "Business Metrics",
"tags": ["business", "metrics"],
"timezone": "Asia/Kuala_Lumpur",
"panels": [
{
"id": 1,
"title": "Active Users",
"type": "stat",
"gridPos": {"h": 8, "w": 6, "x": 0, "y": 0},
"targets": [
{
"expr": "active_users",
"legendFormat": "Current Active Users"
}
],
"fieldConfig": {
"defaults": {
"mappings": [],
"thresholds": {
"steps": [
{"color": "green", "value": null},
{"color": "yellow", "value": 50},
{"color": "red", "value": 100}
]
},
"unit": "short"
}
}
},
{
"id": 2,
"title": "New Users Today",
"type": "stat",
"gridPos": {"h": 8, "w": 6, "x": 6, "y": 0},
"targets": [
{
"expr": "increase(new_users_total[24h])",
"legendFormat": "New Users Today"
}
],
"fieldConfig": {
"defaults": {
"mappings": [],
"thresholds": {
"steps": [
{"color": "green", "value": null},
{"color": "yellow", "value": 10},
{"color": "red", "value": 20}
]
},
"unit": "short"
}
}
},
{
"id": 3,
"title": "Revenue (MYR)",
"type": "stat",
"gridPos": {"h": 8, "w": 6, "x": 12, "y": 0},
"targets": [
{
"expr": "increase(revenue_total[24h])",
"legendFormat": "Revenue Today"
}
],
"fieldConfig": {
"defaults": {
"mappings": [],
"thresholds": {
"steps": [
{"color": "green", "value": null},
{"color": "yellow", "value": 10000},
{"color": "red", "value": 50000}
]
},
"unit": "currencyMYR"
}
}
},
{
"id": 4,
"title": "Conversion Rate",
"type": "stat",
"gridPos": {"h": 8, "w": 6, "x": 18, "y": 0},
"targets": [
{
"expr": "rate(conversion_events_total[24h]) / rate(page_views_total[24h]) * 100",
"legendFormat": "Conversion Rate %"
}
],
"fieldConfig": {
"defaults": {
"mappings": [],
"thresholds": {
"steps": [
{"color": "red", "value": null},
{"color": "yellow", "value": 2},
{"color": "green", "value": 5}
]
},
"unit": "percent"
}
}
},
{
"id": 5,
"title": "User Registrations",
"type": "graph",
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 8},
"targets": [
{
"expr": "rate(new_users_total[1h])",
"legendFormat": "Registrations/Hour"
}
],
"yaxes": [{"label": "Users/Hour"}]
},
{
"id": 6,
"title": "Revenue Trend",
"type": "graph",
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 8},
"targets": [
{
"expr": "rate(revenue_total[1h])",
"legendFormat": "Revenue/Hour (MYR)"
}
],
"yaxes": [{"label": "MYR/Hour"}]
},
{
"id": 7,
"title": "Transactions by Status",
"type": "piechart",
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 16},
"targets": [
{
"expr": "rate(transaction_successful_total[1h])",
"legendFormat": "Successful"
},
{
"expr": "rate(transaction_failed_total[1h])",
"legendFormat": "Failed"
},
{
"expr": "rate(transaction_pending_total[1h])",
"legendFormat": "Pending"
}
]
},
{
"id": 8,
"title": "Payment Methods",
"type": "piechart",
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 16},
"targets": [
{
"expr": "rate(payment_successful_total{method=\"FPX\"}[1h])",
"legendFormat": "FPX"
},
{
"expr": "rate(payment_successful_total{method=\"Boost\"}[1h])",
"legendFormat": "Boost"
},
{
"expr": "rate(payment_successful_total{method=\"GrabPay\"}[1h])",
"legendFormat": "GrabPay"
},
{
"expr": "rate(payment_successful_total{method=\"TouchNGo\"}[1h])",
"legendFormat": "Touch 'n Go"
}
]
},
{
"id": 9,
"title": "Malaysian States Activity",
"type": "table",
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 24},
"targets": [
{
"expr": "malaysian_users_by_state",
"format": "table",
"legendFormat": "{{state}}"
}
],
"fieldConfig": {
"defaults": {
"custom": {
"align": "auto",
"displayMode": "auto"
}
}
}
},
{
"id": 10,
"title": "SST Calculations",
"type": "graph",
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 24},
"targets": [
{
"expr": "rate(sst_calculations_total[1h])",
"legendFormat": "SST Calculations/Hour"
}
],
"yaxes": [{"label": "Calculations/Hour"}]
},
{
"id": 11,
"title": "IC Validations",
"type": "graph",
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 32},
"targets": [
{
"expr": "rate(ic_validations_total[1h])",
"legendFormat": "IC Validations/Hour"
}
],
"yaxes": [{"label": "Validations/Hour"}]
},
{
"id": 12,
"title": "Postcode Lookups",
"type": "graph",
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 32},
"targets": [
{
"expr": "rate(malaysian_postcode_lookups_total[1h])",
"legendFormat": "Postcode Lookups/Hour"
}
],
"yaxes": [{"label": "Lookups/Hour"}]
},
{
"id": 13,
"title": "Tenant Activity",
"type": "table",
"gridPos": {"h": 8, "w": 24, "x": 0, "y": 40},
"targets": [
{
"expr": "tenant_active_users",
"format": "table",
"legendFormat": "{{tenant_name}}"
}
],
"fieldConfig": {
"defaults": {
"custom": {
"align": "auto",
"displayMode": "auto"
}
}
}
}
],
"time": {
"from": "now-24h",
"to": "now"
},
"refresh": "5m"
}
}

View File

@@ -0,0 +1,155 @@
{
"dashboard": {
"id": null,
"title": "Database Performance",
"tags": ["database", "performance"],
"timezone": "Asia/Kuala_Lumpur",
"panels": [
{
"id": 1,
"title": "Database Connections",
"type": "graph",
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 0},
"targets": [
{
"expr": "pg_stat_database_numbackends",
"legendFormat": "Active Connections"
},
{
"expr": "pg_settings_max_connections",
"legendFormat": "Max Connections"
}
],
"yaxes": [{"label": "Connections"}]
},
{
"id": 2,
"title": "Database Query Performance",
"type": "graph",
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 0},
"targets": [
{
"expr": "rate(pg_stat_statements_total_time_ms[5m])",
"legendFormat": "Total Query Time"
},
{
"expr": "rate(pg_stat_statements_calls[5m])",
"legendFormat": "Query Calls"
}
],
"yaxes": [{"label": "Rate"}]
},
{
"id": 3,
"title": "Database Transactions",
"type": "graph",
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 8},
"targets": [
{
"expr": "rate(pg_stat_database_xact_commit[5m])",
"legendFormat": "Commits"
},
{
"expr": "rate(pg_stat_database_xact_rollback[5m])",
"legendFormat": "Rollbacks"
}
],
"yaxes": [{"label": "Transactions/sec"}]
},
{
"id": 4,
"title": "Database Locks",
"type": "graph",
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 8},
"targets": [
{
"expr": "pg_locks_count",
"legendFormat": "Active Locks"
},
{
"expr": "rate(pg_stat_database_deadlocks[5m])",
"legendFormat": "Deadlocks/sec"
}
],
"yaxes": [{"label": "Count"}]
},
{
"id": 5,
"title": "Database Cache Hit Rate",
"type": "graph",
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 16},
"targets": [
{
"expr": "rate(pg_stat_database_blks_hit[5m]) / (rate(pg_stat_database_blks_hit[5m]) + rate(pg_stat_database_blks_read[5m])) * 100",
"legendFormat": "Cache Hit Rate %"
}
],
"yaxes": [{"label": "Hit Rate %"}]
},
{
"id": 6,
"title": "Database Size",
"type": "graph",
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 16},
"targets": [
{
"expr": "pg_database_size_bytes",
"legendFormat": "Database Size"
}
],
"yaxes": [{"label": "Bytes"}]
},
{
"id": 7,
"title": "Table Access Statistics",
"type": "table",
"gridPos": {"h": 8, "w": 24, "x": 0, "y": 24},
"targets": [
{
"expr": "pg_stat_user_tables",
"format": "table",
"legendFormat": "{{relname}}"
}
],
"fieldConfig": {
"defaults": {
"custom": {
"align": "auto",
"displayMode": "auto"
}
}
}
},
{
"id": 8,
"title": "Database Replication Lag",
"type": "graph",
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 32},
"targets": [
{
"expr": "pg_stat_replication replication_lag",
"legendFormat": "Replication Lag"
}
],
"yaxes": [{"label": "Seconds"}]
},
{
"id": 9,
"title": "Database Uptime",
"type": "stat",
"gridPos": {"h": 4, "w": 6, "x": 12, "y": 32},
"targets": [
{
"expr": "pg_postmaster_start_time_seconds",
"legendFormat": "Uptime"
}
]
}
],
"time": {
"from": "now-1h",
"to": "now"
},
"refresh": "30s"
}
}

View File

@@ -0,0 +1,21 @@
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
access: proxy
url: http://prometheus:9090
isDefault: true
editable: false
jsonData:
httpMethod: POST
queryTimeout: 60s
timeInterval: 15s
- name: Loki
type: loki
access: proxy
url: http://loki:3100
editable: false
jsonData:
maxLines: 1000