-
Notifications
You must be signed in to change notification settings - Fork 171
Description
I wanted to ask for your general sentiment and insights on creating a Nix package / Nixos module for Monitorix. @mikaku
With your approval, I intend to create a nixpkgs pull request.
This is the current state of my work.
Questions
Making Monitorix' Perl modules available correctly
Monitorix' dependencies are fetched here (package.nix#13) which then replaces the /usr/bin/env perl shebang with /nix/store/<hash>-perl-5.40.0-env/bin/perl
I think that is the standard for Nixos, what I'm less sure about are the modules in /lib. (e.g. /lib/Monitorix.pm)
Those I make available by prefixing the PERL5LIB variable (package.nix#97).
Is that reasonable? (maybe instead, they should be installed into the perl environment directly?)
Runtime application dependencies
The packages that are on the PATH at runtime are listed here (module.nix#103)
Here's the full list of files on the PATH: (long-ish, pastebin)
Did I miss any? (if this is an unreasonable thing to ask, disregard it)
Expected / regular log output
I have had Monitorix up for the past 4 days, with minimal changes to the default config:
<httpd_builtin>
log_file =
port = 10221
</httpd_builtin>
log_file =
include_dir =
<graph_enable>
disk = "y"
serv = "n"
</graph_enable>
# .. various small configuration changes for the 'disk', 'fs', 'net' and 'port' graphs
After the initial startup, the log is dead silent:
Feb 04 04:05:31 acerCool systemd[1]: Starting Monitorix...
Feb 04 04:05:31 acerCool monitorix[166499]: Wed Feb 4 04:05:31 2026 - Starting Monitorix version 3.16.0 (pid 166499).
Feb 04 04:05:31 acerCool monitorix[166499]: Wed Feb 4 04:05:31 2026 - Loaded main configuration file '/nix/store/2is9p149559imqdxjg9xs6cx28ihmm30-monitorix.conf'.
Feb 04 04:05:31 acerCool systemd[1]: Started Monitorix.
Feb 04 04:05:31 acerCool monitorix[166499]: Wed Feb 4 04:05:31 2026 - Initializing graphs.
Feb 04 04:05:31 acerCool monitorix[166499]: Wed Feb 4 04:05:31 2026 - Generating the 'index.html' file.
Feb 04 04:06:00 acerCool monitorix[166499]: Wed Feb 4 04:05:31 2026 - Started HTTP built-in server (pid 166727).
Feb 04 04:06:00 acerCool monitorix[166499]: Wed Feb 4 04:05:31 2026 - Ok, ready.
Feb 04 04:06:00 acerCool monitorix[166727]: Wed Feb 4 04:05:31 2026 - WARNING: the HTTP built-in server has authentication disabled.
Feb 04 04:06:00 acerCool monitorix[166727]: HTTPServer: You can connect to your server at http://localhost:10221/
And shutdown:
Feb 08 21:16:51 acerCool monitorix[166499]: Sun Feb 8 21:16:51 2026 - SIGTERM caught.
Feb 08 21:16:51 acerCool systemd[1]: Stopping Monitorix...
Feb 08 21:16:52 acerCool monitorix[166499]: Sun Feb 8 21:16:52 2026 - Exiting.
Feb 08 21:16:52 acerCool systemd[1]: monitorix.service: Deactivated successfully.
Feb 08 21:16:52 acerCool systemd[1]: Stopped Monitorix.
Feb 08 21:16:52 acerCool systemd[1]: monitorix.service: Consumed 21min 16.331s CPU time, 220.3M memory peak, 6.3M read from disk, 6.2G written to disk, 49.8M incoming IP traffic, 114.9M outgoing IP traffic.
One part sticks out to me: 6.2G written to disk.
Is this abnormally high? /var/lib/monitorix/ takes up only 52M