Skip to content

Commit 53119fc

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

File tree

1 file changed

+53
-8
lines changed

1 file changed

+53
-8
lines changed

pipeline/outputs/azure_logs_ingestion.md

Lines changed: 53 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ description: 'Send logs to Azure Log Analytics using Logs Ingestion API with DCE
44

55
# Azure Logs Ingestion API
66

7-
![](../../.gitbook/assets/image%20%287%29.png)
8-
9-
Azure Logs Ingestion plugin allows you ingest your records using [Logs Ingestion API in Azure Monitor](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/logs-ingestion-api-overview) to supported [Azure tables](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/logs-ingestion-api-overview#supported-tables) or to [custom tables](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/create-custom-table#create-a-custom-table) that you create.
7+
Azure Logs Ingestion plugin allows you to ingest your records using [Logs Ingestion API in Azure Monitor](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/logs-ingestion-api-overview) to supported [Azure tables](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/logs-ingestion-api-overview#supported-tables) or to [custom tables](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/create-custom-table#create-a-custom-table) that you create.
108

119
The Logs ingestion API requires the following components:
1210

@@ -17,9 +15,10 @@ The Logs ingestion API requires the following components:
1715
> Note: According to [this document](https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/azure-monitor/logs/logs-ingestion-api-overview.md#components), all resources should be in the same region.
1816
1917
To visualize basic Logs Ingestion operation, see the following image:
18+
2019
![](../../.gitbook/assets/azure-logs-ingestion-overview.png)
2120

22-
To get more details about how to setup these components, please refer to the following documentations:
21+
To get more details about how to set up these components, please refer to the following documentations:
2322

2423
- [Azure Logs Ingestion API](https://docs.microsoft.com/en-us/azure/log-analytics/)
2524
- [Send data to Azure Monitor Logs with Logs ingestion API (setup DCE, DCR and Log Analytics)](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/tutorial-logs-ingestion-portal)
@@ -48,19 +47,61 @@ To send records into an Azure Log Analytics using Logs Ingestion API the followi
4847
- Either an [Azure tables](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/logs-ingestion-api-overview#supported-tables) or [custom tables](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/create-custom-table#create-a-custom-table)
4948
- An app registration with client secrets (for DCR access).
5049

51-
You can follow [this guideline](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/tutorial-logs-ingestion-portal) to setup the DCE, DCR, app registration and a custom table.
50+
You can follow [this guideline](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/tutorial-logs-ingestion-portal) to set up the DCE, DCR, app registration and a custom table.
5251

5352
### Configuration File
5453

5554
Use this configuration to quickly get started:
5655

57-
```ini
56+
{% tabs %}
57+
{% tab title="fluent-bit.yaml" %}
58+
59+
```yaml
60+
pipeline:
61+
inputs:
62+
- name: tail
63+
path: /path/to/your/sample.log
64+
tag: sample
65+
key: RawData
66+
67+
# Or use other plugins
68+
#- name: cpu
69+
# tag: sample
70+
71+
filters:
72+
- name: modify
73+
match: sample
74+
# Add a json key named "Application":"fb_log"
75+
add: Application fb_log
76+
77+
outputs:
78+
# Enable this section to see your json-log format
79+
#- name: stdout
80+
# match: '*'
81+
82+
- name: azure_logs_ingestion
83+
match: sample
84+
client_id: XXXXXXXX-xxxx-yyyy-zzzz-xxxxyyyyzzzzxyzz
85+
client_secret: some.secret.xxxzzz
86+
tenant_id: XXXXXXXX-xxxx-yyyy-zzzz-xxxxyyyyzzzzxyzz
87+
dce_url: https://log-analytics-dce-XXXX.region-code.ingest.monitor.azure.com
88+
dcr_id: dcr-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
89+
table_name: ladcr_CL
90+
time_generated: true
91+
time_key: Time
92+
compress: true
93+
```
94+
95+
{% endtab %}
96+
{% tab title="fluent-bit.conf" %}
97+
98+
```text
5899
[INPUT]
59100
Name tail
60101
Path /path/to/your/sample.log
61102
Tag sample
62103
Key RawData
63-
# Or use other plugins Plugin
104+
# Or use other plugins
64105
# [INPUT]
65106
# Name cpu
66107
# Tag sample
@@ -75,6 +116,7 @@ Use this configuration to quickly get started:
75116
#[OUTPUT]
76117
# Name stdout
77118
# Match *
119+
78120
[OUTPUT]
79121
Name azure_logs_ingestion
80122
Match sample
@@ -89,4 +131,7 @@ Use this configuration to quickly get started:
89131
Compress true
90132
```
91133

92-
Setup your DCR transformation accordingly based on the json output from fluent-bit's pipeline (input, parser, filter, output).
134+
{% endtab %}
135+
{% endtabs %}
136+
137+
Set up your DCR transformation accordingly based on the json output from fluent-bit's pipeline (input, parser, filter, output).

0 commit comments

Comments
 (0)