diff --git a/ansible/event b/ansible/event index 26b7e5e..038b81f 100644 --- a/ansible/event +++ b/ansible/event @@ -1,7 +1,8 @@ [recorders] -x220-01 ansible_host=fd11:f055:a514::2 ansible_user=opentech room_type=setup2 room_id= webcam_name=usb-046d_HD_Pro_Webcam_C920_CEB3336F -x230-01 ansible_host=fd11:f055:a514::3 ansible_user=opentech room_type= room_id= webcam_name=usb-046d_HD_Pro_Webcam_C920_50EBAE4F - ansible_host=fd11:f055:a514::4 ansible_user=opentech room_type= room_id= webcam_name= - ansible_host=fd11:f055:a514::5 ansible_user=opentech room_type= room_id= webcam_name= - ansible_host=fd11:f055:a514::6 ansible_user=opentech room_type= room_id= webcam_name= -x220-02 ansible_host=fd11:f055:a514::7 ansible_user=opentech room_type= room_id= webcam_name=usb-046d_HD_Pro_Webcam_C920_312AF46F +x220-01 ansible_host=fd11:f055:a514::2 ansible_user=opentech room_type=setup1 room_id=eventhall2-1 webcam_name=usb-046d_HD_Pro_Webcam_C920_50EBAE4F +x230-01 ansible_host=fd11:f055:a514::3 ansible_user=opentech room_type=setup3 room_id=lecturetheatre webcam_name=usb-046d_HD_Pro_Webcam_C920_CEB3336F +x240-01 ansible_host=fd11:f055:a514::4 ansible_user=opentech room_type=setup1 room_id=eventhall2-2 webcam_name= +x240-02 ansible_host=fd11:f055:a514::5 ansible_user=opentech room_type=setup2 room_id=trainingroom2-1 webcam_name= +x240-03 ansible_host=fd11:f055:a514::6 ansible_user=opentech room_type=setup2 room_id=trainingroom2-2 webcam_name= +[audio_source] +x220-02 ansible_host=fd11:f055:a514::7 ansible_user=opentech room_type=setup3 room_id= webcam_name=usb-046d_HD_Pro_Webcam_C920_312AF46F diff --git a/ansible/group_vars/all b/ansible/group_vars/all index 55e2b13..214c394 100644 --- a/ansible/group_vars/all +++ b/ansible/group_vars/all @@ -17,4 +17,4 @@ node_exporter_enabled_collectors: # Meta -ansible_python_interpreter: auto +ansible_python_interpreter: /usr/bin/python3 diff --git a/ansible/group_vars/audio_source b/ansible/group_vars/audio_source new file mode 100644 index 0000000..196f4f8 --- /dev/null +++ b/ansible/group_vars/audio_source @@ -0,0 +1,3 @@ +--- + +autostart: true diff --git a/ansible/group_vars/recorders b/ansible/group_vars/recorders index febf17d..95751df 100644 --- a/ansible/group_vars/recorders +++ b/ansible/group_vars/recorders @@ -1,8 +1,5 @@ --- -room_type: unknown -room_id: unknown - # Overwrite in inventory if cannot cope record_profile: 720p # Overwrite in inventory if want to use more storage to use less CPU diff --git a/ansible/recorders-stop.yml b/ansible/recorders-stop.yml index f7c993e..d9567aa 100644 --- a/ansible/recorders-stop.yml +++ b/ansible/recorders-stop.yml @@ -1,13 +1,19 @@ --- -- hosts: recorders +- hosts: all roles: - productivity + - laptop + - role: cloudalchemy.node-exporter + tags: node_exporter - hosts: recorders roles: - - role: laptop - role: recorder - - role: cloudalchemy.node-exporter - tags: node_exporter + vars: + autostart: false + +- hosts: audio_source + roles: + - role: audio_source vars: autostart: false diff --git a/ansible/recorders.yml b/ansible/recorders.yml index d541ce0..b12f86c 100644 --- a/ansible/recorders.yml +++ b/ansible/recorders.yml @@ -1,12 +1,16 @@ --- -- hosts: recorders +- hosts: all roles: - productivity - -- hosts: recorders - roles: - - role: laptop - - role: recorder + - laptop - role: cloudalchemy.node-exporter tags: node_exporter +- hosts: recorders + roles: + - role: recorder + +- hosts: audio_source + roles: + - role: audio_source + diff --git a/ansible/roles/audio_source/tasks/audio_source.yml b/ansible/roles/audio_source/tasks/audio_source.yml new file mode 100644 index 0000000..53c0798 --- /dev/null +++ b/ansible/roles/audio_source/tasks/audio_source.yml @@ -0,0 +1,19 @@ +--- + +- name: remove existing audio_source network + command: + cmd: nmcli connection delete audio_source + ignore_errors: yes + become: yes + +- name: configure audio_source network + command: + cmd: nmcli connection add save yes ifname enp0s25 con-name audio_source type ethernet ipv4.method disabled ipv6.method manual ipv6.addresses "fd12:f055:a514:a0a0::1/64" ipv6.never-default true ipv6.addr-gen-mode eui64 ipv6.ignore-auto-dns yes ipv6.ignore-auto-routes yes + become: yes + when: autostart + +- name: enable audio_source network + command: + cmd: nmcli connection up audio_source + become: yes + when: autostart diff --git a/ansible/roles/audio_source/tasks/ffmpeg.yml b/ansible/roles/audio_source/tasks/ffmpeg.yml new file mode 100644 index 0000000..c205447 --- /dev/null +++ b/ansible/roles/audio_source/tasks/ffmpeg.yml @@ -0,0 +1,3 @@ +--- + +- name: automatically start ffmpeg diff --git a/ansible/roles/audio_source/tasks/main.yml b/ansible/roles/audio_source/tasks/main.yml new file mode 100644 index 0000000..3b6d8df --- /dev/null +++ b/ansible/roles/audio_source/tasks/main.yml @@ -0,0 +1,3 @@ +--- +- include: packages.yml +- include: audio_source.yml diff --git a/ansible/roles/audio_source/tasks/packages.yml b/ansible/roles/audio_source/tasks/packages.yml new file mode 100644 index 0000000..574bae1 --- /dev/null +++ b/ansible/roles/audio_source/tasks/packages.yml @@ -0,0 +1,11 @@ +--- + +- name: install packages required to be an audio_source + become: yes + apt: + state: latest + name: + - ffmpeg + # for NetworkManager in audio_source + - python3-dbus + - libnm-dev diff --git a/ansible/roles/laptop/templates/greeter.dconf-defaults b/ansible/roles/laptop/templates/greeter.dconf-defaults index 8d9192b..5e58a38 100644 --- a/ansible/roles/laptop/templates/greeter.dconf-defaults +++ b/ansible/roles/laptop/templates/greeter.dconf-defaults @@ -31,7 +31,7 @@ logo='/opt/login-logo.png' # disable-restart-buttons=true # - Show a login welcome message banner-message-enable=true -banner-message-text='Hostname: {{ ansible_hostname }}\n{% if room_type %}Room: {{ room_type }} {{ room_id }}{% endif %}\nUsername: opentech Password: opentech\nUsername: mixer Password: mixer\n{% if autostart %}Mixer Autostart Enabled{% endif %}' +banner-message-text='Hostname: {{ ansible_hostname }}\n{% if room_type %}Room: {{ room_type }} {{ room_id }}{% endif %}\nUsername: opentech Password: opentech\nUsername: mixer Password: mixer\n{% if autostart %}Mixer Autostart Enabled\n{% endif %}' # Automatic suspend # ================= diff --git a/ansible/roles/recorder/tasks/audio_source.yml b/ansible/roles/recorder/tasks/audio_source.yml new file mode 100644 index 0000000..61ae9f3 --- /dev/null +++ b/ansible/roles/recorder/tasks/audio_source.yml @@ -0,0 +1,20 @@ +--- + +- name: remove existing audio_source network + command: + cmd: nmcli connection delete audio_source + ignore_errors: yes + become: yes + when: room_id == "lecturetheatre" + +- name: configure audio_source network + command: + cmd: nmcli connection add save yes ifname enp0s25 con-name audio_source type ethernet ipv4.method disabled ipv6.method manual ipv6.addresses "fd12:f055:a514:a0a0::2/64" ipv6.never-default true ipv6.addr-gen-mode eui64 ipv6.ignore-auto-dns yes ipv6.ignore-auto-routes yes + become: yes + when: autostart and room_id == "lecturetheatre" + +- name: enable audio_source network + command: + cmd: nmcli connection up audio_source + become: yes + when: autostart and room_id == "lecturetheatre" diff --git a/ansible/roles/recorder/tasks/main.yml b/ansible/roles/recorder/tasks/main.yml index 341a15a..1fda27d 100644 --- a/ansible/roles/recorder/tasks/main.yml +++ b/ansible/roles/recorder/tasks/main.yml @@ -3,4 +3,5 @@ - include: packages.yml - include: artwork.yml - include: obs.yml +- include: audio_source.yml - include: textfile.yml diff --git a/ansible/roles/recorder/tasks/packages.yml b/ansible/roles/recorder/tasks/packages.yml index 1eb7bb2..c09e8f2 100644 --- a/ansible/roles/recorder/tasks/packages.yml +++ b/ansible/roles/recorder/tasks/packages.yml @@ -6,3 +6,6 @@ state: latest name: - obs-studio + # for NetworkManager in audio_source + - python3-dbus + - libnm-dev diff --git a/ansible/roles/recorder/tasks/textfile.yml b/ansible/roles/recorder/tasks/textfile.yml index db2c9ed..d183f66 100644 --- a/ansible/roles/recorder/tasks/textfile.yml +++ b/ansible/roles/recorder/tasks/textfile.yml @@ -1,6 +1,6 @@ --- -- name: Log room for node_exporter +- name: log room for node_exporter become: yes copy: content: "room{type=\"{{ room_type }}\",id=\"{{ room_id }}\"} 1\n" @@ -9,3 +9,12 @@ group: root mode: u=rw,g=r,o=r +- name: save room_type into home + copy: + content: "{{ room_type }}\n" + dest: "/home/opentech/room_type" + +- name: save room_id into home + copy: + content: "{{ room_id }}\n" + dest: "/home/opentech/room_id" diff --git a/ansible/roles/recorder/templates/obs-studio/basic/scenes/event_id.json.j2 b/ansible/roles/recorder/templates/obs-studio/basic/scenes/event_id.json.j2 index 9b1d522..59c92b2 100644 --- a/ansible/roles/recorder/templates/obs-studio/basic/scenes/event_id.json.j2 +++ b/ansible/roles/recorder/templates/obs-studio/basic/scenes/event_id.json.j2 @@ -34,7 +34,7 @@ {% elif room_type == "setup2" %} "device_id": "alsa_input.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.analog-stereo" {% elif room_type == "setup3" %} - "device_id": "alsa_input.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.analog-stereo" + "device_id": "" {% else %} "device_id": "alsa_input.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.analog-stereo" {% endif %} diff --git a/dashboard.json b/dashboard.json new file mode 100644 index 0000000..5016a25 --- /dev/null +++ b/dashboard.json @@ -0,0 +1,742 @@ +{ + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "Prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "6.6.2" + }, + { + "type": "panel", + "id": "heatmap", + "name": "Heatmap", + "version": "" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + } + ], + "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": null, + "iteration": 1584259937108, + "links": [], + "panels": [ + { + "cards": { + "cardPadding": null, + "cardRound": null + }, + "color": { + "cardColor": "#B877D9", + "colorScale": "linear", + "colorScheme": "interpolateSpectral", + "exponent": 0.5, + "max": 1, + "min": 0, + "mode": "opacity" + }, + "dataFormat": "tsbuckets", + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 13, + "w": 6, + "x": 0, + "y": 0 + }, + "heatmap": {}, + "hideZeroBuckets": false, + "highlightCards": true, + "id": 3, + "interval": "1m", + "legend": { + "show": true + }, + "options": {}, + "reverseYBuckets": false, + "targets": [ + { + "expr": "(up * on(instance) group_left(nodename) (node_uname_info))", + "format": "time_series", + "instant": false, + "intervalFactor": 1, + "legendFormat": "{{nodename}}", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Up", + "tooltip": { + "show": false, + "showHistogram": false + }, + "type": "heatmap", + "xAxis": { + "show": true + }, + "xBucketNumber": null, + "xBucketSize": null, + "yAxis": { + "decimals": null, + "format": "none", + "logBase": 1, + "max": null, + "min": null, + "show": true, + "splitFactor": null + }, + "yBucketBound": "middle", + "yBucketNumber": null, + "yBucketSize": null + }, + { + "cards": { + "cardPadding": null, + "cardRound": null + }, + "color": { + "cardColor": "#b4ff00", + "colorScale": "sqrt", + "colorScheme": "interpolateRdYlGn", + "exponent": 0.5, + "max": 90, + "min": 50, + "mode": "spectrum" + }, + "dataFormat": "tsbuckets", + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 13, + "w": 6, + "x": 6, + "y": 0 + }, + "heatmap": {}, + "hideZeroBuckets": false, + "highlightCards": true, + "id": 2, + "interval": "1m", + "legend": { + "show": true + }, + "options": {}, + "reverseYBuckets": false, + "targets": [ + { + "expr": "avg by (instance) (node_hwmon_temp_celsius{chip=\"platform_coretemp_0\"}) * on(instance) group_left(nodename) (node_uname_info)", + "format": "time_series", + "instant": false, + "intervalFactor": 1, + "legendFormat": "{{nodename}}", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Coretemp (℃)", + "tooltip": { + "show": true, + "showHistogram": false + }, + "tooltipDecimals": 1, + "type": "heatmap", + "xAxis": { + "show": true + }, + "xBucketNumber": null, + "xBucketSize": null, + "yAxis": { + "decimals": null, + "format": "none", + "logBase": 1, + "max": null, + "min": null, + "show": true, + "splitFactor": null + }, + "yBucketBound": "middle", + "yBucketNumber": null, + "yBucketSize": null + }, + { + "cards": { + "cardPadding": null, + "cardRound": null + }, + "color": { + "cardColor": "#b4ff00", + "colorScale": "sqrt", + "colorScheme": "interpolateRdYlGn", + "exponent": 0.5, + "max": 12, + "min": 0, + "mode": "spectrum" + }, + "dataFormat": "tsbuckets", + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 13, + "w": 6, + "x": 12, + "y": 0 + }, + "heatmap": {}, + "hideZeroBuckets": false, + "highlightCards": true, + "id": 5, + "interval": "1m", + "legend": { + "show": true + }, + "options": {}, + "reverseYBuckets": false, + "targets": [ + { + "expr": "rate(node_disk_written_bytes_total[1m]) / 1024 / 60 * on(instance) group_left(nodename) (node_uname_info)", + "instant": false, + "legendFormat": "{{nodename}}", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Disk Write (KB/s)", + "tooltip": { + "show": true, + "showHistogram": false + }, + "tooltipDecimals": 1, + "type": "heatmap", + "xAxis": { + "show": true + }, + "xBucketNumber": null, + "xBucketSize": null, + "yAxis": { + "decimals": null, + "format": "none", + "logBase": 1, + "max": null, + "min": null, + "show": true, + "splitFactor": null + }, + "yBucketBound": "middle", + "yBucketNumber": null, + "yBucketSize": null + }, + { + "cards": { + "cardPadding": null, + "cardRound": null + }, + "color": { + "cardColor": "#b4ff00", + "colorScale": "sqrt", + "colorScheme": "interpolateRdYlGn", + "exponent": 0.5, + "max": 0, + "min": -75, + "mode": "spectrum" + }, + "dataFormat": "tsbuckets", + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 13, + "w": 6, + "x": 18, + "y": 0 + }, + "heatmap": {}, + "hideZeroBuckets": false, + "highlightCards": true, + "id": 6, + "interval": "1m", + "legend": { + "show": true + }, + "options": {}, + "reverseYBuckets": false, + "targets": [ + { + "expr": "-node_filesystem_avail_bytes{mountpoint=\"/\"} / 1024 / 1024 / 1024 * on(instance) group_left(nodename) (node_uname_info)", + "format": "time_series", + "instant": false, + "legendFormat": "{{nodename}}", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Disk Available (GB)", + "tooltip": { + "show": true, + "showHistogram": false + }, + "tooltipDecimals": 1, + "type": "heatmap", + "xAxis": { + "show": true + }, + "xBucketNumber": null, + "xBucketSize": null, + "yAxis": { + "decimals": null, + "format": "none", + "logBase": 1, + "max": null, + "min": null, + "show": true, + "splitFactor": null + }, + "yBucketBound": "middle", + "yBucketNumber": null, + "yBucketSize": null + }, + { + "cards": { + "cardPadding": null, + "cardRound": null + }, + "color": { + "cardColor": "#5794F2", + "colorScale": "linear", + "colorScheme": "interpolateGreens", + "exponent": 0.5, + "max": 0, + "min": -100, + "mode": "opacity" + }, + "dataFormat": "tsbuckets", + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 13, + "w": 6, + "x": 0, + "y": 13 + }, + "heatmap": {}, + "hideZeroBuckets": false, + "highlightCards": true, + "id": 7, + "interval": "1m", + "legend": { + "show": true + }, + "options": {}, + "reverseYBuckets": false, + "targets": [ + { + "expr": "node_wifi_station_signal_dbm * on(instance) group_left(nodename) (node_uname_info)", + "format": "time_series", + "instant": false, + "intervalFactor": 1, + "legendFormat": "{{nodename}}", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "WiFi RSSI (dBm)", + "tooltip": { + "show": true, + "showHistogram": false + }, + "type": "heatmap", + "xAxis": { + "show": true + }, + "xBucketNumber": null, + "xBucketSize": null, + "yAxis": { + "decimals": null, + "format": "none", + "logBase": 1, + "max": null, + "min": null, + "show": true, + "splitFactor": null + }, + "yBucketBound": "middle", + "yBucketNumber": null, + "yBucketSize": null + }, + { + "cards": { + "cardPadding": null, + "cardRound": null + }, + "color": { + "cardColor": "#b4ff00", + "colorScale": "sqrt", + "colorScheme": "interpolateRdYlGn", + "exponent": 0.5, + "max": 9, + "min": 0, + "mode": "spectrum" + }, + "dataFormat": "tsbuckets", + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 13, + "w": 6, + "x": 6, + "y": 13 + }, + "heatmap": {}, + "hideZeroBuckets": false, + "highlightCards": true, + "id": 8, + "interval": "1m", + "legend": { + "show": true + }, + "options": {}, + "reverseYBuckets": false, + "targets": [ + { + "expr": "node_load1 * on(instance) group_left(nodename) (node_uname_info)", + "format": "time_series", + "instant": false, + "intervalFactor": 1, + "legendFormat": "{{nodename}}", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Load", + "tooltip": { + "show": true, + "showHistogram": false + }, + "tooltipDecimals": 1, + "type": "heatmap", + "xAxis": { + "show": true + }, + "xBucketNumber": null, + "xBucketSize": null, + "yAxis": { + "decimals": null, + "format": "none", + "logBase": 1, + "max": null, + "min": null, + "show": true, + "splitFactor": null + }, + "yBucketBound": "middle", + "yBucketNumber": null, + "yBucketSize": null + }, + { + "columns": [], + "datasource": "${DS_PROMETHEUS}", + "fontSize": "100%", + "gridPos": { + "h": 13, + "w": 6, + "x": 12, + "y": 13 + }, + "id": 11, + "interval": "1m", + "options": {}, + "pageSize": null, + "showHeader": true, + "sort": { + "col": null, + "desc": false + }, + "styles": [ + { + "alias": "", + "align": "auto", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Time", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "", + "align": "auto", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Value", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "IP", + "align": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 2, + "pattern": "instance", + "preserveFormat": false, + "sanitize": true, + "thresholds": [], + "type": "string", + "unit": "short", + "valueMaps": [ + { + "text": "", + "value": ":9100" + } + ] + }, + { + "alias": "", + "align": "auto", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "job", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "Name", + "align": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "mappingType": 1, + "pattern": "nodename", + "sanitize": true, + "thresholds": [], + "type": "string", + "unit": "short" + }, + { + "alias": "Room Type", + "align": "auto", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "type", + "sanitize": true, + "thresholds": [], + "type": "string", + "unit": "short" + }, + { + "alias": "Room Name", + "align": "auto", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "id", + "sanitize": true, + "thresholds": [], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "room * on(instance) group_left(nodename) (node_uname_info)", + "format": "table", + "instant": true, + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Hosts", + "transform": "table", + "type": "table" + }, + { + "cards": { + "cardPadding": null, + "cardRound": null + }, + "color": { + "cardColor": "#b4ff00", + "colorScale": "sqrt", + "colorScheme": "interpolateRdYlGn", + "exponent": 0.5, + "max": 0, + "min": -2, + "mode": "spectrum" + }, + "dataFormat": "tsbuckets", + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 13, + "w": 6, + "x": 18, + "y": 13 + }, + "heatmap": {}, + "hideZeroBuckets": false, + "highlightCards": true, + "id": 9, + "interval": "1m", + "legend": { + "show": true + }, + "options": {}, + "reverseYBuckets": false, + "targets": [ + { + "expr": "-node_memory_MemFree_bytes / 1024 / 1024 / 1024 * on(instance) group_left(nodename) (node_uname_info)", + "format": "time_series", + "instant": false, + "legendFormat": "{{nodename}}", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Free (GB)", + "tooltip": { + "show": true, + "showHistogram": false + }, + "tooltipDecimals": 3, + "type": "heatmap", + "xAxis": { + "show": true + }, + "xBucketNumber": null, + "xBucketSize": null, + "yAxis": { + "decimals": null, + "format": "none", + "logBase": 1, + "max": null, + "min": null, + "show": true, + "splitFactor": null + }, + "yBucketBound": "middle", + "yBucketNumber": null, + "yBucketSize": null + } + ], + "refresh": "30s", + "schemaVersion": 22, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "datasource": null, + "filters": [], + "hide": 0, + "label": "", + "name": "Filters", + "skipUrlSync": false, + "type": "adhoc" + } + ] + }, + "time": { + "from": "now-15m", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Overview", + "uid": "xCFQeAXWk", + "version": 17 +}