monitorix(8)

πŸ’– monitorix(8) β€” the Monitorix collector daemon, bestie edition πŸ’–

okay so you found monitorix(8) in the manual and you're like "what even is this" β€” don't worry, I got you. It's the Monitorix collector daemon, a lightweight system monitoring tool, and honestly it's kind of iconic. Let's go ✨


🌸 SYNOPSIS 🌸

monitorix -c configfile [-p pidfile] [-d none | graph[,graph] | all]
[-v] [-n] [-u] [-s splitpolicy] [-e
report=<timeframe>,graphs=<graph>[+graph][+graph...],to=<email>]

like, yes, that's a lot of brackets, but it's giving "choose your own adventure" and we love that for us πŸ¦‹


πŸ‘‘ DESCRIPTION πŸ‘‘

So. This Perl daemon starts up the main Monitorix process, and what that process does is gather statistics about the system it's running on and store all that info in a set of RRD files. That's it, that's the whole job. no cap, it just vibes there collecting data πŸ’…


✨ OPTIONS ✨

  • -c configfile β€” this is where you point it at the main configuration file. the default location changes depending on your OS, so pay attention bestie:
    • Linux: /etc/monitorix/monitorix.conf
    • FreeBSD: /usr/local/etc/monitorix.conf

also!! extra configuration files can live in /etc/monitorix/conf.d, and they get loaded right after the main config file β€” which means they override the previous options. so like, later files get the final say 🫢

  • -p pidfile β€” stores the daemon's process ID into whatever file you specify. classic PID-file behaviour, we stan.
  • -d none | graph[,graph] | all β€” this one logs more info about what monitorix is doing internally. the keys reflect whether the data collected has to be displayed in each case:
    • if you say all, the collected data of all enabled graphs gets shown.
    • if you say none, no collected data gets shown at all.
    • and you can also give a comma-separated list of graph names and only those graphs' collected data will show up.

for a reference of all the graph names, check out the option graph_name inside the monitorix.conf configuration file πŸ”₯

  • -v β€” displays version information. that's it. short and sweet.
  • -n β€” this argument stops Monitorix from daemonizing, which forces it to run in the foreground. super useful for debugging, ngl. like when you wanna actually watch what's happening instead of it sneaking off into the background πŸ’€
  • -u β€” this forces Monitorix to run under the regular user who started it. BUT (and this is the important part, don't skip it) you gotta make sure that user has write permissions to the directory and files pointed at by the options base_dir, base_lib and log_file β€” and that's for both monitorix and for the HTTP built-in server. also you should know that some graphs might not work, because only the root user is capable of getting those statistics. check the log files after starting Monitorix in this mode, fr fr πŸ‘€
  • -s splitpolicy β€” decides which part of a line in the config file counts as the key and which one counts as the value. the split policy accepts these values:
    • guess β€” which is the default
    • whitespace β€” causes Monitorix to split by whitespace
    • equalsign β€” causes it to split strictly by the equal sign
  • -e report=<timeframe>,graphs=<graph>[+graph][+graph...],to=<email> β€” this lets you send email reports unscheduled, meaning at literally any time you want. the best part? you don't need to stop your current Monitorix instance β€” just run a new one with the new -e parameter, and once the job is done it terminates itself without affecting your current Monitorix instance. main character energy, honestly πŸ‘‘

here's an example of sending an email report that includes the last day of the system, kernel and hptemp graphs to the user@example.com email address:

# monitorix -c </etc/monitorix/conf.d/local.conf> -e
report=daily,graphs=system+kern+hptemp,to=user@example.com
heads up bestie: this option requires you to have previously enabled the emailreports module. no module, no email πŸ’Œ

πŸŽ€ SIGNALS πŸŽ€

when it receives a SIGHUP, monitorix will close and reopen its log file β€” provided that it has a filename defined. this is useful in scripts that rotate and age log files. very demure, very mindful.

⚠️ note that the configuration file is not re-read. so don't expect a SIGHUP to magically reload your config, because it will not πŸ™ˆ

πŸ¦‹ FILES πŸ¦‹

the following set of files gets created on every startup:

  • <base_dir>/cgi/monitorix.conf.path β€” stores the path of configfile and other information.
  • <base_dir>/cgi/monitorix.hplog β€” stores the output of the hplog command.
  • <base_dir>/index.html β€” the HTML main page.

πŸ’œ AUTHOR πŸ’œ

Monitorix is written by Jordi Sanfeliu <jordi@fibranet.cat> β€” legend behaviour, honestly 🫢


Copyright Β© 2005-2024 Jordi Sanfeliu Licensed under the GNU General Public License version 2 (GPLv2).


⭐ SEE ALSO ⭐

monitorix.conf(5) β€” go read it, iykyk πŸ“–


and that's the whole page! this beauty is from Monitorix version 3.16.0, dated Nov 2024, and it's the monitorix(8) manual πŸŽ€ slay, you made it to the end, go monitor some systems bestie πŸ’–

πŸ“¦ where this page comes from