Skip to content

Commit 9c4fc45

Browse files
Cheruvu.Sahithee.Vaibhav@ibm.comCheruvu.Sahithee.Vaibhav@ibm.com
authored andcommitted
add example
1 parent 17d6042 commit 9c4fc45

1 file changed

Lines changed: 42 additions & 24 deletions

File tree

pipeline/outputs/azure_blob.md

Lines changed: 42 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -63,30 +63,6 @@ Fluent Bit exposes the following configuration properties.
6363
| `upload_timeout` | Optional. Specify a timeout for uploads. Fluent Bit will start ingesting buffer files which have been created more than `x` minutes and haven't reached `upload_file_size` limit yet. | `30m` |
6464
| `workers` | The number of [workers](../../administration/multithreading.md#outputs) to perform flush operations for this output. | `0` |
6565

66-
## Service principal authentication
67-
68-
Azure Blob output supports Microsoft Entra ID service principal authentication. To use this authentication method, set `auth_type` to `service_principal` and provide the required credentials: `tenant_id`, `client_id`, and `client_secret`.
69-
70-
The service principal must have permission to write to the target storage account or container. For example, assign the `Storage Blob Data Contributor` role to the service principal.
71-
72-
Service principal authentication requires TLS to be enabled (`tls` set to `on`).
73-
74-
### Example configuration
75-
76-
```ini
77-
[OUTPUT]
78-
Name azure_blob
79-
Match *
80-
account_name mystorageaccount
81-
container_name logs
82-
blob_type blockblob
83-
auth_type service_principal
84-
tenant_id <tenant-id>
85-
client_id <client-id>
86-
client_secret <client-secret>
87-
tls on
88-
```
89-
9066
### Path templating
9167

9268
When `path` is set, Fluent Bit resolves the value as a template (similar to the Amazon S3 output) before each upload. The resolved prefix is persisted alongside buffered files, so retries and restarts keep writing to the same Azure path. Leading and trailing slashes are removed automatically to avoid duplicate separators.
@@ -182,6 +158,48 @@ After you run the configuration file, you will be able to query the data using t
182158

183159
![Azure Blob](../../.gitbook/assets/azure_blob.png)
184160

161+
### Configuration with service principal authentication
162+
163+
To authenticate with Microsoft Entra ID service principal credentials, set `auth_type` to `service_principal` and configure `tenant_id`, `client_id`, and `client_secret`. The service principal must have permission to write to the target storage account or container, such as the `Storage Blob Data Contributor` role.
164+
165+
{% tabs %}
166+
{% tab title="fluent-bit.yaml" %}
167+
168+
```yaml
169+
pipeline:
170+
outputs:
171+
- name: azure_blob
172+
match: "*"
173+
account_name: YOUR_ACCOUNT_NAME
174+
container_name: logs
175+
blob_type: blockblob
176+
auth_type: service_principal
177+
tenant_id: YOUR_TENANT_ID
178+
client_id: YOUR_CLIENT_ID
179+
client_secret: YOUR_CLIENT_SECRET
180+
tls: on
181+
```
182+
183+
{% endtab %}
184+
{% tab title="fluent-bit.conf" %}
185+
186+
```text
187+
[OUTPUT]
188+
Name azure_blob
189+
Match *
190+
Account_Name YOUR_ACCOUNT_NAME
191+
Container_Name logs
192+
Blob_Type blockblob
193+
Auth_Type service_principal
194+
Tenant_Id YOUR_TENANT_ID
195+
Client_Id YOUR_CLIENT_ID
196+
Client_Secret YOUR_CLIENT_SECRET
197+
Tls on
198+
```
199+
200+
{% endtab %}
201+
{% endtabs %}
202+
185203
### Configuring and using Azure Emulator: Azurite
186204

187205
#### Install and run Azurite

0 commit comments

Comments
 (0)