Raspberry System Monitoring 2.0

Dashboard 2.0 - This flow show in a dashboard CPU, Memory loaded, Disk Usage and CPU Temperature. Also there are two buttons to Reboot and Shutdown the system. Is necessary install dashboard 2.0.

[{"id":"9cf3a6d.1104258","type":"tab","label":"Raspberry monitoring","disabled":false,"info":""},{"id":"c0682e5c.a4fc","type":"exec","z":"9cf3a6d.1104258","command":"vcgencmd measure_temp","addpay":false,"append":"","useSpawn":"","timer":"","winHide":false,"name":"RPi Temp.","x":325.2221908569336,"y":46.33333683013916,"wires":[["95ae4c48.9f606"],[],[]]},{"id":"2be04c82.d0af74","type":"inject","z":"9cf3a6d.1104258","name":"","props":[{"p":"payload","v":"","vt":"date"},{"p":"topic","v":"","vt":"str"}],"repeat":"3","crontab":"","once":true,"onceDelay":"","topic":"","payload":"","payloadType":"date","x":130,"y":120,"wires":[["c0682e5c.a4fc","92285ea6.f97a7","c0ffe68.afd6e18"]]},{"id":"95ae4c48.9f606","type":"function","z":"9cf3a6d.1104258","name":"","func":"str = msg.payload\nmsg.payload = str.substring(5,9);\nreturn msg;","outputs":1,"noerr":0,"x":480,"y":40,"wires":[["a505fc8a19b93624","7b6839148eda4109"]]},{"id":"cf3854e6.653878","type":"exec","z":"9cf3a6d.1104258","command":"sudo reboot","addpay":false,"append":"","useSpawn":"","timer":"","name":"Reboot","x":322.00007247924805,"y":371.7778015136719,"wires":[[],[],[]]},{"id":"4de9dba1.ed7854","type":"exec","z":"9cf3a6d.1104258","command":"sudo shutdown -h now","addpay":false,"append":"","useSpawn":"","timer":"","name":"Shutdown","x":331.2778129577637,"y":428.4722480773926,"wires":[[],[],[]]},{"id":"92285ea6.f97a7","type":"exec","z":"9cf3a6d.1104258","command":"top -d 0.5 -b -n2 | grep \"Cpu(s)\"|tail -n 1 | awk '{print $2 + $4}'","addpay":false,"append":"","useSpawn":"","timer":"","winHide":false,"name":"CPU Load","x":325.2221908569336,"y":126.33333683013916,"wires":[["e5a45f75f8e124c4","c153cec7bb35963e"],[],[]]},{"id":"c0ffe68.afd6e18","type":"exec","z":"9cf3a6d.1104258","command":"free | awk 'NR==2 {printf \"%.2f\\n\", ($7 / $2) * 100}'","addpay":false,"append":"","useSpawn":"","timer":"","winHide":false,"name":"Free Memory","x":330,"y":220,"wires":[["1c4bf23eae21c066"],[],[]]},{"id":"a508a5b7.89a128","type":"exec","z":"9cf3a6d.1104258","command":"df -h","addpay":false,"append":"","useSpawn":"","timer":"","winHide":false,"name":"Disk Usage","x":330,"y":300,"wires":[["a8dc2f34.5e32b"],[],[]]},{"id":"a8dc2f34.5e32b","type":"function","z":"9cf3a6d.1104258","name":"","func":"var re = /([0-9]{2})%/\nvar idx = msg.payload.search(re);\nvar str = msg.payload;\nif (idx >=0) {\n    str = msg.payload.substring(idx, idx + 2);\n}\nmsg.payload = str;\nreturn msg;","outputs":1,"noerr":0,"x":480,"y":300,"wires":[["eb7b42dda653de39"]]},{"id":"5e6e69bb.0e1d38","type":"inject","z":"9cf3a6d.1104258","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":true,"onceDelay":"","topic":"","payload":"","payloadType":"date","x":130,"y":300,"wires":[["a508a5b7.89a128"]]},{"id":"19fadb42.3d0c25","type":"inject","z":"9cf3a6d.1104258","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"10","crontab":"","once":true,"onceDelay":"","topic":"","payload":"","payloadType":"date","x":126.01936721801758,"y":487.3448371887207,"wires":[["9cce8e0f.766f7"]]},{"id":"9cce8e0f.766f7","type":"exec","z":"9cf3a6d.1104258","command":"hostname","addpay":false,"append":"-I","useSpawn":"","timer":"","name":"Get Local IP","x":330.5749206542969,"y":487.84485054016113,"wires":[["14dc5484021b6c97","ba9022bb0e12ed0f"],[],[]]},{"id":"05d9d23024bb2147","type":"ui-button","z":"9cf3a6d.1104258","group":"62d10323f01e9fba","name":"","label":"Reboot","order":1,"width":0,"height":0,"emulateClick":false,"tooltip":"","color":"","bgcolor":"","className":"","icon":"","iconPosition":"left","payload":"","payloadType":"str","topic":"topic","topicType":"msg","buttonColor":"","textColor":"","iconColor":"","enableClick":true,"enablePointerdown":false,"pointerdownPayload":"","pointerdownPayloadType":"str","enablePointerup":false,"pointerupPayload":"","pointerupPayloadType":"str","x":140,"y":360,"wires":[["cf3854e6.653878"]]},{"id":"c7a4eabc3d31b55a","type":"ui-button","z":"9cf3a6d.1104258","group":"62d10323f01e9fba","name":"","label":"Shutdown","order":2,"width":0,"height":0,"emulateClick":false,"tooltip":"","color":"","bgcolor":"","className":"","icon":"","iconPosition":"left","payload":"","payloadType":"str","topic":"topic","topicType":"msg","buttonColor":"red","textColor":"","iconColor":"","enableClick":true,"enablePointerdown":false,"pointerdownPayload":"","pointerdownPayloadType":"str","enablePointerup":false,"pointerupPayload":"","pointerupPayloadType":"str","x":140,"y":420,"wires":[["4de9dba1.ed7854"]]},{"id":"a505fc8a19b93624","type":"ui-gauge","z":"9cf3a6d.1104258","name":"Temperature","group":"02cd80a20be9c699","order":1,"width":3,"height":3,"gtype":"gauge-half","gstyle":"needle","title":"Temperature","units":"°C","icon":"temp","prefix":"","suffix":"","segments":[{"from":"0","color":"#5cd65c"},{"from":"55","color":"#ffc800"},{"from":"70","color":"#ea5353"}],"min":0,"max":"85","sizeThickness":16,"sizeGap":4,"sizeKeyThickness":8,"styleRounded":true,"styleGlow":false,"className":"","x":750,"y":40,"wires":[]},{"id":"7b6839148eda4109","type":"ui-chart","z":"9cf3a6d.1104258","group":"02cd80a20be9c699","name":"CPU Temperature","label":"CPU Temperature","order":5,"chartType":"line","category":"topic","categoryType":"msg","xAxisLabel":"","xAxisProperty":"","xAxisPropertyType":"timestamp","xAxisType":"time","xAxisFormat":"","xAxisFormatType":"auto","xmin":"","xmax":"","yAxisLabel":"","yAxisProperty":"payload","yAxisPropertyType":"msg","ymin":"","ymax":"","bins":10,"action":"append","stackSeries":false,"pointShape":"circle","pointRadius":"1","showLegend":true,"removeOlder":1,"removeOlderUnit":"3600","removeOlderPoints":"","colors":["#0095ff","#ff0000","#ff7f0e","#2ca02c","#a347e1","#d62728","#ff9896","#9467bd","#c5b0d5"],"textColor":["#666666"],"textColorDefault":true,"gridColor":["#e5e5e5"],"gridColorDefault":true,"width":"3","height":"6","className":"","interpolation":"linear","x":770,"y":80,"wires":[[]]},{"id":"e5a45f75f8e124c4","type":"ui-chart","z":"9cf3a6d.1104258","group":"02cd80a20be9c699","name":"CPU Load %","label":"CPU Load %","order":6,"chartType":"line","category":"topic","categoryType":"msg","xAxisLabel":"","xAxisProperty":"","xAxisPropertyType":"timestamp","xAxisType":"time","xAxisFormat":"","xAxisFormatType":"auto","xmin":"","xmax":"","yAxisLabel":"","yAxisProperty":"payload","yAxisPropertyType":"msg","ymin":"0","ymax":"100","bins":10,"action":"append","stackSeries":false,"pointShape":"circle","pointRadius":"1","showLegend":true,"removeOlder":1,"removeOlderUnit":"3600","removeOlderPoints":"","colors":["#0095ff","#ff0000","#ff7f0e","#2ca02c","#a347e1","#d62728","#ff9896","#9467bd","#c5b0d5"],"textColor":["#666666"],"textColorDefault":true,"gridColor":["#e5e5e5"],"gridColorDefault":true,"width":"3","height":"6","className":"","interpolation":"linear","x":750,"y":160,"wires":[[]]},{"id":"c153cec7bb35963e","type":"ui-gauge","z":"9cf3a6d.1104258","name":"CPU Load","group":"02cd80a20be9c699","order":2,"width":3,"height":3,"gtype":"gauge-half","gstyle":"needle","title":"CPU Load","units":"CPU %","icon":"","prefix":"","suffix":"","segments":[{"from":"0","color":"#5cd65c"},{"from":"50","color":"#ffc800"},{"from":"80","color":"#ea5353"}],"min":"0","max":"100","sizeThickness":16,"sizeGap":4,"sizeKeyThickness":8,"styleRounded":true,"styleGlow":false,"className":"","x":750,"y":120,"wires":[]},{"id":"1c4bf23eae21c066","type":"ui-gauge","z":"9cf3a6d.1104258","name":"Free Memory","group":"02cd80a20be9c699","order":3,"width":3,"height":3,"gtype":"gauge-half","gstyle":"needle","title":"Free Memory","units":"%","icon":"","prefix":"","suffix":"","segments":[{"from":"0","color":"#ea5353"},{"from":"30","color":"#ffc800"},{"from":"50","color":"#5cd65c"}],"min":0,"max":"100","sizeThickness":16,"sizeGap":4,"sizeKeyThickness":8,"styleRounded":true,"styleGlow":false,"className":"","x":760,"y":220,"wires":[]},{"id":"eb7b42dda653de39","type":"ui-gauge","z":"9cf3a6d.1104258","name":"Disk Space","group":"02cd80a20be9c699","order":4,"width":3,"height":3,"gtype":"gauge-half","gstyle":"needle","title":"Disk Space","units":"%","icon":"","prefix":"","suffix":"","segments":[{"from":"0","color":"#5cd65c"},{"from":"50","color":"#ffc800"},{"from":"75","color":"#ea5353"}],"min":0,"max":"100","sizeThickness":16,"sizeGap":4,"sizeKeyThickness":8,"styleRounded":true,"styleGlow":false,"className":"","x":750,"y":300,"wires":[]},{"id":"14dc5484021b6c97","type":"ui-text","z":"9cf3a6d.1104258","group":"62d10323f01e9fba","order":3,"width":0,"height":0,"name":"Local IP","label":"Local IP Address:","format":"{{msg.payload}}","layout":"col-center","style":false,"font":"","fontSize":16,"color":"#717171","wrapText":false,"className":"","x":740,"y":500,"wires":[]},{"id":"ba9022bb0e12ed0f","type":"mqtt out","z":"9cf3a6d.1104258","name":"Send IP via MQTT","topic":"","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"14bc5267.4d798e","x":770,"y":460,"wires":[]},{"id":"62d10323f01e9fba","type":"ui-group","name":"OS","page":"fb123e09434f4a76","width":"3","height":"1","order":2,"showTitle":true,"className":"","visible":"true","disabled":"false","groupType":"default"},{"id":"02cd80a20be9c699","type":"ui-group","name":"System","page":"fb123e09434f4a76","width":"6","height":"1","order":1,"showTitle":true,"className":"","visible":"true","disabled":"false","groupType":"default"},{"id":"14bc5267.4d798e","type":"mqtt-broker","name":"","broker":"test.mosquitto.org","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"autoUnsubscribe":true,"birthTopic":"raspberry_do_gama_alive","birthQos":"0","birthRetain":"true","birthPayload":"Raspberry ativo","birthMsg":{},"closeTopic":"","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""},{"id":"fb123e09434f4a76","type":"ui-page","name":"Pi Monitor","ui":"67bf5c2831ac7872","path":"/pi_monitor","icon":"home","layout":"grid","theme":"613cd265178118d2","breakpoints":[{"name":"Default","px":"0","cols":"3"},{"name":"Tablet","px":"576","cols":"6"},{"name":"Small Desktop","px":"768","cols":"9"},{"name":"Desktop","px":"1024","cols":"12"}],"order":1,"className":"","visible":"true","disabled":"false"},{"id":"67bf5c2831ac7872","type":"ui-base","name":"My Dashboard","path":"/dashboard","appIcon":"","includeClientData":true,"acceptsClientConfig":["ui-notification","ui-control"],"showPathInSidebar":false,"showPageTitle":true,"navigationStyle":"default","titleBarStyle":"default","showReconnectNotification":true,"notificationDisplayTime":1,"showDisconnectNotification":true},{"id":"613cd265178118d2","type":"ui-theme","name":"Default Theme","colors":{"surface":"#ffffff","primary":"#0094CE","bgPage":"#eeeeee","groupBg":"#ffffff","groupOutline":"#cccccc"},"sizes":{"density":"default","pagePadding":"12px","groupGap":"12px","groupBorderRadius":"4px","widgetGap":"12px"}}]

Flow Info

Created 5 months, 2 weeks ago
Rating: not yet rated

Owner

Actions

Rate:

Node Types

Core
  • exec (x7)
  • function (x2)
  • inject (x3)
  • mqtt out (x1)
  • mqtt-broker (x1)
Other

Tags

  • Monitor
  • Raspberry
  • Pi
  • System
  • 2.0
  • dashboard
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option