> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/traceable/agent-docs/mirroring-agent.md).

# Mirroring Agent

The mirroring agent captures and stitches your application's request and response data and sends it to the Traceable Platform agent. The mirroring agent can be installed on the same machine as your application or on a different virtual machine. The following deployment diagram shows a setup where the application and the mirroring agent are installed on other machines.

## Prerequisites

* [x] Traffic mirroring is configured on source devices.
* [x] Mirrored traffic is reaching to the VM. Confirm by tcpdump on the VM. `tcpdump -i eth0 -n -X -s 0`
* [x] In case of TLS mirroring, the source is configured to send tls secret to the mirroring agent(default port 8001). On the VM, nmap's ncat can be used to verify if the secret is reaching to the mirroring agent.

  ```
  # check if keys are coming to non-tls connection
  ncat -l -p 8001
  # check if keys are coming to tls connection
  ncat -l -p 8001 --ssl
  ```

  Data coming to these connection are in the following format:

  ```
  CLIENT_RANDOM abcdabcdbacdba acbabac123123123
  CLIENT_TRAFFIC_SECRET_0 abcdabcdbacdba acbabac123123123
  ```
* [x] TPA is installed either on same VM or different VM. TPA is reachable from the Mirroring agent VM. If TPA is using TLS, then make sure that TPA certificate carries the domain name/IP in SAN.

Follow these guides to install and configure the mirroring agent:

* [Deployment Architectures](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/mirroring-agent/deployment-architectures/README.md) — reference patterns (VM, ECS sidecar, AWS/GCP collectors, TLS key sharing)
* [Installation](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/mirroring-agent/InstallationSteps.md)
* [Configuration](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/mirroring-agent/Configuration.md)
* [Troubleshooting](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/mirroring-agent/Troubleshooting.md)

## AWS Deployment

For AWS deployments, use one of the following methods:

* [AWS VPC Traffic Mirroring Collector Architecture](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/mirroring-agent/deployment-architectures/aws-vpc-traffic-mirroring.md)
* [AWS VPC Mirroring — Terraform](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/mirroring-agent/aws-vpc-mirroring/terraform/README.md)
* [AWS VPC Mirroring — CloudFormation](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/mirroring-agent/aws-vpc-mirroring/cf-templates/README.md)

## GCP Deployment

For GCP packet mirroring, use the setup script to deploy Mirroring Agent collectors. Deploy [Traceable Platform Agent (TPA)](/traceable/agent-docs/traceable-agent.md) before running the GCP setup script.

* [GCP Traffic Mirroring](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/mirroring-agent/gcp-traffic-mirroring/README.md)

## Quick Links

* [Deployment Architectures](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/mirroring-agent/deployment-architectures/README.md)
* [Configuration](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/mirroring-agent/Configuration.md)
* [Installation Steps](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/mirroring-agent/InstallationSteps.md)
* [Installation Steps (Windows)](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/mirroring-agent/InstallationStepsWindows.md)
* [ECS Sidecar](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/mirroring-agent/ECSSidecar.md)
* [AWS VPC Mirroring](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/mirroring-agent/aws-vpc-mirroring/README.md)
* [GCP Traffic Mirroring](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/mirroring-agent/gcp-traffic-mirroring/README.md)
* [Troubleshooting](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/mirroring-agent/Troubleshooting.md)
* [Release Notes](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/mirroring-agent/release-notes.md)
* [Images](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/mirroring-agent/images/README.md)
* [Vulnerability Reports](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/mirroring-agent/vulnerability-reports/README.md)
