HomeDocumentationAPI Reference
Log In
Documentation

Named Queues

Sandfly has the ability to deploy scanning nodes inside multiple isolated networks and communicate to a central server. This configuration allows you to deploy Sandfly at multiple cloud providers, remote offices, internal networks and other layouts while allowing all nodes to be controlled at a central point.

Setup for named queues must happen in the node configuration files. Each node configuration file can have its own queue name. Nodes will only respond to scan requests that match this name.

For instance, you can have a node inside your AWS cloud network, one at DigitalOcean and one internally. If you give each node a name such as "aws", "digital_ocean" and "internal" then you will be able to add hosts from the Sandfly UI for each of these networks. Sandfly will then direct scans to the appropriate nodes as required without doing anything further.

Adding Custom Named Queues

The default queue name is "main" for all nodes. To change the queue name the node will listen on, edit the file config.node.env under the sandfly-setup/setup/setup_data/ directory.

In that file, uncomment the "SF_NODE_QUEUES" line and change its value to the name of the queue you want to use. The name must be a single word or snake_case.

🚧

CAUTION: Custom queue names must be a single word or snake_case

Use a single word or snake_case for queue names. Do not use spaces or special characters.

Below we have changed the name "main" to "aws".

# Optional settings (uncomment to override defaults)
# SF_NODE_NAME=
SF_NODE_QUEUES=aws
...

Once the change has been made, you must stop all node containers on that host via the shutdown_sandfly.sh script and then start new node containers via the start_node.sh script in order to load the changed configuration. The use of the docker start or restart commands will not re-load the configuration. After that, the new queue name will be available for use. All hosts added to the system using this queue will be handled by this node. Multiple node containers using the same config will all handle messages sent to this queue.

All online queues are shown in the Queue field of host add or edit forms; an example is shown below. Use the drop-down selector to choose the desired queue name when adding or editing hosts.

Adding Hosts with Custom Queue

Adding Hosts with Custom Queue

At this point of the process the base installation section is complete. All that remains to start using Sandfly is to set up a minimal configuration, which is covered on the Quick Start Overview page.