Skip to main content

TFTP

Pull

Synopsis

Creates a server that accepts file uploads using the TFTP protocol. Supports IP-based device mapping, multiple workers, and automatic file content processing.

Schema

- id: <numeric>
name: <string>
description: <string>
type: tftp
tags: <string[]>
pipelines: <pipeline[]>
status: <boolean>
properties:
address: <string>
port: <numeric>
reuse: <boolean>
workers: <numeric>
buffer_size: <numeric>
stats_frequency: <numeric>

Configuration

The following are the minimum requirements to define the device.

Device

FieldRequiredDefaultDescription
idYUnique identifier
nameYDevice name
descriptionN-Optional description
typeYMust be tftp
tagsN-Optional tags
pipelinesN-Optional pre-processor pipelines
statusNtrueEnable/disable the device

Server

FieldRequiredDefaultDescription
addressN"0.0.0.0"Listen address
portYListen port (typically 69)

Performance

FieldRequiredDefaultDescription
reuseNfalseEnable multi-worker mode
workersN4Number of worker processes when reuse enabled
buffer_sizeN9000Read buffer size in bytes
stats_frequencyN300Statistics collection interval in seconds
warning

TFTP protocol does not support authentication. Deploy only on trusted networks.

Advanced Features

The following are unique features that Director offers.

IP-Based Device Mapping

The server supports automatic device mapping based on client IP addresses: it maps incoming client IPs to device IDs, and automatically associates uploads with devices. It also supports dynamic device discovery and maintains an IP-to-device mapping cache.

Files

The server processes uploaded files by reading the file contents into memory, recording upload metadata (filename, timestamp, etc.), capturing the client information, and converting the content to consumable format.

Multiple Workers

When reuse is enabled, the server uses multiple workers which maintain their own TFTP listeners and process files independently so that the files are automatically distributed.

note

The worker count will be capped at the number of available CPU cores.

Upload

The device upload operations observe the following procedure:

  • The client initiates a TFTP upload:

  • The server accepts the connection:

  • The client transfers the file:

  • Finally, the server maps the client IP to the device, reads the file contents, applies the pipelines, and saves the processed data to a store.

tip

Configure clients to use binary mode for file transfers to avoid data corruption.

Examples

The following are commonly used configuration types.

Basic

A basic server can be created easily:

Creating a simple TFTP server...

- id: 1
name: basic_tftp
type: tftp
properties:
address: "0.0.0.0"
port: 69

Device Mapping

Devices can be automatically captured:

Configuring IP-based device mapping...

- id: 2
name: mapped_tftp
type: tftp
properties:
address: "0.0.0.0"
port: 69
reuse: false
buffer_size: 16384

Multiple Devices

Uploads from multiple devices can be handled easily:

Configuring server for multiple devices...

- id: 4
name: multi_device_tftp
type: tftp
properties:
address: "0.0.0.0"
port: 69
reuse: true
workers: 2
warning

Ensure all devices are configured to use the same TFTP server port.

High-Volume

Performance can be enhanced for high file upload volumes:

Optimizing for high volumes...

- id: 3
name: performant_tftp
type: tftp
properties:
address: "0.0.0.0"
port: 69
reuse: true
workers: 4
buffer_size: 32768
stats_frequency: 60

Pipelines

File contents can be handled according to requirements:

Applying custom processing to uploaded files...

- id: 5
name: pipeline_tftp
type: tftp
pipelines:
- config_parser
- field_extractor
properties:
address: "0.0.0.0"
port: 69
buffer_size: 16384
note

Pipelines are processed sequentially, and can modify or drop content before ingestion.