mirror of
https://github.com/netdata/netdata.git
synced 2025-04-06 22:38:55 +00:00
docs: add "For Netdata running in a Docker container" to go.d/smartcl (#17980)
This commit is contained in:
parent
74d42b50fa
commit
37133ee0e6
2 changed files with 28 additions and 0 deletions
|
@ -372,6 +372,8 @@ to Caddyfile.
|
|||
|
||||
### With Docker socket proxy
|
||||
|
||||
> **Note**: Using Netdata with a Docker socket proxy might have some features not working as expected. It hasn't been fully tested by the Netdata team.
|
||||
|
||||
Deploy a Docker socket proxy that accepts and filters out requests using something like
|
||||
[HAProxy](/docs/netdata-agent/configuration/running-the-netdata-agent-behind-a-reverse-proxy/Running-behind-haproxy.md) or
|
||||
[CetusGuard](https://github.com/hectorm/cetusguard) so that it restricts connections to read-only access to
|
||||
|
|
|
@ -52,6 +52,32 @@ modules:
|
|||
- title: Install smartmontools (v7.0+)
|
||||
description: |
|
||||
Install `smartmontools` version 7.0 or later using your distribution's package manager. Version 7.0 introduced the `--json` output mode, which is required for this collector to function properly.
|
||||
- title: For Netdata running in a Docker container
|
||||
description: |
|
||||
Netdata requires the `SYS_RAWIO` capability and access to the storage devices to run the `smartctl` collector inside a Docker container. Here's how you can achieve this:
|
||||
|
||||
- `docker run`
|
||||
|
||||
```bash
|
||||
docker run --cap-add SYS_RAWIO --device /dev/sda:/dev/sda ...
|
||||
```
|
||||
|
||||
- `docker-compose.yml`
|
||||
|
||||
```yaml
|
||||
services:
|
||||
netdata:
|
||||
cap_add:
|
||||
- SYS_PTRACE
|
||||
- SYS_ADMIN
|
||||
- SYS_RAWIO # smartctl
|
||||
devices:
|
||||
- "/dev/sda:/dev/sda"
|
||||
```
|
||||
|
||||
> **Multiple Devices**: These examples only show mapping of one device (/dev/sda). You'll need to add additional `--device` options (in docker run) or entries in the `devices` list (in docker-compose.yml) for each storage device you want Netdata's smartctl collector to monitor.
|
||||
|
||||
> **NVMe Devices**: Do not map NVMe devices using this method. Netdata uses a [dedicated collector](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/nvme#readme) to monitor NVMe devices.
|
||||
configuration:
|
||||
file:
|
||||
name: go.d/smartctl.conf
|
||||
|
|
Loading…
Add table
Reference in a new issue