diff --git a/dashboard.yaml b/dashboard.yaml index c762cf8..da157ed 100644 --- a/dashboard.yaml +++ b/dashboard.yaml @@ -18,26 +18,44 @@ data: : [\n {\n \"id\": 1,\n \"type\": \"row\",\n \"title\": \"Factory\ \ control room\",\n \"collapsed\": false,\n \"gridPos\": {\n \ \ \"x\": 0,\n \"y\": 0,\n \"w\": 24,\n \"h\": 1\n }\n\ - \ },\n {\n \"id\": 2,\n \"type\": \"stat\",\n \"title\":\ - \ \"Server ready\",\n \"description\": \"\",\n \"datasource\": {\n \ - \ \"type\": \"prometheus\",\n \"uid\": \"${DS_PROMETHEUS}\"\n \ - \ },\n \"gridPos\": {\n \"x\": 0,\n \"y\": 1,\n \"\ - w\": 4,\n \"h\": 5\n },\n \"fieldConfig\": {\n \"defaults\"\ - : {\n \"unit\": \"short\",\n \"min\": 0,\n \"color\"\ - : {\n \"mode\": \"palette-classic\"\n },\n \"custom\"\ - : {\n \"drawStyle\": \"line\",\n \"lineWidth\": 2,\n \ - \ \"fillOpacity\": 10,\n \"spanNulls\": false\n }\n\ - \ },\n \"overrides\": []\n },\n \"targets\": [\n \ - \ {\n \"refId\": \"A\",\n \"expr\": \"max(kube_deployment_status_replicas_available{namespace=\\\ - \"factorio\\\",deployment=\\\"factorio\\\"})\",\n \"legendFormat\": \"\ - Ready\",\n \"range\": true\n }\n ],\n \"options\": {\n\ - \ \"reduceOptions\": {\n \"calcs\": [\n \"lastNotNull\"\ - \n ],\n \"values\": false\n },\n \"graphMode\"\ + \ },\n {\n \"id\": 19,\n \"type\": \"stat\",\n \"title\"\ + : \"Game version\",\n \"description\": \"Version tag of the currently running\ + \ Factorio game container, reported by kube-state-metrics.\",\n \"datasource\"\ + : {\n \"type\": \"prometheus\",\n \"uid\": \"${DS_PROMETHEUS}\"\n\ + \ },\n \"gridPos\": {\n \"x\": 0,\n \"y\": 1,\n \ + \ \"w\": 4,\n \"h\": 5\n },\n \"fieldConfig\": {\n \"\ + defaults\": {\n \"color\": {\n \"mode\": \"fixed\",\n \ + \ \"fixedColor\": \"orange\"\n },\n \"unit\": \"none\"\ + \n },\n \"overrides\": []\n },\n \"targets\": [\n \ + \ {\n \"refId\": \"A\",\n \"expr\": \"max by (version) (label_replace(kube_pod_container_info{namespace=\\\ + \"factorio\\\",container=\\\"factorio\\\"} and on(namespace,pod) (kube_pod_container_status_running{namespace=\\\ + \"factorio\\\",container=\\\"factorio\\\"} == 1), \\\"version\\\", \\\"$1\\\"\ + , \\\"image\\\", \\\".*:([^:]+)$\\\"))\",\n \"legendFormat\": \"{{version}}\"\ + ,\n \"instant\": true,\n \"range\": false\n }\n \ + \ ],\n \"options\": {\n \"reduceOptions\": {\n \"calcs\"\ + : [\n \"lastNotNull\"\n ],\n \"values\": false\n\ + \ },\n \"graphMode\": \"none\",\n \"colorMode\": \"value\"\ + ,\n \"textMode\": \"name\"\n }\n },\n {\n \"id\": 2,\n\ + \ \"type\": \"stat\",\n \"title\": \"Server ready\",\n \"description\"\ + : \"\",\n \"datasource\": {\n \"type\": \"prometheus\",\n \"\ + uid\": \"${DS_PROMETHEUS}\"\n },\n \"gridPos\": {\n \"x\": 4,\n\ + \ \"y\": 1,\n \"w\": 3,\n \"h\": 5\n },\n \"fieldConfig\"\ + : {\n \"defaults\": {\n \"unit\": \"short\",\n \"min\"\ + : 0,\n \"color\": {\n \"mode\": \"palette-classic\"\n \ + \ },\n \"custom\": {\n \"drawStyle\": \"line\",\n \ + \ \"lineWidth\": 2,\n \"fillOpacity\": 10,\n \"\ + spanNulls\": false\n }\n },\n \"overrides\": []\n \ + \ },\n \"targets\": [\n {\n \"refId\": \"A\",\n \ + \ \"expr\": \"max(kube_deployment_status_replicas_available{namespace=\\\"factorio\\\ + \",deployment=\\\"factorio\\\"})\",\n \"legendFormat\": \"Ready\",\n\ + \ \"range\": true\n }\n ],\n \"options\": {\n \ + \ \"reduceOptions\": {\n \"calcs\": [\n \"lastNotNull\"\n\ + \ ],\n \"values\": false\n },\n \"graphMode\"\ : \"area\",\n \"colorMode\": \"value\"\n }\n },\n {\n \"\ id\": 3,\n \"type\": \"stat\",\n \"title\": \"Players online\",\n \ \ \"description\": \"\",\n \"datasource\": {\n \"type\": \"prometheus\"\ ,\n \"uid\": \"${DS_PROMETHEUS}\"\n },\n \"gridPos\": {\n \ - \ \"x\": 4,\n \"y\": 1,\n \"w\": 4,\n \"h\": 5\n \ + \ \"x\": 7,\n \"y\": 1,\n \"w\": 3,\n \"h\": 5\n \ \ },\n \"fieldConfig\": {\n \"defaults\": {\n \"unit\":\ \ \"short\",\n \"min\": 0,\n \"color\": {\n \"mode\"\ : \"palette-classic\"\n },\n \"custom\": {\n \"drawStyle\"\ @@ -53,8 +71,8 @@ data: \n }\n },\n {\n \"id\": 4,\n \"type\": \"stat\",\n \"\ title\": \"Server RAM\",\n \"description\": \"\",\n \"datasource\":\ \ {\n \"type\": \"prometheus\",\n \"uid\": \"${DS_PROMETHEUS}\"\n\ - \ },\n \"gridPos\": {\n \"x\": 8,\n \"y\": 1,\n \ - \ \"w\": 4,\n \"h\": 5\n },\n \"fieldConfig\": {\n \"\ + \ },\n \"gridPos\": {\n \"x\": 10,\n \"y\": 1,\n \ + \ \"w\": 4,\n \"h\": 5\n },\n \"fieldConfig\": {\n \"\ defaults\": {\n \"unit\": \"bytes\",\n \"min\": 0,\n \ \ \"color\": {\n \"mode\": \"palette-classic\"\n },\n \ \ \"custom\": {\n \"drawStyle\": \"line\",\n \"lineWidth\"\ @@ -69,7 +87,7 @@ data: id\": 5,\n \"type\": \"stat\",\n \"title\": \"CPU cores\",\n \"\ description\": \"\",\n \"datasource\": {\n \"type\": \"prometheus\"\ ,\n \"uid\": \"${DS_PROMETHEUS}\"\n },\n \"gridPos\": {\n \ - \ \"x\": 12,\n \"y\": 1,\n \"w\": 4,\n \"h\": 5\n \ + \ \"x\": 14,\n \"y\": 1,\n \"w\": 3,\n \"h\": 5\n \ \ },\n \"fieldConfig\": {\n \"defaults\": {\n \"unit\"\ : \"short\",\n \"min\": 0,\n \"color\": {\n \"mode\"\ : \"palette-classic\"\n },\n \"custom\": {\n \"drawStyle\"\ @@ -85,8 +103,8 @@ data: \ }\n },\n {\n \"id\": 17,\n \"type\": \"stat\",\n \"title\"\ : \"Game responding\",\n \"description\": \"\",\n \"datasource\": {\n\ \ \"type\": \"prometheus\",\n \"uid\": \"${DS_PROMETHEUS}\"\n \ - \ },\n \"gridPos\": {\n \"x\": 16,\n \"y\": 1,\n \ - \ \"w\": 4,\n \"h\": 5\n },\n \"fieldConfig\": {\n \"\ + \ },\n \"gridPos\": {\n \"x\": 17,\n \"y\": 1,\n \ + \ \"w\": 3,\n \"h\": 5\n },\n \"fieldConfig\": {\n \"\ defaults\": {\n \"unit\": \"short\",\n \"min\": 0,\n \ \ \"color\": {\n \"mode\": \"palette-classic\"\n },\n \ \ \"custom\": {\n \"drawStyle\": \"line\",\n \"lineWidth\"\ @@ -99,36 +117,37 @@ data: \ \"values\": false\n },\n \"graphMode\": \"area\",\n \ \ \"colorMode\": \"value\"\n }\n },\n {\n \"id\": 18,\n \ \ \"type\": \"stat\",\n \"title\": \"Save disk free\",\n \"description\"\ - : \"\",\n \"datasource\": {\n \"type\": \"prometheus\",\n \"\ - uid\": \"${DS_PROMETHEUS}\"\n },\n \"gridPos\": {\n \"x\": 20,\n\ - \ \"y\": 1,\n \"w\": 4,\n \"h\": 5\n },\n \"fieldConfig\"\ - : {\n \"defaults\": {\n \"unit\": \"bytes\",\n \"min\"\ - : 0,\n \"color\": {\n \"mode\": \"palette-classic\"\n \ - \ },\n \"custom\": {\n \"drawStyle\": \"line\",\n \ - \ \"lineWidth\": 2,\n \"fillOpacity\": 10,\n \"\ - spanNulls\": false\n }\n },\n \"overrides\": []\n \ - \ },\n \"targets\": [\n {\n \"refId\": \"A\",\n \ - \ \"expr\": \"kubelet_volume_stats_available_bytes{namespace=\\\"factorio\\\"\ - ,persistentvolumeclaim=\\\"factorio-data\\\"}\",\n \"legendFormat\":\ - \ \"Save disk free\",\n \"range\": true\n }\n ],\n \"\ - options\": {\n \"reduceOptions\": {\n \"calcs\": [\n \ - \ \"lastNotNull\"\n ],\n \"values\": false\n },\n \ - \ \"graphMode\": \"area\",\n \"colorMode\": \"value\"\n }\n\ - \ },\n {\n \"id\": 8,\n \"type\": \"row\",\n \"title\": \"\ - Server resources & availability\",\n \"collapsed\": false,\n \"gridPos\"\ - : {\n \"x\": 0,\n \"y\": 6,\n \"w\": 24,\n \"h\":\ - \ 1\n }\n },\n {\n \"id\": 9,\n \"type\": \"timeseries\"\ - ,\n \"title\": \"RAM \\u2014 game and monitoring\",\n \"description\"\ - : \"\",\n \"datasource\": {\n \"type\": \"prometheus\",\n \"\ - uid\": \"${DS_PROMETHEUS}\"\n },\n \"gridPos\": {\n \"x\": 0,\n\ - \ \"y\": 7,\n \"w\": 12,\n \"h\": 8\n },\n \"fieldConfig\"\ - : {\n \"defaults\": {\n \"unit\": \"bytes\",\n \"min\"\ - : 0,\n \"color\": {\n \"mode\": \"palette-classic\"\n \ - \ },\n \"custom\": {\n \"drawStyle\": \"line\",\n \ - \ \"lineWidth\": 2,\n \"fillOpacity\": 10,\n \"\ - spanNulls\": false\n }\n },\n \"overrides\": []\n \ - \ },\n \"targets\": [\n {\n \"refId\": \"A\",\n \ - \ \"expr\": \"sum by (container) (container_memory_working_set_bytes{namespace=\\\ + : \"Current free space on the save PVC. Node labels are collapsed so failover\ + \ does not produce duplicate values.\",\n \"datasource\": {\n \"type\"\ + : \"prometheus\",\n \"uid\": \"${DS_PROMETHEUS}\"\n },\n \"gridPos\"\ + : {\n \"x\": 20,\n \"y\": 1,\n \"w\": 4,\n \"h\":\ + \ 5\n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + unit\": \"bytes\",\n \"min\": 0,\n \"color\": {\n \ + \ \"mode\": \"palette-classic\"\n },\n \"custom\": {\n \ + \ \"drawStyle\": \"line\",\n \"lineWidth\": 2,\n \ + \ \"fillOpacity\": 10,\n \"spanNulls\": false\n }\n \ + \ },\n \"overrides\": []\n },\n \"targets\": [\n {\n\ + \ \"refId\": \"A\",\n \"expr\": \"min(kubelet_volume_stats_available_bytes{namespace=\\\ + \"factorio\\\",persistentvolumeclaim=\\\"factorio-data\\\"})\",\n \"\ + legendFormat\": \"Save disk free\",\n \"range\": false,\n \"\ + instant\": true\n }\n ],\n \"options\": {\n \"reduceOptions\"\ + : {\n \"calcs\": [\n \"lastNotNull\"\n ],\n \ + \ \"values\": false\n },\n \"graphMode\": \"none\",\n \ + \ \"colorMode\": \"value\"\n }\n },\n {\n \"id\": 8,\n \"\ + type\": \"row\",\n \"title\": \"Server resources & availability\",\n \ + \ \"collapsed\": false,\n \"gridPos\": {\n \"x\": 0,\n \"\ + y\": 6,\n \"w\": 24,\n \"h\": 1\n }\n },\n {\n \"\ + id\": 9,\n \"type\": \"timeseries\",\n \"title\": \"RAM \\u2014 game\ + \ and monitoring\",\n \"description\": \"\",\n \"datasource\": {\n \ + \ \"type\": \"prometheus\",\n \"uid\": \"${DS_PROMETHEUS}\"\n \ + \ },\n \"gridPos\": {\n \"x\": 0,\n \"y\": 7,\n \"\ + w\": 12,\n \"h\": 8\n },\n \"fieldConfig\": {\n \"defaults\"\ + : {\n \"unit\": \"bytes\",\n \"min\": 0,\n \"color\"\ + : {\n \"mode\": \"palette-classic\"\n },\n \"custom\"\ + : {\n \"drawStyle\": \"line\",\n \"lineWidth\": 2,\n \ + \ \"fillOpacity\": 10,\n \"spanNulls\": false\n }\n\ + \ },\n \"overrides\": []\n },\n \"targets\": [\n \ + \ {\n \"refId\": \"A\",\n \"expr\": \"sum by (container) (container_memory_working_set_bytes{namespace=\\\ \"factorio\\\",pod=~\\\"factorio-[a-z0-9]+-[a-z0-9]+\\\",container!=\\\"\\\",container!=\\\ \"POD\\\"})\",\n \"legendFormat\": \"{{container}}\",\n \"range\"\ : true\n }\n ],\n \"options\": {\n \"legend\": {\n \ @@ -182,27 +201,27 @@ data: : \"line\",\n \"lineWidth\": 2,\n \"fillOpacity\": 10,\n\ \ \"spanNulls\": false\n }\n },\n \"overrides\"\ : []\n },\n \"targets\": [\n {\n \"refId\": \"A\",\n\ - \ \"expr\": \"kubelet_volume_stats_used_bytes{namespace=\\\"factorio\\\ - \",persistentvolumeclaim=\\\"factorio-data\\\"}\",\n \"legendFormat\"\ + \ \"expr\": \"max(kubelet_volume_stats_used_bytes{namespace=\\\"factorio\\\ + \",persistentvolumeclaim=\\\"factorio-data\\\"})\",\n \"legendFormat\"\ : \"Used\",\n \"range\": true\n },\n {\n \"refId\"\ - : \"B\",\n \"expr\": \"kubelet_volume_stats_capacity_bytes{namespace=\\\ - \"factorio\\\",persistentvolumeclaim=\\\"factorio-data\\\"}\",\n \"legendFormat\"\ - : \"Capacity\",\n \"range\": true\n }\n ],\n \"options\"\ - : {\n \"legend\": {\n \"displayMode\": \"table\",\n \"\ - placement\": \"bottom\",\n \"calcs\": [\n \"lastNotNull\"\ - ,\n \"max\"\n ]\n },\n \"tooltip\": {\n \ - \ \"mode\": \"multi\",\n \"sort\": \"desc\"\n }\n }\n\ - \ },\n {\n \"id\": 13,\n \"type\": \"timeseries\",\n \"title\"\ - : \"Network traffic\",\n \"description\": \"\",\n \"datasource\": {\n\ - \ \"type\": \"prometheus\",\n \"uid\": \"${DS_PROMETHEUS}\"\n \ - \ },\n \"gridPos\": {\n \"x\": 0,\n \"y\": 23,\n \ - \ \"w\": 12,\n \"h\": 8\n },\n \"fieldConfig\": {\n \"\ - defaults\": {\n \"unit\": \"Bps\",\n \"min\": 0,\n \ - \ \"color\": {\n \"mode\": \"palette-classic\"\n },\n \ - \ \"custom\": {\n \"drawStyle\": \"line\",\n \"lineWidth\"\ - : 2,\n \"fillOpacity\": 10,\n \"spanNulls\": false\n \ - \ }\n },\n \"overrides\": []\n },\n \"targets\"\ - : [\n {\n \"refId\": \"A\",\n \"expr\": \"sum(rate(container_network_receive_bytes_total{namespace=\\\ + : \"B\",\n \"expr\": \"max(kubelet_volume_stats_capacity_bytes{namespace=\\\ + \"factorio\\\",persistentvolumeclaim=\\\"factorio-data\\\"})\",\n \"\ + legendFormat\": \"Capacity\",\n \"range\": true\n }\n ],\n\ + \ \"options\": {\n \"legend\": {\n \"displayMode\": \"table\"\ + ,\n \"placement\": \"bottom\",\n \"calcs\": [\n \"\ + lastNotNull\",\n \"max\"\n ]\n },\n \"tooltip\"\ + : {\n \"mode\": \"multi\",\n \"sort\": \"desc\"\n }\n\ + \ }\n },\n {\n \"id\": 13,\n \"type\": \"timeseries\",\n\ + \ \"title\": \"Network traffic\",\n \"description\": \"\",\n \"\ + datasource\": {\n \"type\": \"prometheus\",\n \"uid\": \"${DS_PROMETHEUS}\"\ + \n },\n \"gridPos\": {\n \"x\": 0,\n \"y\": 23,\n \ + \ \"w\": 12,\n \"h\": 8\n },\n \"fieldConfig\": {\n \ + \ \"defaults\": {\n \"unit\": \"Bps\",\n \"min\": 0,\n \ + \ \"color\": {\n \"mode\": \"palette-classic\"\n },\n\ + \ \"custom\": {\n \"drawStyle\": \"line\",\n \"\ + lineWidth\": 2,\n \"fillOpacity\": 10,\n \"spanNulls\":\ + \ false\n }\n },\n \"overrides\": []\n },\n \"\ + targets\": [\n {\n \"refId\": \"A\",\n \"expr\": \"sum(rate(container_network_receive_bytes_total{namespace=\\\ \"factorio\\\",pod=~\\\"factorio-[a-z0-9]+-[a-z0-9]+\\\"}[$__rate_interval]))\"\ ,\n \"legendFormat\": \"Received\",\n \"range\": true\n \ \ },\n {\n \"refId\": \"B\",\n \"expr\": \"sum(rate(container_network_transmit_bytes_total{namespace=\\\