Microsoft Defender for Cloud Apps
Cloud and workloads

Configure automatic log upload using on-premises Docker on Linux | Microsoft Defender for Cloud Apps

In brief

The article now explains that administrators should stop and remove the existing Docker container before redeploying or replacing a log collector, with a warning that removal is permanent. It also updates wording, image descriptions, and metadata.

What Defender admins need to know

Administrators have clearer and safer instructions for replacing or removing an on-premises log collector.

Summaries are generated from the documentation change itself.

Documentation change

The comparison below shows only the changed extract. Use the full-page view for complete context.

Configure automatic log upload using on-premises Docker on Linux

You can configure automatic log upload for continuous reports in Defender for Cloud Apps using a Docker on an on-premises Ubuntu or CentOS server. This article walks you through defining data sources in the Microsoft Defender portal, deploying a Docker-based log collector on your Linux server, configuring your network appliances to export logs, and verifying the deployment. Before you begin, review the Prerequisites to confirm that your environment meets the minimum requirements.following minimum requirements.

Remove an existing log collector

If you have an existing log collector and wantneed to remove the log collector before deploying again,redeploy or if you simply want to removereplace the log collector, runstop and remove the following commands to stop the runningexisting Docker container and delete it:first.

docker stop <collector_name>

    1. **Name** your proxy or firewall.

        ![Screenshot of the Add data source dialog with fields for naming the proxy or firewall.](media/ubuntu1.png)

    1. Select the appliance from the **Source** list. If you select **Custom log format** to work with a network appliance that isn't listed, see [Working with the custom log parser](custom-log-parser.md) for configuration instructions.

    1. Compare your log with the sample of the expected log format. If your log file format doesn't match this sample, you should add your data source as **Other**.

    1. Set the **Receiver type** to either **FTP**, **FTPS**, **Syslog – UDP**, or **Syslog – TCP**, or **Syslog – TLS**.


    1. Select all **Data sources** that you want to connect to the collector, and select **Update** to save the configuration.

        Further deployment information appears in the **Next steps** section of the dialog, including a command you'll use later in [Step 2](#step-2--on-premises-deployment-of-your-machine) to import the collector configuration. If you selected Syslog, this information also includes data about which port the Syslog listener is listening on.

    1. Use the ![Icon for copying the collector configuration command to the clipboard.](media/copy-icon.png) **Copy** button to copy the command to the clipboard and save it to a separate location.


## Step 2 – On-premises deployment of your machine

The following steps describe the deployment in Ubuntu. The deployment steps for other supported platforms might be slightly different.

1. Open a terminal on your Ubuntu machine.


    You should see the message: **Finished successfully!** For example:

    ![Screenshot of a command to verify that docker is running properly.](media/ubuntu8.png)

## Step 3 - On-premises configuration of your network appliances

Configure your network firewalls and proxies to periodically export logs to the dedicated Syslog port or the FTP directory according to the directions in the **Create log collector** dialog. For example, the following destination path shows the FTP folder structure for a data source named BlueCoat_HQ on the log collector machine:

```bash
BlueCoat_HQ - Destination path: \<<machine_name>>\BlueCoat_HQ\

Run the following commands to stop the running container and delete it:

docker stop <collector_name>

    1. **Name** your proxy or firewall.

        ![Screenshot of the Add data source dialog showing the Name field for entering a proxy or firewall name.](media/ubuntu1.png)

    1. Select the appliance from the **Source** list. If you select **Custom log format** to work with a network appliance that isn't listed, see [Working with the custom log parser](custom-log-parser.md) for configuration instructions.

    1. Compare your log with the sample of the expected log format. If your log file format doesn't match the expected log format sample shown in the portal, add your data source as **Other**.

    1. Set the **Receiver type** to either **FTP**, **FTPS**, **Syslog – UDP**, or **Syslog – TCP**, or **Syslog – TLS**.


    1. Select all **Data sources** that you want to connect to the collector, and select **Update** to save the configuration.

        Further deployment information appears in the **Next steps** section of the dialog, including a command you'll use later in [Step 2 – On-premises deployment of your machine](#step-2--on-premises-deployment-of-your-machine) to deploy the collector on your Linux host and import the collector configuration. If you selected Syslog, the **Next steps** section also includes the port that the Syslog listener is listening on.

    1. Use the ![Icon for copying the collector configuration command to the clipboard.](media/copy-icon.png) **Copy** button to copy the command to the clipboard and save it to a separate location.


## Step 2 – On-premises deployment of your machine

This section describes the on-premises Docker deployment procedure for Ubuntu. The deployment steps for other supported platforms might be slightly different.

1. Open a terminal on your Ubuntu machine.


    You should see the message: **Finished successfully!** For example:

    ![Screenshot of terminal output showing the Finished successfully message, confirming the log collector container is running.](media/ubuntu8.png)

## Step 3 - On-premises configuration of your network appliances

Configure your network firewalls and proxies to periodically export logs to the dedicated Syslog port or the FTP directory according to the directions in the **Create log collector** dialog. For example, the following destination path shows the FTP folder structure for a data source named BlueCoat_HQ on the log collector machine:

```text
BlueCoat_HQ - Destination path: \<<machine_name>>\BlueCoat_HQ\