Skip to content

Instantly share code, notes, and snippets.

@tqbf
Created May 20, 2021 19:45
Show Gist options
  • Save tqbf/0732a08e15b97a86e2eb96100452209f to your computer and use it in GitHub Desktop.
Save tqbf/0732a08e15b97a86e2eb96100452209f to your computer and use it in GitHub Desktop.
A simple Grafana dashboard for Fly
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": 6,
"iteration": 1621382738444,
"links": [],
"panels": [
{
"aliasColors": {
"Recv_bytes_eth2": "#7EB26D",
"Recv_bytes_lo": "#0A50A1",
"Recv_drop_eth2": "#6ED0E0",
"Recv_drop_lo": "#E0F9D7",
"Recv_errs_eth2": "#BF1B00",
"Recv_errs_lo": "#CCA300",
"Trans_bytes_eth2": "#7EB26D",
"Trans_bytes_lo": "#0A50A1",
"Trans_drop_eth2": "#6ED0E0",
"Trans_drop_lo": "#E0F9D7",
"Trans_errs_eth2": "#BF1B00",
"Trans_errs_lo": "#CCA300",
"recv_bytes_lo": "#0A50A1",
"recv_drop_eth0": "#99440A",
"recv_drop_lo": "#967302",
"recv_errs_eth0": "#BF1B00",
"recv_errs_lo": "#890F02",
"trans_bytes_eth0": "#7EB26D",
"trans_bytes_lo": "#0A50A1",
"trans_drop_eth0": "#99440A",
"trans_drop_lo": "#967302",
"trans_errs_eth0": "#BF1B00",
"trans_errs_lo": "#890F02"
},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "Fly Org",
"description": "Basic network info per interface",
"fieldConfig": {
"defaults": {
"links": []
},
"overrides": []
},
"fill": 4,
"fillGradient": 0,
"gridPos": {
"h": 7,
"w": 6,
"x": 0,
"y": 0
},
"hiddenSeries": false,
"id": 15,
"legend": {
"alignAsTable": false,
"avg": false,
"current": false,
"hideEmpty": false,
"hideZero": false,
"max": false,
"min": false,
"rightSide": false,
"show": true,
"sort": "current",
"sortDesc": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.5.5",
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [
{
"alias": "/.*trans.*/",
"transform": "negative-Y"
}
],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "sum(irate(fly_instance_net_recv_bytes{app=\"$app\"}[5m])*8)",
"format": "time_series",
"interval": "",
"intervalFactor": 2,
"legendFormat": "recv {{device}}",
"refId": "A",
"step": 240
},
{
"expr": "sum(irate(fly_instance_net_sent_bytes{app=\"$app\"}[5m])*8)",
"format": "time_series",
"interval": "",
"intervalFactor": 2,
"legendFormat": "trans {{device}} ",
"refId": "B",
"step": 240
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Network Traffic Basic",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "bps",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "pps",
"label": "",
"logBase": 1,
"max": null,
"min": null,
"show": false
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {
"Apps": "#629E51",
"Buffers": "#614D93",
"Cache": "#6D1F62",
"Cached": "#511749",
"Committed": "#508642",
"Free": "#0A437C",
"Hardware Corrupted - Amount of RAM that the kernel identified as corrupted / not working": "#CFFAFF",
"Inactive": "#584477",
"PageTables": "#0A50A1",
"Page_Tables": "#0A50A1",
"RAM_Free": "#E0F9D7",
"SWAP Used": "#BF1B00",
"Slab": "#806EB7",
"Slab_Cache": "#E0752D",
"Swap": "#BF1B00",
"Swap Used": "#BF1B00",
"Swap_Cache": "#C15C17",
"Swap_Free": "#2F575E",
"Unused": "#EAB839"
},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "Fly Org",
"decimals": 2,
"description": "Basic memory usage",
"fieldConfig": {
"defaults": {
"links": []
},
"overrides": []
},
"fill": 4,
"fillGradient": 0,
"gridPos": {
"h": 7,
"w": 8,
"x": 6,
"y": 0
},
"hiddenSeries": false,
"id": 19,
"legend": {
"alignAsTable": false,
"avg": false,
"current": false,
"max": false,
"min": false,
"rightSide": false,
"show": true,
"sideWidth": 350,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"links": [],
"maxPerRow": 6,
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.5.5",
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [
{
"alias": "RAM Total",
"color": "#E0F9D7",
"fill": 0,
"stack": false
},
{
"alias": "RAM Cache + Buffer",
"color": "#052B51"
},
{
"alias": "RAM Free",
"color": "#7EB26D"
},
{
"alias": "Avaliable",
"color": "#DEDAF7",
"fill": 0,
"stack": false
}
],
"spaceLength": 10,
"stack": true,
"steppedLine": false,
"targets": [
{
"expr": "sum(fly_instance_memory_mem_total{app=\"$app\"})",
"format": "time_series",
"hide": false,
"interval": "",
"intervalFactor": 2,
"legendFormat": "RAM Total",
"refId": "A",
"step": 240
},
{
"expr": "sum(fly_instance_memory_mem_total{app=\"$app\"} - fly_instance_memory_mem_free{app=\"$app\"}) - sum((fly_instance_memory_cached{app=\"$app\"} + fly_instance_memory_buffers{app=\"$app\"}))",
"format": "time_series",
"hide": false,
"interval": "",
"intervalFactor": 2,
"legendFormat": "RAM Used",
"refId": "B",
"step": 240
},
{
"expr": "sum(fly_instance_memory_cached{app=\"$app\"} + fly_instance_memory_buffers{app=\"$app\"})",
"format": "time_series",
"interval": "",
"intervalFactor": 2,
"legendFormat": "RAM Cache + Buffer",
"refId": "C",
"step": 240
},
{
"expr": "sum(fly_instance_memory_mem_free{app=\"$app\"})",
"format": "time_series",
"interval": "",
"intervalFactor": 2,
"legendFormat": "RAM Free",
"refId": "D",
"step": 240
},
{
"expr": "sum(fly_instance_memory_swap_total{app=\"$app\"} - fly_instance_memory_swap_free{app=\"$app\"})",
"format": "time_series",
"interval": "",
"intervalFactor": 2,
"legendFormat": "SWAP Used",
"refId": "E",
"step": 240
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Memory Basic",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "bytes",
"label": "",
"logBase": 1,
"max": null,
"min": "0",
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": false
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": true,
"dashLength": 10,
"dashes": false,
"datasource": "Fly Org",
"fieldConfig": {
"defaults": {},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 7,
"w": 6,
"x": 14,
"y": 0
},
"hiddenSeries": false,
"id": 17,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": false,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.5.5",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [
{
"alias": "disconns",
"transform": "negative-Y"
}
],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "sum(increase(fly_app_tcp_connects_count{app=\"$app\"}[$__interval]))",
"interval": "1m",
"legendFormat": "conns",
"refId": "A"
},
{
"expr": "sum(increase(fly_app_tcp_disconnects_count{app=\"$app\"}[$__interval]))",
"interval": "1m",
"legendFormat": "disconns",
"refId": "B"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "App connections",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"circleMaxSize": "10",
"circleMinSize": 2,
"colors": [
"rgba(245, 54, 54, 0.9)",
"#1F60C4",
"rgba(50, 172, 45, 0.97)"
],
"datasource": "Fly Org",
"decimals": 0,
"esMetric": "Count",
"fieldConfig": {
"defaults": {},
"overrides": []
},
"gridPos": {
"h": 12,
"w": 18,
"x": 0,
"y": 7
},
"hideEmpty": false,
"hideZero": false,
"id": 4,
"initialZoom": 1,
"jsonUrl": "https://api.fly.io/meta/regions.json",
"locationData": "json endpoint",
"mapCenter": "(0°, 0°)",
"mapCenterLatitude": 0,
"mapCenterLongitude": 0,
"maxDataPoints": 1,
"mouseWheelZoom": false,
"pluginVersion": "7.1.5",
"showLegend": true,
"stickyLabels": false,
"tableQueryOptions": {
"geohashField": "geohash",
"latitudeField": "latitude",
"longitudeField": "longitude",
"metricField": "metric",
"queryType": "geohash"
},
"targets": [
{
"expr": "sum(rate(fly_edge_http_responses_count{app=~\"^$app$\"}[$__interval])) by (region)",
"format": "time_series",
"instant": true,
"interval": "",
"legendFormat": "{{region}}",
"refId": "A"
}
],
"thresholds": "0,10",
"timeFrom": null,
"timeShift": null,
"title": "Requests by Region",
"type": "grafana-worldmap-panel",
"unitPlural": "",
"unitSingle": "",
"valueName": "total"
},
{
"datasource": "Fly Org",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": null,
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "none"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Total"
},
"properties": [
{
"id": "unit",
"value": "bytes"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Used %"
},
"properties": [
{
"id": "unit",
"value": "percent"
}
]
}
]
},
"gridPos": {
"h": 4,
"w": 18,
"x": 0,
"y": 19
},
"id": 13,
"options": {
"frameIndex": 0,
"showHeader": true
},
"pluginVersion": "7.5.5",
"targets": [
{
"expr": "fly_volume_size_bytes{app=\"$app\"}",
"format": "table",
"instant": true,
"interval": "",
"legendFormat": "total",
"refId": "A"
},
{
"expr": "fly_volume_used_pct{app=\"$app\"}",
"format": "table",
"hide": false,
"instant": true,
"interval": "",
"legendFormat": "used %",
"refId": "B"
}
],
"title": "Volumes",
"transformations": [
{
"id": "merge",
"options": {}
},
{
"id": "groupBy",
"options": {
"fields": {
"Total": {
"aggregations": [
"lastNotNull"
],
"operation": "aggregate"
},
"Used %": {
"aggregations": [
"lastNotNull"
],
"operation": "aggregate"
},
"Value #A": {
"aggregations": [
"lastNotNull"
],
"operation": "aggregate"
},
"Value #B": {
"aggregations": [
"lastNotNull"
],
"operation": "aggregate"
},
"id": {
"aggregations": [],
"operation": "groupby"
},
"name": {
"aggregations": [
"lastNotNull"
],
"operation": "aggregate"
},
"region": {
"aggregations": [
"lastNotNull"
],
"operation": "aggregate"
}
}
}
},
{
"id": "organize",
"options": {
"excludeByName": {
"Time": true,
"__name__": true,
"app": true
},
"indexByName": {},
"renameByName": {
"Value #A": "Total",
"Value #A (lastNotNull)": "Total",
"Value #B": "Used %",
"Value #B (lastNotNull)": "Used %",
"id": "ID",
"name (lastNotNull)": "Name",
"region (lastNotNull)": "Region"
}
}
}
],
"type": "table"
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "Fly Org",
"fieldConfig": {
"defaults": {},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 8,
"w": 18,
"x": 0,
"y": 23
},
"hiddenSeries": false,
"id": 2,
"legend": {
"alignAsTable": true,
"avg": false,
"current": true,
"max": true,
"min": false,
"rightSide": true,
"show": true,
"sort": "current",
"sortDesc": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.5.5",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [
{
"alias": "/^2/",
"color": "#73BF69"
},
{
"alias": "/^3/",
"color": "#5794F2"
},
{
"alias": "/^4/",
"color": "#FADE2A"
},
{
"alias": "/^5/",
"color": "#F2495C"
},
{
"alias": "/^1/",
"color": "#B877D9"
}
],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "sum(rate(fly_edge_http_responses_count{app=~\"^$app$\"}[$__rate_interval])) by (status)",
"interval": "",
"legendFormat": "{{status}}",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "HTTP Response Codes",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "reqps",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "Fly Org",
"fieldConfig": {
"defaults": {},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 8,
"w": 9,
"x": 0,
"y": 31
},
"hiddenSeries": false,
"id": 11,
"legend": {
"alignAsTable": false,
"avg": false,
"current": false,
"max": false,
"min": false,
"rightSide": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": true,
"pluginVersion": "7.5.5",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [
{
"alias": "busy iowait",
"color": "#C4162A"
},
{
"alias": "idle",
"color": "#73BF69"
},
{
"alias": "busy",
"color": "#E0B400"
},
{
"alias": "busy user",
"color": "#1F60C4"
},
{
"alias": "busy other",
"color": "#8F3BB8"
}
],
"spaceLength": 10,
"stack": true,
"steppedLine": false,
"targets": [
{
"expr": "sum(irate(fly_instance_cpu{mode=\"system\", app=\"$app\"}[5m])) * 100",
"interval": "30s",
"intervalFactor": 2,
"legendFormat": "busy",
"refId": "A"
},
{
"expr": "sum(irate(fly_instance_cpu{mode=\"user\", app=\"$app\"}[5m])) * 100",
"interval": "30s",
"intervalFactor": 2,
"legendFormat": "busy user",
"refId": "B"
},
{
"expr": "sum(irate(fly_instance_cpu{mode=\"iowait\", app=\"$app\"}[5m])) * 100",
"interval": "30s",
"intervalFactor": 2,
"legendFormat": "busy iowait",
"refId": "C"
},
{
"expr": "sum(irate(fly_instance_cpu{mode=~\".*irq\", app=\"$app\"}[5m])) * 100",
"interval": "30s",
"intervalFactor": 2,
"legendFormat": "busy irqs",
"refId": "D"
},
{
"expr": "sum(irate(fly_instance_cpu{mode!='idle',mode!='user',mode!='system',mode!='iowait',mode!='irq',mode!='softirq', app=\"$app\"}[5m])) * 100",
"interval": "30s",
"intervalFactor": 2,
"legendFormat": "busy other",
"refId": "E"
},
{
"expr": "sum(irate(fly_instance_cpu{mode=\"idle\", app=\"$app\"}[5m])) * 100",
"interval": "30s",
"intervalFactor": 2,
"legendFormat": "idle",
"refId": "F"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "CPU time",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": "100",
"min": "0",
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"cards": {
"cardPadding": null,
"cardRound": null
},
"color": {
"cardColor": "#b4ff00",
"colorScale": "sqrt",
"colorScheme": "interpolatePlasma",
"exponent": 0.5,
"min": 0,
"mode": "spectrum"
},
"dataFormat": "tsbuckets",
"datasource": "Fly Org",
"fieldConfig": {
"defaults": {},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 9,
"x": 9,
"y": 31
},
"heatmap": {},
"hideZeroBuckets": false,
"highlightCards": true,
"id": 9,
"legend": {
"show": true
},
"pluginVersion": "7.1.5",
"reverseYBuckets": false,
"targets": [
{
"expr": "sum(increase(fly_edge_http_response_time_seconds_bucket{app=~\"^$app$\"}[$__interval])) by (le)",
"format": "heatmap",
"interval": "1m",
"legendFormat": "{{le}}",
"refId": "A"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Response Times",
"tooltip": {
"show": true,
"showHistogram": false
},
"type": "heatmap",
"xAxis": {
"show": true
},
"xBucketNumber": null,
"xBucketSize": null,
"yAxis": {
"decimals": 0,
"format": "s",
"logBase": 1,
"max": null,
"min": "0",
"show": true,
"splitFactor": null
},
"yBucketBound": "middle",
"yBucketNumber": null,
"yBucketSize": null
}
],
"refresh": "",
"schemaVersion": 27,
"style": "dark",
"tags": [],
"templating": {
"list": [
{
"allValue": ".*",
"current": {
"selected": false,
"text": "",
"value": ""
},
"datasource": "Fly Org",
"definition": "label_values(fly_app_concurrency, app)",
"description": null,
"error": null,
"hide": 0,
"includeAll": true,
"label": "App Name",
"multi": false,
"name": "app",
"options": [],
"query": {
"query": "label_values(fly_app_concurrency, app)",
"refId": "Fly Org-app-Variable-Query"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 1,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
}
]
},
"time": {
"from": "now-5m",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
]
},
"timezone": "",
"title": "Fly Apps",
"uid": "nmg5v3lMz",
"version": 16
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment