Service Prometheus
This commit is contained in:
@@ -34,6 +34,39 @@ mkdir /var/lib/prometheus
|
|||||||
chown -R prometheus:prometheus /var/lib/prometheus
|
chown -R prometheus:prometheus /var/lib/prometheus
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Créer le service
|
||||||
|
|
||||||
|
```shell
|
||||||
|
nano /etc/systemd/system/prometheus.service
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
[Unit]
|
||||||
|
Description=Prometheus Monitoring
|
||||||
|
Wants=network-online.target
|
||||||
|
After=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=prometheus
|
||||||
|
Group=prometheus
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/usr/local/bin/prometheus \
|
||||||
|
--config.file /etc/prometheus/prometheus.yml \
|
||||||
|
--storage.tsdb.path /var/lib/prometheus/ \
|
||||||
|
--web.console.templates=/etc/prometheus/consoles \
|
||||||
|
--web.console.libraries=/etc/prometheus/console_libraries
|
||||||
|
Restart=always
|
||||||
|
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
```
|
||||||
|
|
||||||
|
```shell
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl enable --now prometheus
|
||||||
|
```
|
||||||
|
|
||||||
## Raspberry Pi 3B+
|
## Raspberry Pi 3B+
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
|||||||
Reference in New Issue
Block a user