Skip to content

Commit c28ec75

Browse files
committed
Adding YAML exampels and sandardizing shell usage for Azure Log Analytics. Part of issue #1897.
Signed-off-by: Eric D. Schabell <[email protected]>
1 parent 2f4efde commit c28ec75

File tree

1 file changed

+44
-3
lines changed

1 file changed

+44
-3
lines changed

pipeline/outputs/azure.md

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ description: 'Send logs, metrics to Azure Log Analytics'
44

55
# Azure Log Analytics
66

7-
![](../../.gitbook/assets/image%20%287%29.png)
8-
97
Azure output plugin allows to ingest your records into [Azure Log Analytics](https://azure.microsoft.com/en-us/services/log-analytics/) service.
108

119
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,14 +28,32 @@ In order to insert records into an Azure Log Analytics instance, you can run the
3028

3129
The **azure** plugin, can read the parameters from the command line in two ways, through the **-p** argument \(property\), e.g:
3230

33-
```text
31+
```shell
3432
fluent-bit -i cpu -o azure -p customer_id=abc -p shared_key=def -m '*' -f 1
3533
```
3634

3735
### Configuration File
3836

3937
In your main configuration file append the following _Input_ & _Output_ sections:
4038

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+
4157
```text
4258
[INPUT]
4359
Name cpu
@@ -49,8 +65,30 @@ In your main configuration file append the following _Input_ & _Output_ sections
4965
Shared_Key def
5066
```
5167

68+
{% endtab %}
69+
{% endtabs %}
70+
5271
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`:
5372

73+
{% tabs %}
74+
{% tab title="fluent-bit.yaml" %}
75+
76+
```yaml
77+
pipeline:
78+
inputs:
79+
- name: cpu
80+
81+
outputs:
82+
- name: azure
83+
match: '*'
84+
log_type_key: $kubernetes['labels']['app']
85+
customer_id: abc
86+
shared_key: def
87+
```
88+
89+
{% endtab %}
90+
{% tab title="fluent-bit.conf" %}
91+
5492
```text
5593
[INPUT]
5694
Name cpu
@@ -62,3 +100,6 @@ Another example using the `Log_Type_Key` with [record-accessor](https://docs.flu
62100
Customer_ID abc
63101
Shared_Key def
64102
```
103+
104+
{% endtab %}
105+
{% endtabs %}

0 commit comments

Comments
 (0)