Skip to main content

Node-RED

To integrate with Node-RED, install a Node-RED connector for Moogsoft Enterprise and configure a flow to use the connector as an output. After you complete the integration, Node-RED uses the flow to forward data to the Node-RED integration.

See the Node-RED documentation for details on Node-RED components.

Before You Begin

The Node-RED integration has been validated with Node-RED v. 016 and v. 017. Before you start to set up your integration, ensure you have met the following requirements:

  • You have the URL for your Node-RED system.

Configure the Node-RED Integration

Configure the Node-RED integration in Moogsoft Enterprise as follows:

  1. Navigate to the Integrations tab.

  2. Click Node-RED in the Monitoring section.

  3. Provide a unique integration name. You can use the default name or customize the name according to your needs.

  4. Set a Basic Authentication username and password.

Configure Node-RED

To configure Node-RED to send event data to Moogsoft Enterprise, you must install the Moogsoft Enterprise (moog) node for Node-RED. Then use the moog node to send data from your flow to the Node-RED integration.

  1. Use the node package manager to install the Moogsoft Enterprise node from the command line:

    npm install -g node-red-contrib-moog
  2. Build a flow that uses the the moognode as an output. For example:

    Node

    Configuration

    inject

    Payload

    {}

    JSON

    {"description":"Node-red Heartbeat","source":"myHost","agent_location":"Node-RED","severity":"0"}

    Topic

    Heartbeat

    Repeat

    15 second interval

    Inject once at start

    selected

    json

    default

    moog

    URL

    <your Node.js integration URL>

    For example: https://example.Moogsoft.com/events/nodered_nodered1

    User ID

    Username generated in the Moogsoft Enterprise UI

    Password

    Password generated in the Moogsoft Enterprise UI

When you deploy the flow, the moog node shows that it has 'connected'. You can see the 'heartbeat' alert in the alerts list in Moogsoft Enterprise. For additional examples, see Configure the Node-RED LAM.