generated from NethServer/ns8-kickstart
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
systemd and configure: add loki, grafana and prometheus config
- Loading branch information
1 parent
b615ec4
commit 8f68243
Showing
6 changed files
with
114 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
[Unit] | ||
Description=Podman grafana.service | ||
BindsTo=controller.service | ||
After=promethus.service | ||
After=loki.service | ||
|
||
[Service] | ||
Environment=PODMAN_SYSTEMD_UNIT=%n | ||
EnvironmentFile=%S/state/environment | ||
Restart=always | ||
TimeoutStopSec=70 | ||
ExecStartPre=/bin/rm -f %t/grafana.pid %t/grafana.ctr-id | ||
ExecStart=/usr/bin/podman run \ | ||
--conmon-pidfile %t/grafana.pid \ | ||
--cidfile %t/grafana.ctr-id \ | ||
--cgroups=no-conmon \ | ||
--pod-id-file %t/controller.pod-id \ | ||
--replace -d --name grafana \ | ||
--volume grafana-storage:/var/lib/grafana:z \ | ||
--network=host \ | ||
--env-file=%S/state/grafana.env \ | ||
--env-file=%S/state/config.env \ | ||
${GRAFANA_IMAGE} | ||
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/grafana.ctr-id -t 10 | ||
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/grafana.ctr-id | ||
PIDFile=%t/grafana.pid | ||
Type=forking | ||
|
||
[Install] | ||
WantedBy=default.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
[Unit] | ||
Description=Podman loki.service | ||
BindsTo=controller.service | ||
Before=promtail.service | ||
|
||
[Service] | ||
Environment=PODMAN_SYSTEMD_UNIT=%n | ||
EnvironmentFile=%S/state/environment | ||
Restart=always | ||
TimeoutStopSec=70 | ||
ExecStartPre=/bin/rm -f %t/loki.pid %t/loki.ctr-id | ||
ExecStart=/usr/bin/podman run \ | ||
--conmon-pidfile %t/loki.pid \ | ||
--cidfile %t/loki.ctr-id \ | ||
--cgroups=no-conmon \ | ||
--pod-id-file %t/controller.pod-id \ | ||
--replace -d --name loki \ | ||
--volume=loki-data:/loki:z \ | ||
--network=host \ | ||
--env-file=%S/state/loki.env \ | ||
--env-file=%S/state/config.env \ | ||
${LOKI_IMAGE} \ | ||
-config.file=/etc/loki/local-config.yaml \ | ||
-log.level warn | ||
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/loki.ctr-id -t 10 | ||
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/loki.ctr-id | ||
PIDFile=%t/loki.pid | ||
Type=forking | ||
|
||
[Install] | ||
WantedBy=default.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
[Unit] | ||
Description=Podman prometheus.service | ||
BindsTo=controller.service | ||
After=vpn.service | ||
|
||
[Service] | ||
Environment=PODMAN_SYSTEMD_UNIT=%n | ||
EnvironmentFile=%S/state/environment | ||
WorkingDirectory=%S/state | ||
Restart=always | ||
TimeoutStopSec=70 | ||
ExecStartPre=/bin/rm -f %t/prometheus.pid %t/prometheus.ctr-id | ||
ExecStartPre=/usr/bin/mkdir -vp %S/state/prometheus.d | ||
ExecStart=/usr/bin/podman run \ | ||
--conmon-pidfile %t/prometheus.pid \ | ||
--cidfile %t/prometheus.ctr-id \ | ||
--cgroups=no-conmon \ | ||
--pod-id-file %t/controller.pod-id \ | ||
--replace -d --name prometheus \ | ||
--volume=%S/state/prometheus.yml:/prometheus/prometheus.yml:z \ | ||
--volume=./prometheus.d/:/prometheus/prometheus.d/:z \ | ||
--volume=prometheus-data:/prometheus:z \ | ||
--network=host \ | ||
--env-file=%S/state/prometheus.env \ | ||
--env-file=%S/state/config.env \ | ||
${PROMETHEUS_IMAGE} | ||
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/prometheus.ctr-id -t 10 | ||
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/prometheus.ctr-id | ||
PIDFile=%t/prometheus.pid | ||
Type=forking | ||
|
||
[Install] | ||
WantedBy=default.target |