nixos/promtail,promtail: remove because promtail is EOL
Promtail reached its end of life on 2026-03-02. Its code has been removed by upstream with the release of grafana-loki 3.7.x.
This commit is contained in:
@@ -173,6 +173,10 @@ of pulling the upstream container image from Docker Hub. If you want the old beh
|
||||
If you need to rotate, a [3rd-party tool, `grafana-secretkey-rotation-tool`](https://github.com/erooke/grafana-secretkey-rotation-tool/tree/d9dc788902fa5185e15cb15ce6129f7237ab6138) is a tested option.
|
||||
When using a secret for this value, make sure to use [Grafana's variable expansion to inject secrets](https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#variable-expansion).
|
||||
|
||||
- `services.promtail` has been removed, as `promtail` reached its end of life.
|
||||
Consider migrating to [](#opt-services.alloy.enable), or, if you are looking for something light-weight, [](#opt-services.fluent-bit.enable).
|
||||
See <https://grafana.com/docs/alloy/latest/set-up/migrate/> or <https://docs.fluentbit.io/manual/data-pipeline/outputs/loki>.
|
||||
|
||||
- Ethercalc and its associated module have been removed, as the package is unmaintained and cannot be installed from source with npm now.
|
||||
|
||||
- `services.immich` no longer supports pgvecto.rs since the package has been removed from nixpkgs.
|
||||
|
||||
@@ -745,7 +745,6 @@
|
||||
./services/logging/logcheck.nix
|
||||
./services/logging/logrotate.nix
|
||||
./services/logging/logstash.nix
|
||||
./services/logging/promtail.nix
|
||||
./services/logging/rsyslogd.nix
|
||||
./services/logging/syslog-ng.nix
|
||||
./services/logging/syslogd.nix
|
||||
|
||||
@@ -221,6 +221,17 @@ in
|
||||
]
|
||||
"The grafana-agent module has been removed. Consider migrating to `grafana-alloy` (`services.alloy.enable`). See <https://grafana.com/docs/alloy/latest/set-up/migrate/>"
|
||||
)
|
||||
(mkRemovedOptionModule
|
||||
[
|
||||
"services"
|
||||
"promtail"
|
||||
]
|
||||
''
|
||||
The promtail module has been removed, as promtail reached its end of life.
|
||||
Consider migrating to `grafana-alloy` (`services.alloy.enable`), or, if you are looking for something light-weight, `fluent-bit` (`services.fluent-bit.enable`).
|
||||
See <https://grafana.com/docs/alloy/latest/set-up/migrate/> or <https://docs.fluentbit.io/manual/data-pipeline/outputs/loki>.
|
||||
''
|
||||
)
|
||||
(mkRemovedOptionModule [ "services" "homeassistant-satellite" ]
|
||||
"The `services.homeassistant-satellite` module has been replaced by `services.wyoming-satellite`."
|
||||
)
|
||||
|
||||
@@ -1,119 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.services.promtail;
|
||||
|
||||
format = pkgs.formats.json { };
|
||||
prettyJSON =
|
||||
conf:
|
||||
with lib;
|
||||
pipe conf [
|
||||
(flip removeAttrs [ "_module" ])
|
||||
(format.generate "promtail-config.json")
|
||||
];
|
||||
|
||||
allowSystemdJournal =
|
||||
cfg.configuration ? scrape_configs && lib.any (v: v ? journal) cfg.configuration.scrape_configs;
|
||||
|
||||
allowPositionsFile = !lib.hasPrefix "/var/cache/promtail" positionsFile;
|
||||
positionsFile = cfg.configuration.positions.filename;
|
||||
|
||||
configFile = if cfg.configFile != null then cfg.configFile else prettyJSON cfg.configuration;
|
||||
|
||||
in
|
||||
{
|
||||
options.services.promtail = with types; {
|
||||
enable = mkEnableOption "the Promtail ingresser";
|
||||
|
||||
configuration = mkOption {
|
||||
type = format.type;
|
||||
description = ''
|
||||
Specify the configuration for Promtail in Nix.
|
||||
This option will be ignored if `services.promtail.configFile` is defined.
|
||||
'';
|
||||
};
|
||||
|
||||
configFile = mkOption {
|
||||
type = nullOr path;
|
||||
default = null;
|
||||
description = ''
|
||||
Config file path for Promtail.
|
||||
If this option is defined, the value of `services.promtail.configuration` will be ignored.
|
||||
'';
|
||||
};
|
||||
|
||||
extraFlags = mkOption {
|
||||
type = listOf str;
|
||||
default = [ ];
|
||||
example = [ "--server.http-listen-port=3101" ];
|
||||
description = ''
|
||||
Specify a list of additional command line flags,
|
||||
which get escaped and are then passed to Loki.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.promtail.configuration.positions.filename = mkDefault "/var/cache/promtail/positions.yaml";
|
||||
|
||||
systemd.services.promtail = {
|
||||
description = "Promtail log ingress";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
stopIfChanged = false;
|
||||
|
||||
serviceConfig = {
|
||||
Restart = "on-failure";
|
||||
TimeoutStopSec = 10;
|
||||
|
||||
ExecStartPre = "${lib.getExe pkgs.promtail} -config.file=${configFile} -check-syntax";
|
||||
ExecStart = "${pkgs.promtail}/bin/promtail -config.file=${configFile} ${escapeShellArgs cfg.extraFlags}";
|
||||
|
||||
ProtectSystem = "strict";
|
||||
ProtectHome = true;
|
||||
PrivateTmp = true;
|
||||
PrivateDevices = true;
|
||||
ProtectKernelTunables = true;
|
||||
ProtectControlGroups = true;
|
||||
RestrictSUIDSGID = true;
|
||||
PrivateMounts = true;
|
||||
CacheDirectory = "promtail";
|
||||
ReadWritePaths = lib.optional allowPositionsFile (dirOf positionsFile);
|
||||
|
||||
User = "promtail";
|
||||
Group = "promtail";
|
||||
|
||||
CapabilityBoundingSet = "";
|
||||
NoNewPrivileges = true;
|
||||
|
||||
ProtectKernelModules = true;
|
||||
SystemCallArchitectures = "native";
|
||||
ProtectKernelLogs = true;
|
||||
ProtectClock = true;
|
||||
|
||||
LockPersonality = true;
|
||||
ProtectHostname = true;
|
||||
RestrictRealtime = true;
|
||||
MemoryDenyWriteExecute = true;
|
||||
PrivateUsers = true;
|
||||
|
||||
SupplementaryGroups = lib.optional allowSystemdJournal "systemd-journal";
|
||||
}
|
||||
// (optionalAttrs (!pkgs.stdenv.hostPlatform.isAarch64) {
|
||||
# FIXME: figure out why this breaks on aarch64
|
||||
SystemCallFilter = "@system-service";
|
||||
});
|
||||
};
|
||||
|
||||
users.groups.promtail = { };
|
||||
users.users.promtail = {
|
||||
description = "Promtail service user";
|
||||
isSystemUser = true;
|
||||
group = "promtail";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,12 +1,9 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
makeWrapper,
|
||||
nix-update-script,
|
||||
nixosTests,
|
||||
systemd,
|
||||
testers,
|
||||
grafana-loki,
|
||||
}:
|
||||
@@ -28,21 +25,10 @@ buildGoModule (finalAttrs: {
|
||||
# TODO split every executable into its own package
|
||||
"cmd/loki"
|
||||
"cmd/loki-canary"
|
||||
"clients/cmd/promtail"
|
||||
"cmd/logcli"
|
||||
"cmd/lokitool"
|
||||
];
|
||||
|
||||
tags = [ "promtail_journal_enabled" ];
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ systemd.dev ];
|
||||
|
||||
preFixup = lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
wrapProgram $out/bin/promtail \
|
||||
--prefix LD_LIBRARY_PATH : "${lib.getLib systemd}/lib"
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
tests = {
|
||||
inherit (nixosTests) loki;
|
||||
@@ -71,7 +57,7 @@ buildGoModule (finalAttrs: {
|
||||
|
||||
meta = {
|
||||
description = "Like Prometheus, but for logs";
|
||||
mainProgram = "promtail";
|
||||
mainProgram = "loki";
|
||||
license = with lib.licenses; [
|
||||
agpl3Only
|
||||
asl20
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
{ grafana-loki }:
|
||||
|
||||
grafana-loki.overrideAttrs (previousAttrs: {
|
||||
pname = "promtail";
|
||||
subPackages = [ "clients/cmd/promtail" ];
|
||||
env = previousAttrs.env or { } // {
|
||||
CGO_ENABLED = 1;
|
||||
};
|
||||
})
|
||||
@@ -1643,6 +1643,7 @@ mapAliases {
|
||||
proj_7 = throw "proj_7 has been removed, as it was broken and unused"; # Added 2025-09-16
|
||||
prometheus-dmarc-exporter = throw "'prometheus-dmarc-exporter' has been renamed to/replaced by 'dmarc-metrics-exporter'"; # Converted to throw 2025-10-27
|
||||
prometheus-dovecot-exporter = throw "'prometheus-dovecot-exporter' has been renamed to/replaced by 'dovecot_exporter'"; # Converted to throw 2025-10-27
|
||||
promtail = throw "promtail has been removed, as it reached its end of life. Consider migrating to 'grafana-alloy' or 'fluent-bit'"; # Added 2026-03-30
|
||||
protobuf3_21 = throw "'protobuf3_21' has been renamed to/replaced by 'protobuf_21'"; # Converted to throw 2025-10-27
|
||||
protobuf3_24 = throw "'protobuf_24' has been removed from nixpkgs. Consider using a more recent version of the protobuf library"; # Added 2025-07-14
|
||||
protobuf_24 = throw "'protobuf_24' has been removed from nixpkgs. Consider using a more recent version of the protobuf library"; # Added 2025-07-14
|
||||
|
||||
Reference in New Issue
Block a user