You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Azure output plugin allows to ingest your records into [Azure Log Analytics](https://azure.microsoft.com/en-us/services/log-analytics/) service.
10
8
11
9
To get more details about how to setup Azure Log Analytics, please refer to the following documentation: [Azure Log Analytics](https://docs.microsoft.com/en-us/azure/log-analytics/)
@@ -30,35 +28,78 @@ In order to insert records into an Azure Log Analytics instance, you can run the
30
28
31
29
The **azure** plugin, can read the parameters from the command line in two ways, through the **-p** argument \(property\), e.g:
In your main configuration file append the following _Input_ & _Output_ sections:
40
38
39
+
{% tabs %}
40
+
{% tab title="fluent-bit.yaml" %}
41
+
42
+
```yaml
43
+
pipeline:
44
+
inputs:
45
+
- name: cpu
46
+
47
+
outputs:
48
+
- name: azure
49
+
match: '*'
50
+
customer_id: abc
51
+
shared_key: def
52
+
```
53
+
54
+
{% endtab %}
55
+
{% tab title="fluent-bit.conf" %}
56
+
41
57
```text
42
58
[INPUT]
43
-
Name cpu
59
+
Name cpu
44
60
45
61
[OUTPUT]
46
-
Name azure
47
-
Match *
48
-
Customer_ID abc
49
-
Shared_Key def
62
+
Name azure
63
+
Match *
64
+
Customer_ID abc
65
+
Shared_Key def
50
66
```
51
67
68
+
{% endtab %}
69
+
{% endtabs %}
70
+
52
71
Another example using the `Log_Type_Key` with [record-accessor](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit/classic-mode/record-accessor), which will read the table name (or event type) dynamically from kubernetes label `app`, instead of `Log_Type`:
|`auth_type`| Specify the type to authenticate against the service. Supported values: `key`, `sas`. |`key`|
23
-
|`shared_key`| Specify the Azure Storage Shared Key to authenticate against the service. This configuration property is mandatory when `auth_type` is `key`. |_none_|
24
-
|`sas_token`| Specify the Azure Storage shared access signatures to authenticate against the service. This configuration property is mandatory when `auth_type` is `sas`. |_none_|
25
-
|`container_name`| Name of the container that will contain the blobs. |_none_|
|`auto_create_container`| If `container_name` doesn't exist in the remote service, enabling this option handles the exception and auto-creates the container. |`on`|
28
-
|`path`| Optional. The path to store your blobs. If your blob name is `myblob`, specify subdirectories for storage using `path`. For example, setting `path` to `/logs/kubernetes` will store your blob in `/logs/kubernetes/myblob`. |_none_|
29
-
|`compress`| Sets payload compression in network transfer. Supported value: `gzip`|_none_|
30
-
|`compress_blob`| Enables GZIP compression in the final `blockblob` file. This option isn't compatible when `blob_type` = `appendblob`. |_none_|
31
-
|`emulator_mode`| To send data to an Azure emulator service like [Azurite](https://github.com/Azure/Azurite), enable this option to format the requests in the expected format. |`off`|
32
-
|`endpoint`| When using an emulator, this option lets you specify the absolute HTTP address of such service. For example, `http://127.0.0.1:10000`. |_none_|
33
-
|`tls`| Enable or disable TLS encryption. Azure service requires this to be set to `on`. |`off`|
34
-
|`workers`| The number of [workers](../../administration/multithreading.md#outputs) to perform flush operations for this output. |`0`|
35
-
|`buffering_enabled`| Enable buffering into disk before ingesting into Azure Blob. |`false`|
36
-
|`buffer_dir`| Specifies the location of directory where the buffered data will be stored. |`/tmp/fluent-bit/azure-blob/`|
37
-
|`upload_timeout`| Optional. Specify a timeout for uploads. Fluent Bit will start ingesting buffer files which have been created more than `x` minutes and ago haven't reached `upload_file_size` limit yet. |`30m`|
38
-
|`upload_file_size`| Specifies the size of files to be uploaded in MB. |`200M`|
39
-
|`azure_blob_buffer_key`| Set the Azure Blob buffer key which needs to be specified when using multiple instances of Azure Blob output plugin and buffering is enabled. |`key`|
40
-
|`store_dir_limit_size`| Set the max size of the buffer directory. |`8G`|
41
-
|`buffer_file_delete_early`| Whether to delete the buffered file early after successful blob creation. |`false`|
42
-
|`blob_uri_length`| Set the length of generated blob URI before ingesting to Azure Kusto. |`64`|
43
-
|`unify_tag`| Whether to create a single buffer file when buffering mode is enabled. |`false`|
44
-
|`scheduler_max_retries`| Maximum number of retries for the scheduler send blob. |`3`|
45
-
|`delete_on_max_upload_error`| Whether to delete the buffer file on maximum upload errors. |`false`|
|`auth_type`| Specify the type to authenticate against the service. Supported values: `key`, `sas`. |`key`|
23
+
|`shared_key`| Specify the Azure Storage Shared Key to authenticate against the service. This configuration property is mandatory when `auth_type` is `key`. |_none_|
24
+
|`sas_token`| Specify the Azure Storage shared access signatures to authenticate against the service. This configuration property is mandatory when `auth_type` is `sas`. |_none_|
25
+
|`container_name`| Name of the container that will contain the blobs. |_none_|
|`auto_create_container`| If `container_name` doesn't exist in the remote service, enabling this option handles the exception and auto-creates the container. |`on`|
28
+
|`path`| Optional. The path to store your blobs. If your blob name is `myblob`, specify subdirectories for storage using `path`. For example, setting `path` to `/logs/kubernetes` will store your blob in `/logs/kubernetes/myblob`. |_none_|
29
+
|`compress`| Sets payload compression in network transfer. Supported value: `gzip`|_none_|
30
+
|`compress_blob`| Enables GZIP compression in the final `blockblob` file. This option isn't compatible when `blob_type` = `appendblob`. |_none_|
31
+
|`emulator_mode`| To send data to an Azure emulator service like [Azurite](https://github.com/Azure/Azurite), enable this option to format the requests in the expected format. |`off`|
32
+
|`endpoint`| When using an emulator, this option lets you specify the absolute HTTP address of such service. For example, `http://127.0.0.1:10000`. |_none_|
33
+
|`tls`| Enable or disable TLS encryption. Azure service requires this to be set to `on`. |`off`|
34
+
|`workers`| The number of [workers](../../administration/multithreading.md#outputs) to perform flush operations for this output. |`0`|
35
+
|`buffering_enabled`| Enable buffering into disk before ingesting into Azure Blob. |`false`|
36
+
|`buffer_dir`| Specifies the location of directory where the buffered data will be stored.|`/tmp/fluent-bit/azure-blob/`|
37
+
|`upload_timeout`| Optional. Specify a timeout for uploads. Fluent Bit will start ingesting buffer files which have been created more than `x` minutes and ago haven't reached `upload_file_size` limit yet. |`30m`|
38
+
|`upload_file_size`| Specifies the size of files to be uploaded in MB. |`200M`|
39
+
|`azure_blob_buffer_key`| Set the Azure Blob buffer key which needs to be specified when using multiple instances of Azure Blob output plugin and buffering is enabled. |`key`|
40
+
|`store_dir_limit_size`| Set the max size of the buffer directory. |`8G`|
41
+
|`buffer_file_delete_early`| Whether to delete the buffered file early after successful blob creation. |`false`|
42
+
|`blob_uri_length`| Set the length of generated blob URI before ingesting to Azure Kusto. |`64`|
43
+
|`unify_tag`| Whether to create a single buffer file when buffering mode is enabled. |`false`|
44
+
|`scheduler_max_retries`| Maximum number of retries for the scheduler send blob. |`3`|
45
+
|`delete_on_max_upload_error`| Whether to delete the buffer file on maximum upload errors. |`false`|
46
+
|`io_timeout`| HTTP IO timeout. |`60s`|
47
47
48
48
## Get started
49
49
@@ -53,28 +53,60 @@ Fluent Bit can deliver records to the official service or an emulator.
53
53
54
54
The following configuration example generates a random message with a custom tag:
tag var.log.containers.app-default-96cbdef2340.log
91
+
name dummy
92
+
dummy {"name": "Fluent Bit", "year": 2020}
93
+
samples 1
94
+
tag var.log.containers.app-default-96cbdef2340.log
66
95
67
96
[OUTPUT]
68
-
name azure_blob
69
-
match *
70
-
account_name YOUR_ACCOUNT_NAME
71
-
shared_key YOUR_SHARED_KEY
72
-
path kubernetes
73
-
container_name logs
74
-
auto_create_container on
75
-
tls on
97
+
name azure_blob
98
+
match *
99
+
account_name YOUR_ACCOUNT_NAME
100
+
shared_key YOUR_SHARED_KEY
101
+
path kubernetes
102
+
container_name logs
103
+
auto_create_container on
104
+
tls on
76
105
```
77
106
107
+
{% endtab %}
108
+
{% endtabs %}
109
+
78
110
After you run the configuration file, you will be able to query the data using the Azure Storage Explorer. The example generates the following content in the explorer:
@@ -85,13 +117,13 @@ After you run the configuration file, you will be able to query the data using t
85
117
86
118
1. Install Azurite using `npm`:
87
119
88
-
```bash
120
+
```shell
89
121
npm install -g azurite
90
122
```
91
123
92
124
1. Run the service:
93
125
94
-
```bash
126
+
```shell
95
127
azurite
96
128
```
97
129
@@ -108,34 +140,69 @@ After you run the configuration file, you will be able to query the data using t
108
140
109
141
[Azurite](https://github.com/Azure/Azurite) comes with a default `account_name` and `shared_key`. Instead of the defaults, be sure to use the specific values provided in the following example:
0 commit comments