# 安裝NetDATA工具

## 以 netdata 強化 Proxmox VE 效能監視功能

{% embed url="<https://github.com/netdata/netdata>" %}

## 要在任何Linux系統（物理，虛擬，容器，IoT，邊緣）上從源代碼安裝Netdata並使其與最新的daily**版本**自動保持最新，請運行以下命令：

```
＃確保您為shell運行`bash`
bash

＃直接從GitHub原始碼安裝
bash <(curl -Ss https://my-netdata.io/kickstart.sh)

```

## docker 安裝

```
docker run -d --name=netdata \
  -p 19999:19999 \
  -v /etc/passwd:/host/etc/passwd:ro \
  -v /etc/group:/host/etc/group:ro \
  -v /proc:/host/proc:ro \
  -v /sys:/host/sys:ro \
  -v /var/run/docker.sock:/var/run/docker.sock:ro \
  --cap-add SYS_PTRACE \
  --security-opt apparmor=unconfined \
  netdata/netdata
```

## MongoDB backend[¶](https://docs.netdata.cloud/backends/mongodb/#mongodb-backend) <a href="#mongodb-backend" id="mongodb-backend"></a>

### Prerequisites[¶](https://docs.netdata.cloud/backends/mongodb/#prerequisites) <a href="#prerequisites" id="prerequisites"></a>

To use MongoDB as a backend, `libmongoc` 1.7.0 or higher should be [installed](http://mongoc.org/libmongoc/current/installing.html) first. Next, Netdata should be re-installed from the source. The installer will detect that the required libraries are now available.

### Configuration[¶](https://docs.netdata.cloud/backends/mongodb/#configuration) <a href="#configuration" id="configuration"></a>

To enable data sending to the MongoDB backend set the following options in `netdata.conf`:

```
[backend]
    enabled = yes
    type = mongodb
```

In the Netdata configuration directory run `./edit-config mongodb.conf` and set [MongoDB URI](https://docs.mongodb.com/manual/reference/connection-string/), database name, and collection name:

```
# URI
uri = mongodb://<hostname>

# database name
database = your_database_name

# collection name
collection = your_collection_name
```

The default socket timeout depends on the backend update interval. The timeout is 500 ms shorter than the interval (but not less than 1000 ms). You can alter the timeout using the `sockettimeoutms` MongoDB URI option.


---

# 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://kawsing.gitbook.io/opensystem/andoid-shou-ji/promoxve-zhong-xin-qi-ye-ji-si-fu-qi-jia-she-shi-zhan/an-zhuang-netdata-gong-ju.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.
