{ "widgets": [ { "type": "metric", "x": 0, "y": 0, "width": 9, "height": 6, "properties": { "metrics": [ [ "ContainerInsights/Prometheus", "haproxy_backend_up", "Service", "{{YOUR_SERVICE_NAME}}", "ClusterName", "{{YOUR_CLUSTER_NAME}}", "Namespace", "{{YOUR_NAMESPACE}}", { "label": "[max: ${MAX}, avg: ${AVG}] haproxy_backend_up Sum", "id": "m1", "visible": false } ], [ "...", { "stat": "SampleCount", "label": "[max: ${MAX}, avg: ${AVG}] haproxy_backend_up SampleCount", "id": "m2", "visible": false } ], [ { "expression": "m1/m2 * 100", "label": "[max: ${MAX}, avg: ${AVG}] Percentage", "id": "e1", "region": "{{YOUR_AWS_REGION}}" } ] ], "view": "timeSeries", "stacked": false, "region": "{{YOUR_AWS_REGION}}", "stat": "Sum", "period": 60, "title": "Backend Up/Down Percentage" } }, { "type": "metric", "x": 9, "y": 0, "width": 9, "height": 6, "properties": { "metrics": [ [ "ContainerInsights/Prometheus", "haproxy_backend_current_sessions", "Service", "{{YOUR_SERVICE_NAME}}", "ClusterName", "{{YOUR_CLUSTER_NAME}}", "Namespace", "{{YOUR_NAMESPACE}}", { "label": "[max: ${MAX}, avg: ${AVG}] Backend" } ], [ ".", "haproxy_frontend_current_sessions", ".", ".", ".", ".", ".", ".", { "label": "[max: ${MAX}, avg: ${AVG}] Frontend" } ] ], "view": "timeSeries", "stacked": false, "region": "{{YOUR_AWS_REGION}}", "stat": "Sum", "period": 60, "title": "Current Active sessions" } }, { "type": "metric", "x": 9, "y": 6, "width": 9, "height": 6, "properties": { "metrics": [ [ { "expression": "RATE(m1)", "label": "[max: ${MAX}, avg: ${AVG}] Frontend", "id": "e1", "region": "{{YOUR_AWS_REGION}}" } ], [ "ContainerInsights/Prometheus", "haproxy_frontend_connections_total", "Service", "{{YOUR_SERVICE_NAME}}", "ClusterName", "{{YOUR_CLUSTER_NAME}}", "Namespace", "{{YOUR_NAMESPACE}}", { "id": "m1", "visible": false } ], [ ".", "haproxy_backend_connections_total", ".", ".", ".", ".", ".", ".", { "id": "m2", "visible": false } ], [ { "expression": "RATE(m2)", "label": "[max: ${MAX}, avg: ${AVG}] Backend", "id": "e2", "region": "{{YOUR_AWS_REGION}}" } ], [ { "expression": "RATE(m3)", "label": "[max: ${MAX}, avg: ${AVG}] Backend Errors", "id": "e3", "region": "{{YOUR_AWS_REGION}}" } ], [ "ContainerInsights/Prometheus", "haproxy_backend_connection_errors_total", "Service", "{{YOUR_SERVICE_NAME}}", "ClusterName", "{{YOUR_CLUSTER_NAME}}", "Namespace", "{{YOUR_NAMESPACE}}", { "id": "m3", "visible": false } ] ], "view": "timeSeries", "stacked": false, "region": "{{YOUR_AWS_REGION}}", "stat": "Sum", "period": 60, "title": "Total Number of Connections" } }, { "type": "metric", "x": 9, "y": 18, "width": 9, "height": 6, "properties": { "metrics": [ [ { "expression": "RATE(m1)", "label": "[max: ${MAX}, avg: ${AVG}] OUT", "id": "e1", "region": "{{YOUR_AWS_REGION}}" } ], [ { "expression": "RATE(m2)", "label": "[max: ${MAX}, avg: ${AVG}] IN", "id": "e2", "region": "{{YOUR_AWS_REGION}}" } ], [ "ContainerInsights/Prometheus", "haproxy_backend_bytes_out_total", "Service", "{{YOUR_SERVICE_NAME}}", "ClusterName", "{{YOUR_CLUSTER_NAME}}", "Namespace", "{{YOUR_NAMESPACE}}", { "id": "m1", "visible": false } ], [ ".", "haproxy_backend_bytes_in_total", ".", ".", ".", ".", ".", ".", { "id": "m2", "visible": false } ] ], "view": "timeSeries", "stacked": false, "region": "{{YOUR_AWS_REGION}}", "stat": "Sum", "period": 60, "title": "Backend - Incoming/Outcoming Bytes" } }, { "type": "metric", "x": 0, "y": 18, "width": 9, "height": 6, "properties": { "metrics": [ [ { "expression": "RATE(m1)", "label": "[max: ${MAX}, avg: ${AVG}] OUT", "id": "e1", "region": "{{YOUR_AWS_REGION}}" } ], [ { "expression": "RATE(m2)", "label": "[max: ${MAX}, avg: ${AVG}] IN", "id": "e2", "region": "{{YOUR_AWS_REGION}}" } ], [ "ContainerInsights/Prometheus", "haproxy_frontend_bytes_out_total", "Service", "{{YOUR_SERVICE_NAME}}", "ClusterName", "{{YOUR_CLUSTER_NAME}}", "Namespace", "{{YOUR_NAMESPACE}}", { "id": "m1", "visible": false } ], [ ".", "haproxy_frontend_bytes_in_total", ".", ".", ".", ".", ".", ".", { "id": "m2", "visible": false } ] ], "view": "timeSeries", "stacked": false, "region": "{{YOUR_AWS_REGION}}", "stat": "Sum", "period": 60, "title": "Frontend - Incoming/Outcoming Bytes" } }, { "type": "metric", "x": 0, "y": 6, "width": 9, "height": 6, "properties": { "metrics": [ [ { "expression": "RATE(m1)", "label": "[max: ${MAX}, avg: ${AVG}, last: ${LAST}] Errors", "id": "e1", "region": "{{YOUR_AWS_REGION}}" } ], [ { "expression": "RATE(m2)", "label": "[max: ${MAX}, avg: ${AVG}, last: ${LAST}] Denied", "id": "e2", "region": "{{YOUR_AWS_REGION}}" } ], [ { "expression": "RATE(m3)", "label": "[max: ${MAX}, last: ${LAST}] Total", "id": "e3", "region": "{{YOUR_AWS_REGION}}" } ], [ "ContainerInsights/Prometheus", "haproxy_frontend_request_errors_total", "Service", "{{YOUR_SERVICE_NAME}}", "ClusterName", "{{YOUR_CLUSTER_NAME}}", "Namespace", "{{YOUR_NAMESPACE}}", { "id": "m1", "visible": false } ], [ ".", "haproxy_frontend_requests_denied_total", ".", ".", ".", ".", ".", ".", { "id": "m2", "visible": false } ], [ ".", "haproxy_frontend_http_requests_total", ".", ".", ".", ".", ".", ".", { "id": "m3", "visible": false } ] ], "view": "timeSeries", "stacked": false, "region": "{{YOUR_AWS_REGION}}", "stat": "Sum", "period": 60, "title": "Frontend - Request Total / Error / Denied" } }, { "type": "metric", "x": 9, "y": 12, "width": 9, "height": 6, "properties": { "metrics": [ [ { "expression": "RATE(REMOVE_EMPTY(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace,Service,backend,code} ClusterName=\"{{YOUR_CLUSTER_NAME}}\" Namespace=\"{{YOUR_NAMESPACE}}\" MetricName=\"haproxy_backend_http_responses_total\"', 'Average', 300)))", "id": "e1", "period": 300, "region": "{{YOUR_AWS_REGION}}" } ] ], "view": "timeSeries", "stacked": false, "region": "{{YOUR_AWS_REGION}}", "stat": "Average", "title": "Backend - HTTP Responses Rate per Service", "period": 300 } }, { "type": "metric", "x": 0, "y": 12, "width": 9, "height": 6, "properties": { "metrics": [ [ { "expression": "RATE(REMOVE_EMPTY(SEARCH('{ContainerInsights/Prometheus,ClusterName,Namespace,Service,code,frontend} haproxy_frontend_http_responses_total ClusterName=\"{{YOUR_CLUSTER_NAME}}\" Namespace=\"{{YOUR_NAMESPACE}}\" Service=\"{{YOUR_SERVICE_NAME}}\"', 'Average', 60)))", "id": "e2", "period": 60, "region": "{{YOUR_AWS_REGION}}" } ] ], "view": "timeSeries", "stacked": false, "region": "{{YOUR_AWS_REGION}}", "stat": "Average", "title": "Frontend - HTTP Responses Rate per Service", "period": 300 } } ] }