> For the complete documentation index, see [llms.txt](https://docs.vngcloud.vn/vng-cloud-document/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vngcloud.vn/vng-cloud-document/vmonitor/dashboards/logs/lam-viec-voi-log-agent/cai-dat-log-agent-tren-cac-he-dieu-hanh/windows.md).

# Windows

Before installing the agent on the operating systems we support below, you need to download the certificate according to the instructions at [Initialize Certificate](https://docs-vngcloud-vn.translate.goog/vng-cloud-document/v/vn/vmonitor/dashboards/logs/lam-viec-voi-log-agent/khoi-tao-certificate) . The download file will contain the certificates used to authenticate with the vMonitor Logs system. Use this information with the instructions below to complete Agent for Log setup.

**Setting**

Determine the type of agent you want to install and follow that agent's instructions below:

Filebeat

<table data-header-hidden><thead><tr><th></th></tr></thead><tbody><tr><td><ul><li>Download filebeat at <a href="https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-8.7.1-windows-x86_64.zip">https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-8.7.1-windows-x86_64.zip</a></li><li>Unzip the downloaded filebeat folder</li><li>Copy the files user.cer.pem, user.key.pem, VNG.trust.pem from the certificate folder to the extracted filebeat folder. Let's say below we have extracted filebeat into a folder<code>C:\filebeat-8.7.1-windows-x86_64</code></li><li>Manually run the command below with PowerShell</li><li>In which: In the filebeat.yml file, we have set up the example in the download certificate folder as below to push the content of file C:\agent.log to the system.</li></ul><p>In there:</p><ul><li>At <code>input</code>the path to the log file</li><li><p>At <code>output</code>, the variables you need to fill in are taken from the certificate download step above:</p><ul><li><code>$BOOTSTRAP_SERVERS, $TOPIC</code>taken from file <a href="http://info.md/">info.md</a></li><li><code>$PATH_FILE_VNG_TRUST_PEM,$PATH_FILE_USER_CER_PEM,$PATH_FILE_USER_KEY_PEM</code>is the path to the file VNG.trust.pem user.cer.pem user.key.pem</li></ul></li></ul><p>Install a service that runs in the background:</p><p>On powershell when entering the filebeat path</p><p>We recommend that you try running it manually first to identify the problem if there is any.</p></td></tr><tr><td></td></tr><tr><td><p>Copy</p><pre><code>cd C:\filebeat-8.7.1-windows-x86_64
.\filebeat.exe -c .\filebeat.yml
</code></pre></td></tr><tr><td></td></tr><tr><td><p>Copy</p><pre><code>filebeat.inputs:
- type: log
  paths:
    - C:\agent.log
output.kafka:
hosts: ["$BOOTSTRAP_SERVERS"]
topic: $TOPIC
partition.round_robin:
reachable_only: false
required_acks: 1
compression: gzip
max_message_bytes: 1000000
ssl.certificate_authorities:
- $PATH_FILE_VNG_TRUST_PEM
ssl.certificate: $PATH_FILE_USER_CER_PEM
ssl.key: $PATH_FILE_USER_KEY_PEM
ssl.verification_mode: "none"
logging.level: info
logging.to_files: true
logging.files:
path: /var/log/filebeat
name: filebeat
keepfiles: 7
permissions: 0644
</code></pre></td></tr><tr><td></td></tr><tr><td><p>Copy</p><pre><code>.\install-service-filebeat.ps1
</code></pre></td></tr><tr><td><p>Copy</p><pre><code>cd C:\filebeat-8.7.1-windows-x86_64
.\filebeat.exe -c .\filebeat.yml
</code></pre></td></tr><tr><td><p>Copy</p><pre><code>filebeat.inputs:
type: log
paths:
C:\agent.log
output.kafka:
hosts: ["$BOOTSTRAP_SERVERS"]
topic: $TOPIC
partition.round_robin:
reachable_only: false
required_acks: 1
compression: gzip
max_message_bytes: 1000000
ssl.certificate_authorities:
$PATH_FILE_VNG_TRUST_PEM
ssl.certificate: $PATH_FILE_USER_CER_PEM
ssl.key: $PATH_FILE_USER_KEY_PEM
ssl.verification_mode: "none"
logging.level: info
logging.to_files: true
logging.files:
path: /var/log/filebeat
name: filebeat
keepfiles: 7
permissions: 0644
</code></pre></td></tr><tr><td><p>Copy</p><pre><code>.\install-service-filebeat.ps1
</code></pre></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.vngcloud.vn/vng-cloud-document/vmonitor/dashboards/logs/lam-viec-voi-log-agent/cai-dat-log-agent-tren-cac-he-dieu-hanh/windows.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
