victorialogs: init at 1.24.0 (#418806)

Yorick cb6adfec d90e42c5

Changed files
+109 -9
doc
release-notes
nixos
doc
manual
release-notes
modules
services
databases
tests
pkgs
by-name
vi
victorialogs
victoriametrics
vm
vmagent
+2
doc/release-notes/rl-2511.section.md
···
- `space-orbit` package has been removed due to lack of upstream maintenance. Debian upstream stopped tracking it in 2011.
- `command-not-found` package is now disabled by default; it works only for nix-channels based systems, and requires setup for it to work.
+
- `victoriametrics` no longer contains VictoriaLogs components. These have been separated into the new package `victorialogs`.
+
- `gnome-keyring` no longer ships with an SSH agent anymore because it has been deprecated upstream. You should use `gcr_4` instead, which provides the same features. More information on why this was done can be found on [the relevant GCR upstream PR](https://gitlab.gnome.org/GNOME/gcr/-/merge_requests/67).
- `lima` package now only includes the guest agent for the host's architecture by default. If your guest VM's architecture differs from your Lima host's, you'll need to enable the `lima-additional-guestagents` package by setting `withAdditionalGuestAgents = true` when overriding lima with this input.
+2
nixos/doc/manual/release-notes/rl-2511.section.md
···
- `vmalert` now supports multiple instances with the option `services.vmalert.instances."".enable`
+
- [`services.victorialogs.package`](#opt-services.victorialogs.package) now defaults to `victorialogs`, as `victoriametrics` no longer contains the VictoriaLogs binaries.
+
- The `wstunnel` module was converted to RFC42-style settings, you will need to update your NixOS config if you make use of this module.
## Other Notable Changes {#sec-release-25.11-notable-changes}
+1 -1
nixos/modules/services/databases/victorialogs.nix
···
{
options.services.victorialogs = {
enable = mkEnableOption "VictoriaLogs is an open source user-friendly database for logs from VictoriaMetrics";
-
package = mkPackageOption pkgs "victoriametrics" { };
+
package = mkPackageOption pkgs "victorialogs" { };
listenAddress = mkOption {
default = ":9428";
type = types.str;
+1
nixos/tests/all-tests.nix
···
vector = import ./vector { inherit runTest; };
velocity = runTest ./velocity.nix;
vengi-tools = runTest ./vengi-tools.nix;
+
victorialogs = runTest ./victorialogs.nix;
victoriametrics = handleTest ./victoriametrics { };
vikunja = runTest ./vikunja.nix;
virtualbox = handleTestOn [ "x86_64-linux" ] ./virtualbox.nix { };
+26
nixos/tests/victorialogs.nix
···
+
{ lib, ... }:
+
{
+
name = "victorialogs";
+
meta.maintainers = with lib.maintainers; [ marie ];
+
+
nodes.machine =
+
{ pkgs, ... }:
+
{
+
services.victorialogs.enable = true;
+
+
services.journald.upload = {
+
enable = true;
+
settings = {
+
Upload.URL = "http://localhost:9428/insert/journald";
+
};
+
};
+
environment.systemPackages = [ pkgs.curl ];
+
};
+
+
testScript = ''
+
machine.wait_for_unit("victorialogs.service")
+
+
machine.succeed("echo 'meow' | systemd-cat -p info")
+
machine.wait_until_succeeds("curl --fail http://localhost:9428/select/logsql/query -d 'query=\"meow\"' | grep meow")
+
'';
+
}
+77
pkgs/by-name/vi/victorialogs/package.nix
···
+
{
+
lib,
+
buildGoModule,
+
fetchFromGitHub,
+
nix-update-script,
+
nixosTests,
+
}:
+
+
buildGoModule (finalAttrs: {
+
pname = "VictoriaLogs";
+
version = "1.24.0";
+
+
src = fetchFromGitHub {
+
owner = "VictoriaMetrics";
+
repo = "VictoriaMetrics";
+
tag = "v${finalAttrs.version}-victorialogs";
+
hash = "sha256-E52hvxazzbz9FcPFZFcRHs2vVg6fJJQ8HsieQovQSi4=";
+
};
+
+
vendorHash = null;
+
+
subPackages = [
+
"app/victoria-logs"
+
"app/vlinsert"
+
"app/vlselect"
+
"app/vlstorage"
+
"app/vlogsgenerator"
+
"app/vlogscli"
+
];
+
+
postPatch = ''
+
# main module (github.com/VictoriaMetrics/VictoriaMetrics) does not contain package
+
# github.com/VictoriaMetrics/VictoriaMetrics/app/vmui/packages/vmui/web
+
#
+
# This appears to be some kind of test server for development purposes only.
+
# rm -f app/vmui/packages/vmui/web/{go.mod,main.go}
+
+
# Increase timeouts in tests to prevent failure on heavily loaded builders
+
substituteInPlace lib/storage/storage_test.go \
+
--replace-fail "time.After(10 " "time.After(120 " \
+
--replace-fail "time.NewTimer(30 " "time.NewTimer(120 " \
+
--replace-fail "time.NewTimer(time.Second * 10)" "time.NewTimer(time.Second * 120)" \
+
'';
+
+
ldflags = [
+
"-s"
+
"-w"
+
"-X github.com/VictoriaMetrics/VictoriaMetrics/lib/buildinfo.Version=${finalAttrs.version}"
+
];
+
+
preCheck = ''
+
# `lib/querytracer/tracer_test.go` expects `buildinfo.Version` to be unset
+
export ldflags=''${ldflags//=${finalAttrs.version}/=}
+
'';
+
+
__darwinAllowLocalNetworking = true;
+
+
passthru = {
+
tests = {
+
inherit (nixosTests)
+
victorialogs
+
;
+
};
+
updateScript = nix-update-script {
+
extraArgs = [ "--version-regex=(.*)-victorialogs" ];
+
};
+
};
+
+
meta = {
+
homepage = "https://docs.victoriametrics.com/victorialogs/";
+
description = "User friendly log database from VictoriaMetrics";
+
license = lib.licenses.asl20;
+
maintainers = with lib.maintainers; [ marie ];
+
changelog = "https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/${finalAttrs.src.tag}";
+
mainProgram = "victoria-logs";
+
};
+
})
-7
pkgs/by-name/vi/victoriametrics/package.nix
···
withVmAuth ? true, # HTTP proxy for authentication
withBackupTools ? true, # vmbackup, vmrestore
withVmctl ? true, # vmctl is used to migrate time series
-
withVictoriaLogs ? true, # logs server
}:
buildGoModule (finalAttrs: {
···
++ lib.optionals withBackupTools [
"app/vmbackup"
"app/vmrestore"
-
]
-
++ lib.optionals withVictoriaLogs [
-
"app/victoria-logs"
-
"app/vlinsert"
-
"app/vlselect"
-
"app/vlstorage"
];
postPatch = ''
-1
pkgs/by-name/vm/vmagent/package.nix
···
lib.addMetaAttrs { mainProgram = "vmagent"; } (
victoriametrics.override {
withServer = false;
-
withVictoriaLogs = false;
withVmAlert = false;
withVmAuth = false;
withBackupTools = false;