Skip to content

Commit 8678b04

Browse files
author
Jill Grant
authored
Merge pull request #239525 from NarineM/main
Update ama syslog and sentinel articles
2 parents 70017a9 + 9c1a552 commit 8678b04

File tree

3 files changed

+25
-72
lines changed

3 files changed

+25
-72
lines changed

articles/azure-monitor/agents/azure-monitor-agent-troubleshoot-linux-vm-rsyslog.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ ms.date: 5/3/2022
66
ms.custom: references_region
77
ms.reviewer: shseth
88
---
9-
# Syslog issue troubleshooting guide for Azure Monitor Linux Agent
10-
Here's how AMA collects syslog events:
9+
# Syslog troubleshooting guide for Azure Monitor Linux Agent
10+
11+
Overview of Azure Monitor Linux Agent syslog collection and supported RFC standards:
1112

1213
- AMA installs an output configuration for the system syslog daemon during the installation process. The configuration file specifies the way events flow between the syslog daemon and AMA.
1314
- For `rsyslog` (most Linux distributions), the configuration file is `/etc/rsyslog.d/10-azuremonitoragent.conf`. For `syslog-ng`, the configuration file is `/etc/syslog-ng/conf.d/azuremonitoragent.conf`.
@@ -19,19 +20,21 @@ Here's how AMA collects syslog events:
1920
> [!NOTE]
2021
> AMA uses local persistency by default, all events received from `rsyslog` / `syslog-ng` are queued in `/var/opt/microsoft/azuremonitoragent/events` if they fail to be uploaded.
2122

22-
## Rsyslog data not uploaded due to full disk space issue on Azure Monitor Linux Agent
23+
## Issues
24+
25+
### Rsyslog data not uploaded due to full disk space issue on Azure Monitor Linux Agent
2326

24-
### Symptom
27+
#### Symptom
2528
**Syslog data is not uploading**: When inspecting the error logs at `/var/opt/microsoft/azuremonitoragent/log/mdsd.err`, you'll see entries about *Error while inserting item to Local persistent store…No space left on device* similar to the following snippet:
2629

2730
```
2831
2021-11-23T18:15:10.9712760Z: Error while inserting item to Local persistent store syslog.error: IO error: No space left on device: While appending to file: /var/opt/microsoft/azuremonitoragent/events/syslog.error/000555.log: No space left on device
2932
```
3033

31-
### Cause
34+
#### Cause
3235
Linux AMA buffers events to `/var/opt/microsoft/azuremonitoragent/events` prior to ingestion. On a default Linux AMA install, this directory will take ~650MB of disk space at idle. The size on disk will increase when under sustained logging load. It will get cleaned up about every 60 seconds and will reduce back to ~650 MB when the load returns to idle.
3336

34-
### Confirming the issue of full disk
37+
#### Confirming the issue of full disk
3538
The `df` command shows almost no space available on `/dev/sda1`, as shown below:
3639

3740
```bash
@@ -73,12 +76,12 @@ none 849 root txt REG 0,1 8632 0 16764 / (deleted)
7376
rsyslogd 1484 syslog 14w REG 8,1 3601566564 0 35280 /var/log/syslog (deleted)
7477
```
7578

76-
## Issue: rsyslog default configuration logs all facilities to /var/log/syslog
79+
### Rsyslog default configuration logs all facilities to /var/log/syslog
7780
On some popular distros (for example Ubuntu 18.04 LTS), rsyslog ships with a default configuration file (`/etc/rsyslog.d/50-default.conf`) which will log events from nearly all facilities to disk at `/var/log/syslog`.
7881

7982
AMA doesn't rely on syslog events being logged to `/var/log/syslog`. Instead, it configures rsyslog to forward events over a socket directly to the azuremonitoragent service process (mdsd).
8083

81-
### Fix: Remove high-volume facilities from /etc/rsyslog.d/50-default.conf
84+
#### Fix: Remove high-volume facilities from /etc/rsyslog.d/50-default.conf
8285
If you're sending a high log volume through rsyslog, consider modifying the default rsyslog config to avoid logging these events to this location `/var/log/syslog`. The events for this facility would still be forwarded to AMA because of the config in `/etc/rsyslog.d/10-azuremonitoragent.conf`.
8386

8487
1. For example, to remove local4 events from being logged at `/var/log/syslog`, change this line in `/etc/rsyslog.d/50-default.conf` from this:
@@ -93,7 +96,7 @@ If you're sending a high log volume through rsyslog, consider modifying the defa
9396
```
9497
2. `sudo systemctl restart rsyslog`
9598

96-
## Issue: Azure Monitor Linux Agent Event Buffer is Filling Disk
99+
### Azure Monitor Linux Agent Event Buffer is Filling Disk
97100
If you observe the `/var/opt/microsoft/azuremonitor/events` directory growing unbounded (10 GB or higher) and not reducing in size, [file a ticket](#file-a-ticket) with **Summary** as 'AMA Event Buffer is filling disk' and **Problem type** as 'I need help configuring data collection from a VM'.
98101

99102
[!INCLUDE [azure-monitor-agent-file-a-ticket](../../../includes/azure-monitor-agent/azure-monitor-agent-file-a-ticket.md)]

articles/azure-monitor/agents/data-collection-syslog.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ The following facilities are supported with the Syslog collector:
3131
* uucp
3232
* local0-local7
3333

34-
For some device types that don't allow local installation of the Azure Monitor agent, the agent can be installed instead on a dedicated Linux-based log forwarder. The originating device must be configured to send Syslog events to the Syslog daemon on this forwarder instead of the local daemon. Please see [Sentinel documents](https://learn.microsoft.com/azure/sentinel/connect-syslog#architecture) for more information.
34+
For some device types that don't allow local installation of the Azure Monitor agent, the agent can be installed instead on a dedicated Linux-based log forwarder. The originating device must be configured to send Syslog events to the Syslog daemon on this forwarder instead of the local daemon. Please see [Sentinel tutorial](../../sentinel/forward-syslog-monitor-agent.md) for more information.
3535

3636
## Configure Syslog
3737

@@ -91,6 +91,13 @@ A data collection rule is an Azure resource that allows you to define the way d
9191
1. Select **Add data source**.
9292
1. Select **Next: Review + create**.
9393

94+
### Create rule
95+
96+
1. Select **Create**.
97+
1. Wait 20 minutes before moving on to the next section.
98+
99+
If your VM doesn't have the Azure Monitor agent installed, the data collection rule deployment triggers the installation of the agent on the VM.
100+
94101
## Configure Syslog on Linux Agent
95102
When the Azure Monitoring Agent is installed on Linux machine it installs a default Syslog configuration file that defines the facility and severity of the messages that are collected if syslog is enabled in DCR. The configuration file is different depending on the Syslog daemon that the client has installed.
96103

articles/sentinel/forward-syslog-monitor-agent.md

Lines changed: 5 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.custom: template-tutorial
1010
#Customer intent: As a security-engineer, I want to get syslog data into Microsoft Sentinel so that I can use the data with other data to do attack detection, threat visibility, proactive hunting, and threat response. As an IT administrator, I want to get syslog data into my Log Analytics workspace to monitor my linux-based devices.
1111
---
1212

13-
# Tutorial: Forward syslog data to a Log Analytics workspace by using the Azure Monitor agent with Microsoft Sentinel
13+
# Tutorial: Forward syslog data to a Log Analytics workspace with Microsoft Sentinel by using the Azure Monitor agent
1414

1515
In this tutorial, you'll configure a Linux virtual machine (VM) to forward syslog data to your workspace by using the Azure Monitor agent. These steps allow you to collect and monitor data from Linux-based devices where you can't install an agent like a firewall network device.
1616

@@ -47,67 +47,7 @@ To complete the steps in this tutorial, you must have the following resources an
4747

4848
## Create a data collection rule
4949

50-
Create a *data collection rule* in the same region as your Microsoft Sentinel workspace.
51-
A data collection rule is an Azure resource that allows you to define the way data should be handled as it's ingested into Microsoft Sentinel.
52-
53-
1. Sign in to the [Azure portal](https://portal.azure.com).
54-
1. Search for and open **Monitor**.
55-
1. Under **Settings**, select **Data Collection Rules**.
56-
1. Select **Create**.
57-
58-
:::image type="content" source="media/forward-syslog-monitor-agent/create-data-collection-rule.png" alt-text="Screenshot of the data collections rules pane with the create option selected.":::
59-
60-
### Enter basic information
61-
62-
1. On the **Basics** pane, enter the following information:
63-
64-
|Field |Value |
65-
|---------|---------|
66-
|Rule Name | Enter a name like dcr-syslog |
67-
|Subscription | Select the appropriate subscription |
68-
|Resource group | Select the appropriate resource group |
69-
|Region | Select the same region that your Microsoft Sentinel workspace is located |
70-
|Platform Type | Linux |
71-
1. Select **Next: Resources**.
72-
73-
### Add resources
74-
1. Select **Add resources**.
75-
1. Use the filters to find the virtual machine that you'll use to collect logs.
76-
:::image type="content" source="media/forward-syslog-monitor-agent/create-rule-scope.png" alt-text="Screenshot of the page to select the scope for the data collection rule. ":::
77-
1. Select the virtual machine.
78-
1. Select **Apply**.
79-
1. Select **Next: Collect and deliver**.
80-
81-
### Add data source
82-
83-
1. Select **Add data source**.
84-
1. For **Data source type**, select **Linux syslog**.
85-
:::image type="content" source="media/forward-syslog-monitor-agent/create-rule-data-source.png" alt-text="Screenshot of page to select data source type and minimum log level":::
86-
1. For **Minimum log level**, leave the default values **LOG_DEBUG**.
87-
1. Select **Next: Destination**.
88-
89-
### Add destination
90-
91-
1. Select **Add destination**.
92-
93-
:::image type="content" source="media/forward-syslog-monitor-agent/create-rule-add-destination.png" alt-text="Screenshot of the destination tab with the add destination option selected.":::
94-
1. Enter the following values:
95-
96-
|Field |Value |
97-
|---------|---------|
98-
|Destination type | Azure Monitor Logs |
99-
|Subscription | Select the appropriate subscription |
100-
|Account or namespace |Select the appropriate Log Analytics workspace|
101-
102-
1. Select **Add data source**.
103-
1. Select **Next: Review + create**.
104-
105-
### Create rule
106-
107-
1. Select **Create**.
108-
1. Wait 20 minutes before moving on to the next section.
109-
110-
If your VM doesn't have the Azure Monitor agent installed, the data collection rule deployment triggers the installation of the agent on the VM.
50+
See step by step guide [here](../azure-monitor/agents/data-collection-syslog.md#create-a-data-collection-rule).
11151

11252
## Verify the Azure Monitor agent is running
11353

@@ -189,5 +129,8 @@ Evaluate whether you still need the resources you created like the virtual machi
189129

190130
## Next steps
191131

132+
Learn more about:
133+
192134
> [!div class="nextstepaction"]
193135
> [Data collection rules in Azure Monitor](../azure-monitor/essentials/data-collection-rule-overview.md)
136+
> [Collect syslog with Azure Monitor Agent overview](../azure-monitor/agents/data-collection-syslog.md)

0 commit comments

Comments
 (0)