# Cài đặt Log Agent trên các hệ điều hành

#### Chuẩn bị kết nối cài agent

* Nếu bạn có đầy đủ kết nối ra internet là cách tốt nhất để khi cài cài đặt agent đỡ gặp lỗi.
* Nếu phải cài qua proxy hoặc firewall. Mở policy cho phép kết nối tới các địa chỉ sau:

<table data-header-hidden><thead><tr><th></th></tr></thead><tbody><tr><td><pre><code># filebeat / logstash 
https://artifacts.elastic.co
# fluentd 
https://toolbelt.treasuredata.com 
https://packages.treasuredata.com
# fluentbit
https://packages.fluentbit.io
# vector
https://repositories.timber.io
</code></pre></td></tr></tbody></table>

* Nếu phải cài hoàn toàn offline, chúng tôi khuyên bạn tải filebeat. Các agent khác như fluentbit, fluentd, logstash, … có thể cần thêm các gói phụ thuộc phức tạp. Tải sẵn filebeat về máy tại địa chỉ:

<table data-header-hidden><thead><tr><th></th></tr></thead><tbody><tr><td><pre><code># debian, ubuntu
https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-8.6.0-amd64.deb
# fedora, centos
https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-8.6.0-x86_64.rpm
# windows
https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-8.7.0-windows-x86_64.msi
</code></pre></td></tr></tbody></table>

* Sau khi tải agent xong, kết nối này có thể đóng. Bạn vẫn cần duy trì kết nối đẩy log.


---

# Agent Instructions: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
