Title Log Proxmox data to influxDB
Summary -
A very simple flow to log CPU utilization, Memory usage and disk usage for a proxmox server
Flow
[
{
"id": "c91fde37.9e188",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": ""
},
{
"id": "2b9b14aa.15da2c",
"type": "group",
"z": "c91fde37.9e188",
"name": "Log Proxmox",
"style": {
"fill": "#bfdbef",
"label": true,
"color": "#0070c0"
},
"nodes": [
"d8ac4a74.7936f8",
"78d57918.4be748",
"5169f3e2.cfb74c",
"9457217c.43276"
],
"x": 34,
"y": 139,
"w": 852,
"h": 82
},
{
"id": "d8ac4a74.7936f8",
"type": "proxmox-api",
"z": "c91fde37.9e188",
"g": "2b9b14aa.15da2c",
"name": "",
"path": "/nodes",
"method": "GET",
"payload": "",
"server": "7baaadb4.455784",
"x": 410,
"y": 180,
"wires": [
[
"78d57918.4be748"
]
]
},
{
"id": "78d57918.4be748",
"type": "function",
"z": "c91fde37.9e188",
"g": "2b9b14aa.15da2c",
"name": "prep data",
"func": "msg.payload = [\n {\n measurement: "CPU",\n fields: {\n value:msg.payload[0].cpu \n },\n tags:{\n unit:"%",\n host:msg.payload[0].node\n },\n },\n {\n measurement: "Memory",\n fields: {\n value:msg.payload[0].mem / 1000000000\n },\n tags:{\n unit:"Gb",\n host:msg.payload[0].node\n },\n },\n {\n measurement: "Disk",\n fields: {\n value:msg.payload[0].disk / 1000000000\n },\n tags:{\n unit:"Gb",\n host:msg.payload[0].node\n },\n }\n];\nreturn msg;\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 600,
"y": 180,
"wires": [
[
"5169f3e2.cfb74c"
]
]
},
{
"id": "5169f3e2.cfb74c",
"type": "influxdb batch",
"z": "c91fde37.9e188",
"g": "2b9b14aa.15da2c",
"influxdb": "4bcce287.69402c",
"precision": "",
"retentionPolicy": "",
"name": "Load influx",
"x": 790,
"y": 180,
"wires": []
},
{
"id": "9457217c.43276",
"type": "cronplus",
"z": "c91fde37.9e188",
"g": "2b9b14aa.15da2c",
"name": "Every MInute",
"outputField": "payload",
"timeZone": "America/New_York",
"persistDynamic": false,
"commandResponseMsgOutput": "output1",
"outputs": 1,
"options": [
{
"name": "schedule1",
"topic": "schedule1",
"payloadType": "str",
"payload": "start",
"expressionType": "cron",
"expression": "0 * * * * *",
"location": "",
"offset": "0",
"solarType": "all",
"solarEvents": "sunrise,sunset"
}
],
"x": 150,
"y": 180,
"wires": [
[
"d8ac4a74.7936f8"
]
]
},
{
"id": "7baaadb4.455784",
"type": "proxmox-server",
"z": "",
"host": "192.168.1.32",
"port": "8006"
},
{
"id": "4bcce287.69402c",
"type": "influxdb",
"z": "",
"hostname": "192.168.1.183",
"port": "8086",
"protocol": "http",
"database": "hubitat",
"name": "",
"usetls": false,
"tls": ""
}
]