docs-v2/static/downloads/air-sensors-dashboard.json

1030 lines
24 KiB
JSON

{
"meta": {
"version": "1",
"type": "dashboard",
"name": "Air Sensors-Template",
"description": "template created from dashboard: Air Sensors"
},
"content": {
"data": {
"type": "dashboard",
"attributes": {
"name": "Air Sensors",
"description": ""
},
"relationships": {
"label": {
"data": []
},
"cell": {
"data": [
{
"type": "cell",
"id": "0423614244f70000"
},
{
"type": "cell",
"id": "042361d158770000"
},
{
"type": "cell",
"id": "04236a6e6cf70000"
},
{
"type": "cell",
"id": "042372352a770000"
},
{
"type": "cell",
"id": "04237241bf770000"
},
{
"type": "cell",
"id": "042372d4bcf70000"
},
{
"type": "cell",
"id": "0423737a1ff70000"
},
{
"type": "cell",
"id": "042373fce5370000"
},
{
"type": "cell",
"id": "0423753affb70000"
},
{
"type": "cell",
"id": "04237b90e1370000"
}
]
},
"variable": {
"data": [
{
"type": "variable",
"id": "03bdc0c5a4ff0000"
},
{
"type": "variable",
"id": "04237161ad770000"
}
]
}
}
},
"included": [
{
"id": "0423614244f70000",
"type": "cell",
"attributes": {
"x": 4,
"y": 1,
"w": 4,
"h": 2
},
"relationships": {
"view": {
"data": {
"type": "view",
"id": "0423614244f70000"
}
}
}
},
{
"id": "042361d158770000",
"type": "cell",
"attributes": {
"x": 8,
"y": 1,
"w": 4,
"h": 2
},
"relationships": {
"view": {
"data": {
"type": "view",
"id": "042361d158770000"
}
}
}
},
{
"id": "04236a6e6cf70000",
"type": "cell",
"attributes": {
"x": 0,
"y": 7,
"w": 12,
"h": 4
},
"relationships": {
"view": {
"data": {
"type": "view",
"id": "04236a6e6cf70000"
}
}
}
},
{
"id": "042372352a770000",
"type": "cell",
"attributes": {
"x": 0,
"y": 4,
"w": 3,
"h": 3
},
"relationships": {
"view": {
"data": {
"type": "view",
"id": "042372352a770000"
}
}
}
},
{
"id": "04237241bf770000",
"type": "cell",
"attributes": {
"x": 0,
"y": 1,
"w": 4,
"h": 2
},
"relationships": {
"view": {
"data": {
"type": "view",
"id": "04237241bf770000"
}
}
}
},
{
"id": "042372d4bcf70000",
"type": "cell",
"attributes": {
"x": 3,
"y": 4,
"w": 3,
"h": 3
},
"relationships": {
"view": {
"data": {
"type": "view",
"id": "042372d4bcf70000"
}
}
}
},
{
"id": "0423737a1ff70000",
"type": "cell",
"attributes": {
"x": 6,
"y": 4,
"w": 3,
"h": 3
},
"relationships": {
"view": {
"data": {
"type": "view",
"id": "0423737a1ff70000"
}
}
}
},
{
"id": "042373fce5370000",
"type": "cell",
"attributes": {
"x": 9,
"y": 4,
"w": 3,
"h": 3
},
"relationships": {
"view": {
"data": {
"type": "view",
"id": "042373fce5370000"
}
}
}
},
{
"id": "0423753affb70000",
"type": "cell",
"attributes": {
"x": 0,
"y": 3,
"w": 12,
"h": 1
},
"relationships": {
"view": {
"data": {
"type": "view",
"id": "0423753affb70000"
}
}
}
},
{
"id": "04237b90e1370000",
"type": "cell",
"attributes": {
"x": 0,
"y": 0,
"w": 12,
"h": 1
},
"relationships": {
"view": {
"data": {
"type": "view",
"id": "04237b90e1370000"
}
}
}
},
{
"type": "view",
"id": "0423614244f70000",
"attributes": {
"name": "Humidity (All Rooms)",
"properties": {
"shape": "chronograf-v2",
"queries": [
{
"text": "import \"sql\"\n\nsensorInfo = sql.from(\n driverName: \"postgres\",\n dataSourceName: \"postgresql://localhost?sslmode=disable\",\n query: \"SELECT * FROM sensors\"\n)\n\nsensorMetrics = from(bucket: v.bucket)\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement == \"airSensors\")\n\ndata = join(tables: {metric: sensorMetrics, info: sensorInfo}, on: [\"sensor_id\"])\n\ndata\n |> filter(fn: (r) => r._field == \"humidity\")\n |> keep(columns: [\"_time\",\"_value\",\"location\"])\n |> group(columns: [\"location\"])",
"editMode": "advanced",
"name": "",
"builderConfig": {
"buckets": [],
"tags": [
{
"key": "_measurement",
"values": []
}
],
"functions": [],
"aggregateWindow": {
"period": "auto"
}
}
}
],
"axes": {
"x": {
"bounds": [
"",
""
],
"label": "",
"prefix": "",
"suffix": "",
"base": "10",
"scale": "linear"
},
"y": {
"bounds": [
"",
""
],
"label": "",
"prefix": "",
"suffix": "%",
"base": "10",
"scale": "linear"
}
},
"type": "xy",
"legend": {},
"geom": "monotoneX",
"colors": [
{
"id": "cb8568fb-29b5-4c17-9399-05dcce537935",
"type": "scale",
"hex": "#FDC44F",
"name": "Cthulhu",
"value": 0
},
{
"id": "4f1a924d-009b-45f5-8419-9fa53204bdf7",
"type": "scale",
"hex": "#007C76",
"name": "Cthulhu",
"value": 0
},
{
"id": "3f2c8336-6b0d-431a-a3c2-8c5713479225",
"type": "scale",
"hex": "#8983FF",
"name": "Cthulhu",
"value": 0
}
],
"note": "",
"showNoteWhenEmpty": false,
"xColumn": "_time",
"yColumn": "_value",
"shadeBelow": false
}
}
},
{
"type": "view",
"id": "042361d158770000",
"attributes": {
"name": "Carbon Monoxide (All Rooms)",
"properties": {
"shape": "chronograf-v2",
"queries": [
{
"text": "import \"sql\"\n\nsensorInfo = sql.from(\n driverName: \"postgres\",\n dataSourceName: \"postgresql://localhost?sslmode=disable\",\n query: \"SELECT * FROM sensors\"\n)\n\nsensorMetrics = from(bucket: v.bucket)\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement == \"airSensors\")\n\ndata = join(tables: {metric: sensorMetrics, info: sensorInfo}, on: [\"sensor_id\"])\n\ndata\n |> filter(fn: (r) => r._field == \"co\")\n |> keep(columns: [\"_time\",\"_value\",\"location\"])\n |> group(columns: [\"location\"])",
"editMode": "advanced",
"name": "",
"builderConfig": {
"buckets": [],
"tags": [
{
"key": "_measurement",
"values": []
}
],
"functions": [],
"aggregateWindow": {
"period": "auto"
}
}
}
],
"axes": {
"x": {
"bounds": [
"",
""
],
"label": "",
"prefix": "",
"suffix": "",
"base": "10",
"scale": "linear"
},
"y": {
"bounds": [
"",
""
],
"label": "",
"prefix": "",
"suffix": " ppm",
"base": "10",
"scale": "linear"
}
},
"type": "xy",
"legend": {},
"geom": "monotoneX",
"colors": [
{
"id": "d6574d38-e7b7-447b-8ca1-ad3f36296bba",
"type": "scale",
"hex": "#8F8AF4",
"name": "Do Androids Dream of Electric Sheep?",
"value": 0
},
{
"id": "67ce5515-4411-4fc0-a5a6-282b4ee76b97",
"type": "scale",
"hex": "#A51414",
"name": "Do Androids Dream of Electric Sheep?",
"value": 0
},
{
"id": "5168db82-ac7e-4d57-b8ff-5747fa01762b",
"type": "scale",
"hex": "#F4CF31",
"name": "Do Androids Dream of Electric Sheep?",
"value": 0
}
],
"note": "",
"showNoteWhenEmpty": false,
"xColumn": "_time",
"yColumn": "_value",
"shadeBelow": false
}
}
},
{
"type": "view",
"id": "04236a6e6cf70000",
"attributes": {
"name": "Sensor Info",
"properties": {
"shape": "chronograf-v2",
"type": "table",
"queries": [
{
"text": "import \"sql\"\n\nsql.from(\n driverName: \"postgres\",\n dataSourceName: \"postgresql://localhost?sslmode=disable\",\n query: \"SELECT * FROM sensors\"\n)\n |> drop(columns: [\"sensor_id\"])\n |> rename(columns: {location: \"Sensor Location\", model_number: \"Sensor Model Number\", last_inspected: \"Last Inspected\"})",
"editMode": "advanced",
"name": "",
"builderConfig": {
"buckets": [],
"tags": [
{
"key": "_measurement",
"values": []
}
],
"functions": [],
"aggregateWindow": {
"period": "auto"
}
}
}
],
"colors": [
{
"id": "base",
"type": "text",
"hex": "#00C9FF",
"name": "laser",
"value": 0
}
],
"tableOptions": {
"verticalTimeAxis": true,
"sortBy": {
"internalName": "",
"displayName": "",
"visible": false
},
"wrapping": "",
"fixFirstColumn": false
},
"fieldOptions": [
{
"internalName": "",
"displayName": "",
"visible": true
},
{
"internalName": "result",
"displayName": "result",
"visible": true
},
{
"internalName": "table",
"displayName": "table",
"visible": true
},
{
"internalName": "Sensor Location",
"displayName": "Sensor Location",
"visible": true
},
{
"internalName": "Sensor Model Number",
"displayName": "Sensor Model Number",
"visible": true
},
{
"internalName": "Last Inspected",
"displayName": "Last Inspected",
"visible": true
}
],
"timeFormat": "YYYY-MM-DD HH:mm:ss",
"decimalPlaces": {
"isEnforced": false,
"digits": 2
},
"note": "",
"showNoteWhenEmpty": false
}
}
},
{
"type": "view",
"id": "042372352a770000",
"attributes": {
"name": "Temperature",
"properties": {
"shape": "chronograf-v2",
"queries": [
{
"text": "import \"sql\"\n\nsensorInfo = sql.from(\n driverName: \"postgres\",\n dataSourceName: \"postgresql://localhost?sslmode=disable\",\n query: \"SELECT * FROM sensors\"\n)\n\nsensorMetrics = from(bucket: v.bucket)\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement == \"airSensors\")\n\ndata = join(tables: {metric: sensorMetrics, info: sensorInfo}, on: [\"sensor_id\"])\n\ndata\n |> filter(fn: (r) => r._field == \"temperature\" and r.location == v.room)",
"editMode": "advanced",
"name": "",
"builderConfig": {
"buckets": [],
"tags": [
{
"key": "_measurement",
"values": []
}
],
"functions": [],
"aggregateWindow": {
"period": "auto"
}
}
}
],
"axes": {
"x": {
"bounds": [
"",
""
],
"label": "",
"prefix": "",
"suffix": "",
"base": "10",
"scale": "linear"
},
"y": {
"bounds": [
"65",
"85"
],
"label": "",
"prefix": "",
"suffix": "°F",
"base": "10",
"scale": "linear"
}
},
"type": "line-plus-single-stat",
"legend": {},
"colors": [
{
"id": "base",
"type": "text",
"hex": "#00C9FF",
"name": "laser",
"value": 0
},
{
"id": "22088d41-bea2-47bc-a697-ab8093e3d447",
"type": "scale",
"hex": "#FDC44F",
"name": "Cthulhu",
"value": 0
},
{
"id": "9edb23f5-6e0c-4365-80e3-320736c7334c",
"type": "scale",
"hex": "#007C76",
"name": "Cthulhu",
"value": 0
},
{
"id": "2c39bd4c-4954-4991-8c03-89e9186e4271",
"type": "scale",
"hex": "#8983FF",
"name": "Cthulhu",
"value": 0
}
],
"prefix": "",
"suffix": "°F",
"decimalPlaces": {
"isEnforced": true,
"digits": 1
},
"note": "",
"showNoteWhenEmpty": false,
"xColumn": "_time",
"yColumn": "_value",
"shadeBelow": false
}
}
},
{
"type": "view",
"id": "04237241bf770000",
"attributes": {
"name": "Temperature (All Rooms)",
"properties": {
"shape": "chronograf-v2",
"queries": [
{
"text": "import \"sql\"\n\nsensorInfo = sql.from(\n driverName: \"postgres\",\n dataSourceName: \"postgresql://localhost?sslmode=disable\",\n query: \"SELECT * FROM sensors\"\n)\n\nsensorMetrics = from(bucket: v.bucket)\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement == \"airSensors\")\n\ndata = join(tables: {metric: sensorMetrics, info: sensorInfo}, on: [\"sensor_id\"])\n\ndata\n |> filter(fn: (r) => r._field == \"temperature\")\n |> keep(columns: [\"_time\",\"_value\",\"location\"])\n |> group(columns: [\"location\"])",
"editMode": "advanced",
"name": "",
"builderConfig": {
"buckets": [],
"tags": [
{
"key": "_measurement",
"values": []
}
],
"functions": [],
"aggregateWindow": {
"period": "auto"
}
}
}
],
"axes": {
"x": {
"bounds": [
"",
""
],
"label": "",
"prefix": "",
"suffix": "",
"base": "10",
"scale": "linear"
},
"y": {
"bounds": [
"",
""
],
"label": "",
"prefix": "",
"suffix": "°F",
"base": "10",
"scale": "linear"
}
},
"type": "xy",
"legend": {},
"geom": "monotoneX",
"colors": [
{
"id": "9ae217cd-ae69-42b2-b5b9-229a450d854c",
"type": "scale",
"hex": "#31C0F6",
"name": "Nineteen Eighty Four",
"value": 0
},
{
"id": "03684e9b-7ad4-478a-afcc-11c46ff136cb",
"type": "scale",
"hex": "#A500A5",
"name": "Nineteen Eighty Four",
"value": 0
},
{
"id": "4e437663-7938-4429-b772-913cb82c8b08",
"type": "scale",
"hex": "#FF7E27",
"name": "Nineteen Eighty Four",
"value": 0
}
],
"note": "",
"showNoteWhenEmpty": false,
"xColumn": "_time",
"yColumn": "_value",
"shadeBelow": false
}
}
},
{
"type": "view",
"id": "042372d4bcf70000",
"attributes": {
"name": "Humidity",
"properties": {
"shape": "chronograf-v2",
"queries": [
{
"text": "import \"sql\"\n\nsensorInfo = sql.from(\n driverName: \"postgres\",\n dataSourceName: \"postgresql://localhost?sslmode=disable\",\n query: \"SELECT * FROM sensors\"\n)\n\nsensorMetrics = from(bucket: v.bucket)\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement == \"airSensors\")\n\ndata = join(tables: {metric: sensorMetrics, info: sensorInfo}, on: [\"sensor_id\"])\n\ndata\n |> filter(fn: (r) => r._field == \"humidity\" and r.location == v.room)",
"editMode": "advanced",
"name": "",
"builderConfig": {
"buckets": [],
"tags": [
{
"key": "_measurement",
"values": []
}
],
"functions": [],
"aggregateWindow": {
"period": "auto"
}
}
}
],
"axes": {
"x": {
"bounds": [
"",
""
],
"label": "",
"prefix": "",
"suffix": "",
"base": "10",
"scale": "linear"
},
"y": {
"bounds": [
"25",
"55"
],
"label": "",
"prefix": "",
"suffix": "%",
"base": "10",
"scale": "linear"
}
},
"type": "line-plus-single-stat",
"legend": {},
"colors": [
{
"id": "base",
"type": "text",
"hex": "#00C9FF",
"name": "laser",
"value": 0
},
{
"id": "99f3c23b-c495-451e-8b30-162ba1739972",
"type": "scale",
"hex": "#8F8AF4",
"name": "Do Androids Dream of Electric Sheep?",
"value": 0
},
{
"id": "2b27ca35-0a93-4506-99ce-b6c338c4f0e1",
"type": "scale",
"hex": "#A51414",
"name": "Do Androids Dream of Electric Sheep?",
"value": 0
},
{
"id": "44866d00-0182-4136-b8a2-ea991e1300af",
"type": "scale",
"hex": "#F4CF31",
"name": "Do Androids Dream of Electric Sheep?",
"value": 0
}
],
"prefix": "",
"suffix": "%",
"decimalPlaces": {
"isEnforced": true,
"digits": 2
},
"note": "",
"showNoteWhenEmpty": false,
"xColumn": "_time",
"yColumn": "_value",
"shadeBelow": false
}
}
},
{
"type": "view",
"id": "0423737a1ff70000",
"attributes": {
"name": "Carbon Monoxide",
"properties": {
"shape": "chronograf-v2",
"queries": [
{
"text": "import \"sql\"\n\nsensorInfo = sql.from(\n driverName: \"postgres\",\n dataSourceName: \"postgresql://localhost?sslmode=disable\",\n query: \"SELECT * FROM sensors\"\n)\n\nsensorMetrics = from(bucket: v.bucket)\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement == \"airSensors\")\n\ndata = join(tables: {metric: sensorMetrics, info: sensorInfo}, on: [\"sensor_id\"])\n\ndata\n |> filter(fn: (r) => r._field == \"co\" and r.location == v.room)",
"editMode": "advanced",
"name": "",
"builderConfig": {
"buckets": [],
"tags": [
{
"key": "_measurement",
"values": []
}
],
"functions": [],
"aggregateWindow": {
"period": "auto"
}
}
}
],
"axes": {
"x": {
"bounds": [
"",
""
],
"label": "",
"prefix": "",
"suffix": "",
"base": "10",
"scale": "linear"
},
"y": {
"bounds": [
"",
""
],
"label": "",
"prefix": "",
"suffix": " ppm",
"base": "10",
"scale": "linear"
}
},
"type": "line-plus-single-stat",
"legend": {},
"colors": [
{
"id": "base",
"type": "text",
"hex": "#00C9FF",
"name": "laser",
"value": 0
},
{
"id": "6618c85e-1b5f-4c4f-9a03-c852a1a3cc47",
"type": "scale",
"hex": "#DA6FF1",
"name": "Ectoplasm",
"value": 0
},
{
"id": "ea594da3-a224-4f9d-b592-3623b9e84b0f",
"type": "scale",
"hex": "#00717A",
"name": "Ectoplasm",
"value": 0
},
{
"id": "0add3620-1c62-4798-89ab-7435f19caec6",
"type": "scale",
"hex": "#ACFF76",
"name": "Ectoplasm",
"value": 0
}
],
"prefix": "",
"suffix": " ppm",
"decimalPlaces": {
"isEnforced": true,
"digits": 1
},
"note": "",
"showNoteWhenEmpty": false,
"xColumn": "_time",
"yColumn": "_value",
"shadeBelow": false
}
}
},
{
"type": "view",
"id": "042373fce5370000",
"attributes": {
"name": "Carbon Monoxide Level",
"properties": {
"shape": "chronograf-v2",
"type": "gauge",
"queries": [
{
"text": "import \"sql\"\n\nsensorInfo = sql.from(\n driverName: \"postgres\",\n dataSourceName: \"postgresql://localhost?sslmode=disable\",\n query: \"SELECT * FROM sensors\"\n)\n\nsensorMetrics = from(bucket: v.bucket)\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement == \"airSensors\")\n\ndata = join(tables: {metric: sensorMetrics, info: sensorInfo}, on: [\"sensor_id\"])\n\ndata\n |> filter(fn: (r) => r._field == \"co\" and r.location == v.room)",
"editMode": "advanced",
"name": "",
"builderConfig": {
"buckets": [],
"tags": [
{
"key": "_measurement",
"values": []
}
],
"functions": [],
"aggregateWindow": {
"period": "auto"
}
}
}
],
"prefix": "",
"suffix": " ppm",
"colors": [
{
"id": "0",
"type": "min",
"hex": "#4ED8A0",
"name": "rainforest",
"value": 0
},
{
"id": "eba43308-b8ae-40fd-bc0a-d056f4ceb435",
"type": "threshold",
"hex": "#FFB94A",
"name": "pineapple",
"value": 30
},
{
"id": "5a51cc65-ec3d-45a4-b5c9-94156cdf279b",
"type": "threshold",
"hex": "#BF3D5E",
"name": "ruby",
"value": 70
},
{
"id": "1",
"type": "max",
"hex": "#BF3D5E",
"name": "ruby",
"value": 140
}
],
"decimalPlaces": {
"isEnforced": true,
"digits": 2
},
"note": "",
"showNoteWhenEmpty": false
}
}
},
{
"type": "view",
"id": "0423753affb70000",
"attributes": {
"name": "Name this Cell",
"properties": {
"shape": "chronograf-v2",
"type": "markdown",
"note": " \n**`⬆` View metrics for a specific room by selecting the a room above.**"
}
}
},
{
"type": "view",
"id": "04237b90e1370000",
"attributes": {
"name": "Name this Cell",
"properties": {
"shape": "chronograf-v2",
"type": "markdown",
"note": " \n**`⬆` Select the bucket that contains the airSensor measurement.**"
}
}
},
{
"id": "03bdc0c5a4ff0000",
"type": "variable",
"attributes": {
"name": "bucket",
"arguments": {
"type": "query",
"values": {
"query": "buckets()\n |> map(fn: (r) => ({ _value: r.name }))\n",
"language": "flux"
}
},
"selected": null
},
"relationships": {
"label": {
"data": []
}
}
},
{
"id": "04237161ad770000",
"type": "variable",
"attributes": {
"name": "room",
"arguments": {
"type": "query",
"values": {
"query": "import \"sql\"\n\nsql.from(\n driverName: \"postgres\",\n dataSourceName: \"postgresql://localhost?sslmode=disable\",\n query: \"SELECT * FROM sensors\"\n)\n |> rename(columns: {location: \"_value\"})\n |> keep(columns: [\"_value\"])\n",
"language": "flux"
}
},
"selected": null
},
"relationships": {
"label": {
"data": []
}
}
}
]
},
"labels": []
}