HomeDocumentationAPI Reference
Log In
Documentation

Named Queues

You can deploy Sandfly scanning nodes inside multiple isolated networks, and the nodes communicate with 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, or a comma-separated list of queue names. Nodes will only respond to scan requests that match one of their queue names.

For instance, you can have a node inside your Cloud Provider 1 network, one at Cloud Provider 2, and one internally. If you give each node a queue name such as cloud_provider_1, cloud_provider_2, 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 with no further action from you.

Adding Custom Named Queues

The default queue name is main for all nodes. To change the queue name that the node listens 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. To make the node listen on more than one queue, separate the names with commas and do not use spaces (for example, cloud_provider_1,internal). The name must be a single word or snake_case.

Below, we have changed the name main to cloud_provider_1.

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

CAUTION: Use Only Letters, Numbers, and Underscores in Queue Names

Use a single word or snake_case for each queue name, for example internal or cloud_provider. Do not use spaces, hyphens, or other special characters. When you list more than one queue, separate the names with commas only.

After you make the change, stop all node containers on that host with the shutdown_sandfly.sh script, and then start new node containers with the start_node.sh script to load the changed configuration. The docker start and docker restart commands do not reload 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 known queues are shown in the Queue field of the Add new hosts, Update host, and discover schedule forms, with the number of online Nodes for each queue; an example is shown below. Select the desired queue name from the list when adding or editing hosts.

Adding Hosts with Custom Queue

Adding Hosts with Custom Queue

At this point in 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.


Did this page help you?