mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
nixos/journalbeat: remove support for versions < 6
nixos no longer ships journalbeat 5 and hasn't since at least 20.09. remove checks for older versions from the module.
This commit is contained in:
parent
6d80d3c964
commit
70b105d1d0
1 changed files with 1 additions and 15 deletions
|
@ -5,14 +5,10 @@ with lib;
|
||||||
let
|
let
|
||||||
cfg = config.services.journalbeat;
|
cfg = config.services.journalbeat;
|
||||||
|
|
||||||
lt6 = builtins.compareVersions cfg.package.version "6" < 0;
|
|
||||||
|
|
||||||
journalbeatYml = pkgs.writeText "journalbeat.yml" ''
|
journalbeatYml = pkgs.writeText "journalbeat.yml" ''
|
||||||
name: ${cfg.name}
|
name: ${cfg.name}
|
||||||
tags: ${builtins.toJSON cfg.tags}
|
tags: ${builtins.toJSON cfg.tags}
|
||||||
|
|
||||||
${optionalString lt6 "journalbeat.cursor_state_file: /var/lib/${cfg.stateDir}/cursor-state"}
|
|
||||||
|
|
||||||
${cfg.extraConfig}
|
${cfg.extraConfig}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -58,17 +54,7 @@ in
|
||||||
|
|
||||||
extraConfig = mkOption {
|
extraConfig = mkOption {
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
default = optionalString lt6 ''
|
default = "";
|
||||||
journalbeat:
|
|
||||||
seek_position: cursor
|
|
||||||
cursor_seek_fallback: tail
|
|
||||||
write_cursor_state: true
|
|
||||||
cursor_flush_period: 5s
|
|
||||||
clean_field_names: true
|
|
||||||
convert_to_numbers: false
|
|
||||||
move_metadata_to_field: journal
|
|
||||||
default_type: journal
|
|
||||||
'';
|
|
||||||
description = "Any other configuration options you want to add";
|
description = "Any other configuration options you want to add";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue