Skip to content

Commit a3100aa

Browse files
committed
Adding YAML exampels and sandardizing shell usage. Part of issue #1897.
Signed-off-by: Eric D. Schabell <[email protected]>
1 parent dd02c0a commit a3100aa

File tree

1 file changed

+74
-7
lines changed

1 file changed

+74
-7
lines changed

pipeline/outputs/azure_blob.md

Lines changed: 74 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,36 @@ Fluent Bit can deliver records to the official service or an emulator.
5353

5454
The following configuration example generates a random message with a custom tag:
5555

56-
```python
56+
{% tabs %}
57+
{% tab title="fluent-bit.yaml" %}
58+
59+
```yaml
60+
service:
61+
flush: 1
62+
log_level: info
63+
64+
pipeline:
65+
inputs:
66+
- name: dummy
67+
dummy: '{"name": "Fluent Bit", "year": 2020}'
68+
samples: 1
69+
tag: var.log.containers.app-default-96cbdef2340.log
70+
71+
outputs:
72+
- name: azure_blog
73+
match: '*'
74+
account_name: YOUR_ACCOUNT_NAME
75+
shared_key: YOUR_SHARED_KEY
76+
path: kubernetes
77+
container_name: logs
78+
auto_create_container: on
79+
tls: on
80+
```
81+
82+
{% endtab %}
83+
{% tab title="fluent-bit.conf" %}
84+
85+
```text
5786
[SERVICE]
5887
flush 1
5988
log_level info
@@ -75,6 +104,9 @@ The following configuration example generates a random message with a custom tag
75104
tls on
76105
```
77106

107+
{% endtab %}
108+
{% endtabs %}
109+
78110
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:
79111

80112
![Azure Blob](../../.gitbook/assets/azure_blob.png)
@@ -85,13 +117,13 @@ After you run the configuration file, you will be able to query the data using t
85117

86118
1. Install Azurite using `npm`:
87119

88-
```bash
120+
```shell
89121
npm install -g azurite
90122
```
91123

92124
1. Run the service:
93125

94-
```bash
126+
```shell
95127
azurite
96128
```
97129

@@ -108,7 +140,38 @@ After you run the configuration file, you will be able to query the data using t
108140

109141
[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:
110142

111-
```python
143+
{% tabs %}
144+
{% tab title="fluent-bit.yaml" %}
145+
146+
```yaml
147+
service:
148+
flush: 1
149+
log_level: info
150+
151+
pipeline:
152+
inputs:
153+
- name: dummy
154+
dummy: '{"name": "Fluent Bit", "year": 2020}'
155+
samples: 1
156+
tag: var.log.containers.app-default-96cbdef2340.log
157+
158+
outputs:
159+
- name: azure_blog
160+
match: '*'
161+
account_name: devstoreaccount1
162+
shared_key: Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz
163+
path: kubernetes
164+
container_name: logs
165+
auto_create_container: on
166+
tls: off
167+
emulator_mode: on
168+
endpoint: http://127.0.0.1:10000
169+
```
170+
171+
{% endtab %}
172+
{% tab title="fluent-bit.conf" %}
173+
174+
```text
112175
[SERVICE]
113176
flush 1
114177
log_level info
@@ -123,7 +186,7 @@ After you run the configuration file, you will be able to query the data using t
123186
name azure_blob
124187
match *
125188
account_name devstoreaccount1
126-
shared_key Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==
189+
shared_key Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz
127190
path kubernetes
128191
container_name logs
129192
auto_create_container on
@@ -132,10 +195,14 @@ After you run the configuration file, you will be able to query the data using t
132195
endpoint http://127.0.0.1:10000
133196
```
134197

198+
{% endtab %}
199+
{% endtabs %}
200+
135201
After running the Fluent Bit configuration, you will see the data flowing into Azurite:
136202

137-
```text
203+
```shell
138204
$ azurite
205+
139206
Azurite Blob service is starting at http://127.0.0.1:10000
140207
Azurite Blob service is successfully listening at http://127.0.0.1:10000
141208
Azurite Queue service is starting at http://127.0.0.1:10001
@@ -145,4 +212,4 @@ Azurite Queue service is successfully listening at http://127.0.0.1:10001
145212
127.0.0.1 - - [03/Sep/2020:17:40:03 +0000] "PUT /devstoreaccount1/logs/kubernetes/var.log.containers.app-default-96cbdef2340.log?comp=appendblock HTTP/1.1" 404 -
146213
127.0.0.1 - - [03/Sep/2020:17:40:03 +0000] "PUT /devstoreaccount1/logs/kubernetes/var.log.containers.app-default-96cbdef2340.log HTTP/1.1" 201 -
147214
127.0.0.1 - - [03/Sep/2020:17:40:04 +0000] "PUT /devstoreaccount1/logs/kubernetes/var.log.containers.app-default-96cbdef2340.log?comp=appendblock HTTP/1.1" 201 -
148-
```
215+
```

0 commit comments

Comments
 (0)