4

The Node-RED documentation is clear - set metrics to true to track flow execution and memory usage information. So, I stopped Node-RED with pm2, edited the settings.js file and started Node-RED. But, no metric output is seen in the .pm2/logs/red-out-1.log! The debug nodes in various flows in my application have been configured to output to console and they come correctly.

How to view the metrics?

3
  • Which settings file did you edit? Make sure it's the one in your userdir (pointed to in the first few lines of the Node-RED output at startup
    – hardillb
    Jul 21 '18 at 10:17
  • Also what version of Node-RED are you running?
    – hardillb
    Jul 21 '18 at 10:17
  • node_modules/node-red/settings.js and version is node-red@0.18.7 from package.json. Jul 21 '18 at 12:14
2

You have edited the wrong settings.js file. The version in the node_modules/node-red directory is the template that gets copied to the User directory when Node-RED is started for the very first time.

When Node-RED starts it logs the settings file it is using as follows:

21 Jul 13:31:49 - [warn] ------------------------------------------------------
21 Jul 13:31:49 - [info] Settings file  : /home/hardillb/.node-red/settings.js
21 Jul 13:31:49 - [info] User directory : /home/hardillb/.node-red
21 Jul 13:31:49 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable
21 Jul 13:31:49 - [info] Flows file     : /home/hardillb/.node-red/flows_tiefighter.json
21 Jul 13:31:49 - [info] Server now running at http://127.0.0.1:1880/
1
  • Yes, I had edited the wrong one; it works now. Thanks! Jul 21 '18 at 12:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.