node-red-contrib-self-healing
Version:
SHEN: Self-healing extensions for Node-RED.
258 lines (257 loc) • 4.94 kB
JSON
[
{
"id": "72a91e64.b28e7",
"type": "tab",
"label": "Resource Monitor",
"disabled": false,
"info": ""
},
{
"id": "5fdb4fdb.36906",
"type": "inject",
"z": "72a91e64.b28e7",
"name": "Input",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": "1",
"topic": "",
"payload": "",
"payloadType": "date",
"x": 210,
"y": 320,
"wires": [
["5e4844e7.15bf9c", "9ede9b39.57faa8", "b8f8b05f.e7ba8", "dd270df6.25444"]
]
},
{
"id": "5e4844e7.15bf9c",
"type": "change",
"z": "72a91e64.b28e7",
"name": "Storage",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "{\"storage\": 40}",
"tot": "json"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 520,
"y": 360,
"wires": [["f5238de9.6be88"]]
},
{
"id": "f5238de9.6be88",
"type": "join",
"z": "72a91e64.b28e7",
"name": "",
"mode": "custom",
"build": "merged",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": false,
"timeout": "",
"count": "4",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "",
"reduceFixup": "",
"x": 850,
"y": 320,
"wires": [["6d6f079f.ae5778"]]
},
{
"id": "3a824924.9928f6",
"type": "debug",
"z": "72a91e64.b28e7",
"name": "Out of bounds",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1340,
"y": 240,
"wires": []
},
{
"id": "9860fcaf.ea5e7",
"type": "debug",
"z": "72a91e64.b28e7",
"name": "CPU too high",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1330,
"y": 280,
"wires": []
},
{
"id": "6d6f079f.ae5778",
"type": "resource-monitor",
"z": "72a91e64.b28e7",
"name": "",
"resourcesMask": 15,
"maxCPU": "100",
"maxRAM": "100",
"maxStorage": "100",
"minBattery": "0",
"x": 1070,
"y": 320,
"wires": [
["3a824924.9928f6"],
["9860fcaf.ea5e7"],
["a50236a0.766bd8"],
["b53cf87.71e1708"],
["9f63950.4538468"]
]
},
{
"id": "a50236a0.766bd8",
"type": "debug",
"z": "72a91e64.b28e7",
"name": "RAM too high",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1340,
"y": 320,
"wires": []
},
{
"id": "b53cf87.71e1708",
"type": "debug",
"z": "72a91e64.b28e7",
"name": "Storage too high",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1340,
"y": 360,
"wires": []
},
{
"id": "9f63950.4538468",
"type": "debug",
"z": "72a91e64.b28e7",
"name": "Battery too low",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1340,
"y": 400,
"wires": []
},
{
"id": "9ede9b39.57faa8",
"type": "change",
"z": "72a91e64.b28e7",
"name": "CPU",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "{\"CPU\": 30}",
"tot": "json"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 510,
"y": 300,
"wires": [["f5238de9.6be88"]]
},
{
"id": "b8f8b05f.e7ba8",
"type": "change",
"z": "72a91e64.b28e7",
"name": "Battery",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "{\"battery\": 70}",
"tot": "json"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 520,
"y": 420,
"wires": [["f5238de9.6be88"]]
},
{
"id": "dd270df6.25444",
"type": "change",
"z": "72a91e64.b28e7",
"name": "RAM",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "{\"RAM\": 50}",
"tot": "json"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 510,
"y": 240,
"wires": [["f5238de9.6be88"]]
}
]