Received: from mail-ua1-x92b.google.com (mail-ua1-x92b.google.com [IPv6:2607:f8b0:4864:20::92b]) by gbr-app-1.alpinelinux.org (Postfix) with ESMTPS id 226D1225BB1 for <~alpine/devel@lists.alpinelinux.org>; Tue, 9 Jan 2024 15:24:30 +0000 (UTC) Received: by mail-ua1-x92b.google.com with SMTP id a1e0cc1a2514c-7ce3a5f73bdso621813241.0 for <~alpine/devel@lists.alpinelinux.org>; Tue, 09 Jan 2024 07:24:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704813867; x=1705418667; darn=lists.alpinelinux.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=s8m3QJbb2hcP5o+t4TeVBDXRvHuyoFI4/d8mC3S9/2o=; b=LPD7cqSHxceWTBDSocrWEvCPXvSjpIVP2r2ug2kThcD21zFfQFnmfMAiSefrKi/sJd DRkilqtPewTK3d+YQ4+o3wyToXhm6yjSen14xokrg+ylH507ewzcvN22xRrCkmXCa7yI ZHPyQMkI805gXLuJNv1to/jN9OI2xHb29882P48QVrouCg4rY+xpRwEAegX+XxXZmUuF 1YFpH88O7LsmKrKbrfYZJ8ZwUIr8dUKjmkD4amurY3q0ziwRDwXzPIBxJ9XE6JSr+zRH eO2xGU7CCuGTgZrgxgNKcd2uN1qNg0ZFoSU38msuckCIZqzYcnFZG6g526lSdJ7lHbKt +hRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704813867; x=1705418667; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=s8m3QJbb2hcP5o+t4TeVBDXRvHuyoFI4/d8mC3S9/2o=; b=qc9kWLM51PPK2A/j8Y1ZMsJ2qzeiNH3ru+G6vwwRuHEZJ07SbaEWEA9HzCvsZBZBli HdTfqzB6o8UJVnpB+85GzP4LkTKkx4f24D77AMLOgCZFtuq84OEvl7/+W+cCP4SvJ+tJ fU/DOotM/M2xtpM1BfzX9eg122z49OF8vfuchvb8hUNmbrhDjRRklqB9D0Nm16nTPE5f H5lIWntwMI7Fc9W4mI2ncZHiUCQgjQwtKYVQZfUN/MZY1Zx7PNMQdOPvZDT/VqqQJm9n D+C8kzeZsEUKK8CjQcM1KoEC8pFV1+z8tbOEnZ4XKY9hTYTD0iLOhc+NyQr9zTbwqBzf XCmA== X-Gm-Message-State: AOJu0YyTwaxlJGLZsAbD5DsddYHtCOnw3GdmvpqUcEVJnR8ZPcvAtgTh KgElQooa7PzhlcrgoQlcbvUkAsS8Q8fNhpTct65BuGwuvi0= X-Google-Smtp-Source: AGHT+IGDflHm8La0VwiD2d39agfAjv4BxyXaNs8HM9tnf2zpRsrRuKSn0wIYK7OciKeWt0sv5oyYRs7Izc/6HEevxG8= X-Received: by 2002:a05:6122:3c50:b0:4b7:17f7:c0f4 with SMTP id fv16-20020a0561223c5000b004b717f7c0f4mr2471896vkb.27.1704813866995; Tue, 09 Jan 2024 07:24:26 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Konstantin Kulikov Date: Tue, 9 Jan 2024 18:24:16 +0300 Message-ID: Subject: Re: logrotation best practice To: faustin@fala.red Cc: ~alpine/devel@lists.alpinelinux.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Logging is still annoying. Best case is when an application supports writing to a file with O_APPEND and can reopen it on signal using open/dup2/close. If it can't, openrc gives you 2 options output_log - this redirects to a file and can only be rotated using a racy copy/truncate approach (truncate option in logrotate). output_logger - this redirects to stdin of another program, not supported by supervise-daemon and your application will stall if logger program crashes. This is the approach I use in my services. % cat /etc/conf.d/victoria-metrics ... error_logger=3D"logger -t $RC_SVCNAME" rc_need=3Dlogger On Mon, Jan 8, 2024 at 2:53=E2=80=AFPM Faustin Lammler w= rote: > > Hi! > First post here so, sorry if this is the wrong place. > > I recently migrated from Debian to Alpine Linux for my daily driver and > I am so far absolutely happy with it, thank you all for this great OS! > > My question is about logrotation on Alpine Linux (so, not in the context > of containers). I discovered that the zabbix agent2 package > (zabbix-agent2-6.4.10-r0) does not provide a logrotate configuration. Is > this normal? What's Alpine's approach with respect to log rotation? > > I could not find any documentation so far. > > Thanks and I wish you all the best for 2024! > > -- > Faustin > GPG: F652 BCD1 1AA8 8975 F010 48A5 390A 2F27 832A 5C79