Run the following command in the root directory of your Node-RED install:
npm install node-red-contrib-collectd
LoadPlugin unixsock <Plugin unixsock> SocketFile "/var/run/collectd-unixsock" SocketPerms "0666" DeleteSocket true </Plugin>
SocketPerms value ensures that any account on the system has write permissions to the socket file, but you can use
SocketGroup to restrict permissions to a specific group. Just be sure the account running Node-RED has permissions to write to the socket file!
This node can be connected to the output of any node, and will publish
msg.payload to a Collectd instance running on the local machine. It will use
msg.timestamp if set, otherwise the value
N will be sent to Collectd, which is interpreted as "now".
The button to the right of the node will toggle console logging of Collectd requests/replies on and off.