0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-10 08:07:34 +00:00

docs: add with-systemd-units-monitoring example to docker ()

This commit is contained in:
Ilya Mashchenko 2023-11-30 20:07:22 +02:00 committed by GitHub
parent 3ab4c07118
commit 81ceddc518
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -133,6 +133,34 @@ volumes:
> If you plan to Claim the node to Netdata Cloud, you can find the command with the right parameters by clicking the "
> Add Nodes" button in your Space's "Nodes" view.
### With systemd units monitoring
Monitoring systemd units requires mounting `/run/dbus`. This mount is not available on non-systemd systems, so we cannot
use it in the Recommended Way.
Mounting `/run/dbus` provides:
- [go.d/systemdunits](https://github.com/netdata/go.d.plugin/tree/master/modules/systemdunits#readme).
- Systemd-list-units function: information about all systemd units, including their active state, description, whether
they are enabled, and more.
<Tabs>
<TabItem value="docker_run" label="docker run">
<h3> Using the <code>docker run</code> command </h3>
Add `-v /run/dbus:/run/dbus:ro` to your `docker run`.
</TabItem>
<TabItem value="docker compose" label="docker-compose">
<h3> Using the <code>docker-compose</code> command</h3>
Add `- /run/dbus:/run/dbus:ro` to the netdata service `volumes`.
</TabItem>
</Tabs>
### With host-editable configuration
Use a [bind mount](https://docs.docker.com/storage/bind-mounts/) for `/etc/netdata` rather than a volume.