Updated documentation
This commit is contained in:
parent
9f9966928a
commit
34b7048d2f
16
README.md
16
README.md
@ -15,11 +15,8 @@ Prometheus exporter that monitors LXC, process and node metrics for Proxmox. Thi
|
||||
Also included is a Grafana dashboard tailored to the data exported by both components above.
|
||||
|
||||
# Installation
|
||||
**NOTE**: This is intended to be run on the host system. However, it is probably possible to run it in an LXC. This would require you to bind-mount the ```/proc``` directory of the pve node into the LXC, and point both node-exporter and proxmon components to read from the bind-mounted directory instead of the default ```/proc``` directory of the LXC. Aside from that, the installation process should be the same.
|
||||
|
||||
### Install steps on any PVE node you wish to monitor:
|
||||
1. Install git if you don't have it already
|
||||
```apt install git```
|
||||
1. Install dependencies needed to build
|
||||
```apt install git make gcc```
|
||||
2. Create a directory for ProxMon to live
|
||||
```mkdir /home/monitor```
|
||||
**NOTE**: This does not create a new user. This guide does not include configuring the service to run under a different user, and will by default run it under root. See **Customizing Services**.
|
||||
@ -40,6 +37,15 @@ The Makefile has various build targets that can be used for finer control over t
|
||||
2. Edit the service files in the ```systemd/``` directory to enable node-exporter features or change the ports of the components. If you would like to run these as non-root users, [ask ChatGPT](https://chatgpt.com/share/6830a1d9-5fe0-8012-abdd-076e78a12067).
|
||||
3. Install the service files: ```make install-services```. This will copy the service files from ```systemd/``` into ```/etc/systemd/system``` and will start the services in systemd. You can also use ```make reinstall-services``` if you have already installed the services and want to install updated versions of the service files.
|
||||
|
||||
|
||||
## Running inside an LXC
|
||||
This is intended to be run on the host system. However, it is probably possible to run it in an LXC. Setting up a privileged LXC would probably be the most straightforward, but an unprivileged should be possible. It would just be annoying to set up because you'd have to map UIDs/GIDs between the LXC and host.
|
||||
|
||||
Either way, you will need to bind-mount the hosts root directory into the LXC, and point both node-exporter and proxmon components to read from the bind-mounted directory instead of the default ```/proc``` directory of the LXC.
|
||||
|
||||
If for instance you bind-mounted the hosts root directory to ```/host``` in the LXC, you could add the startup parameter to node-exporter: ```--path.rootfs=/host```
|
||||
And the following startup parameter to proxmon: ```--path.rootfs /host```. See the **Customizing Services** section.
|
||||
|
||||
# Connecting
|
||||
|
||||
## Prometheus
|
||||
|
||||
@ -4,7 +4,7 @@ Description=Proxmox Process Monitor/Exporter
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=@WORKDIR@/bin/proxmon 9101
|
||||
ExecStart=@WORKDIR@/bin/proxmon --port 9101
|
||||
# Restart if the process crashes
|
||||
Restart=always
|
||||
# Wait 5 seconds before restarting
|
||||
|
||||
Loading…
Reference in New Issue
Block a user