Fix the Grafana Alloy
This commit is contained in:
parent
9363dc3b36
commit
21bf4848bb
1 changed files with 2 additions and 8 deletions
|
|
@ -210,19 +210,13 @@ in {
|
|||
|
||||
# Add a simple systemd service to run the Grafana Agent (Alloy)
|
||||
systemd.services.grafana-agent = {
|
||||
description = "Grafana Alloy - journal -> loki";
|
||||
description = "Grafana Alloy";
|
||||
wantedBy = ["multi-user.target"];
|
||||
|
||||
serviceConfig = {
|
||||
# Ensure persistent dir for positions exists
|
||||
ExecStartPre = ''
|
||||
mkdir -p /var/lib/grafana-agent
|
||||
chown root:root /var/lib/grafana-agent
|
||||
'';
|
||||
|
||||
# The grafana-agent binary provided by nixpkgs
|
||||
ExecStart = ''
|
||||
${pkgs.grafana-alloy}/bin/grafana-alloy --config.file /etc/alloy/config.alloy
|
||||
${pkgs.grafana-alloy}/bin/alloy --config.file /etc/alloy/config.alloy
|
||||
'';
|
||||
|
||||
Restart = "on-failure";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue