|
| 1 | +--- |
| 2 | +title: Configure Your First Target |
| 3 | +description: Create a File target to store processed data from your DataStream pipeline. |
| 4 | +--- |
| 5 | + |
| 6 | +# Configure Your First Target |
| 7 | + |
| 8 | +## What is a Target? |
| 9 | + |
| 10 | +A Target defines where your processed data goes after **DataStream** transforms it. Common target types include: |
| 11 | + |
| 12 | +- **File** - Saves data to JSON, Avro, Parquet, or MultiJSON file formats |
| 13 | +- **Microsoft Sentinel** - Sends security data to Microsoft's cloud SIEM platform |
| 14 | +- **Azure Blob Storage** - Archives data for long-term retention and compliance |
| 15 | +- **Azure Data Explorer** - Enables real-time analytics and dashboard creation |
| 16 | + |
| 17 | +For this guide, we create a **File Target** because it is simple to verify and understand. |
| 18 | + |
| 19 | +## Create Your File Target |
| 20 | + |
| 21 | +1. **Navigate to Targets** |
| 22 | + - From the sidebar: **Fleet Management** > **Targets** |
| 23 | + - Click the <gui>File</gui> card |
| 24 | + |
| 25 | +2. **Start Target Creation** |
| 26 | + - Click <gui>Add new File target</gui> |
| 27 | + - The target creation form opens with three tabs |
| 28 | + |
| 29 | +3. **Configure General Settings** (First Tab) |
| 30 | + - **Name**: "My First File Target" |
| 31 | + - **Description (Optional)**: "Learning file output for getting started" |
| 32 | + - **Target Status**: Ensure toggle is set to **Enabled** |
| 33 | + - **Post-processing pipeline (Optional)**: Leave blank for now |
| 34 | + - Click <gui>Next Step</gui> |
| 35 | + |
| 36 | +4. **Configure File Properties** (Second Tab) |
| 37 | + - **Location**: Enter a directory path where you want files saved: |
| 38 | + - **Linux/macOS**: `/opt/datastream/output` or `/home/username/datastream` |
| 39 | + - **Windows**: `C:\DataStream\Output` or `D:\Logs\DataStream` |
| 40 | + |
| 41 | + :::note |
| 42 | + This path refers to a directory on your **Director host**, not your local machine. Verify the directory exists on the server where your Director is installed. |
| 43 | + ::: |
| 44 | + - **File name**: `logs-{{.Year}}_{{.Month}}_{{.Day}}.json` |
| 45 | + - **Type**: JSON (default) |
| 46 | + - **Field Format (Optional)**: Leave as default |
| 47 | + - Leave other fields at their defaults |
| 48 | + - Click <gui>Next Step</gui> |
| 49 | + |
| 50 | +:::caution |
| 51 | +Ensure the directory you specify in **Location** exists and **DataStream** has write permissions. Create the directory beforehand if it doesn't exist. |
| 52 | +::: |
| 53 | + |
| 54 | +5. **Skip Execution Settings** (Third Tab) |
| 55 | + - Leave all defaults (scheduling and debugging settings) |
| 56 | + - Click <gui>Add target</gui> |
| 57 | + |
| 58 | +## Understanding File Naming |
| 59 | + |
| 60 | +The file name template `logs-{{.Year}}_{{.Month}}_{{.Day}}.json` uses dynamic fields: |
| 61 | + |
| 62 | +- `{{.Year}}` - Current year (e.g., 2026) |
| 63 | +- `{{.Month}}` - Current month (e.g., 01, 02, 12) |
| 64 | +- `{{.Day}}` - Current day (e.g., 01, 15, 31) |
| 65 | + |
| 66 | +This pattern automatically rotates files daily, making them easier to manage and archive. |
| 67 | + |
| 68 | +## Verify Your Target |
| 69 | + |
| 70 | +Your target should now appear in the File targets table with: |
| 71 | + |
| 72 | +- **Status**: Enabled |
| 73 | +- **Location**: Your specified directory path |
| 74 | +- **Type**: JSON |
| 75 | + |
| 76 | +## File Format Options |
| 77 | + |
| 78 | +The File target supports four output formats: |
| 79 | + |
| 80 | +- **JSON** (default) - One record per file, widely supported |
| 81 | +- **MultiJSON** - Multiple records per file, efficient for high-volume data |
| 82 | +- **Avro** - Binary format with embedded schema, supports compression |
| 83 | +- **Parquet** - Columnar format, optimized for analytics and compression |
| 84 | + |
| 85 | +:::note |
| 86 | +Compression options (zstd, snappy, gzip) are available only for Avro and Parquet formats. |
| 87 | +::: |
| 88 | + |
| 89 | +For detailed configuration of all target types, see <Topic id="targets-overview">Target Configuration Guide</Topic>. |
| 90 | + |
| 91 | +## What's Next? |
| 92 | + |
| 93 | +Your target is ready to receive processed data. Now we need to install processing logic that will transform your raw data into a useful format. |
| 94 | + |
| 95 | +**Next:** <Topic id="getting-started-install-content-from-content-hub">Install Content from Content Hub</Topic> to add pre-built data processing pipelines. |
0 commit comments