Commit Graph

23 Commits

Author SHA1 Message Date
Daniel Alder
903869d10c Fix "parameter not set" error
./muninlite: 651: INTERFACE_NAMES_OVERRIDE: parameter not set
2023-12-13 17:43:24 +01:00
Daniel Alder
c14b6ccaec Allow customizing the list of monitored network interfaces
This is a simple way to customize the selection of network interfaces. If INTERFACE_NAMES_OVERRIDE is set in muninlite.conf, that list is used instead of auto-detection. As muninlite.conf
itself is also a script, it is even possible to write a custom command.
This feature is helpful in environments with virtual machines or containers, like docker or lxc where there are lots of br-*, veth*, lxcbr* etc interfaces where monitoring doesn't make much
sense. I didn't find a way to reliably filter physical interfaces.
2023-12-13 15:23:02 +01:00
Lars Kruse
32d4362888 fix: do not interprete leading hyphens in commands as "echo" arguments
Previously an input token with a leading hyphen (e.g. "-n") could be
inadvertently interpreted by "echo" instead of being taken literally.

No further damage was possible, but this would have been unexpected.
2021-07-14 13:40:01 +02:00
Kim B. Heino
eef090a1ae muninlite: do not hardcode acceptable network interface names
Interface can be called f.ex. "enp0s31f6" in modern system with
predictable network names enabled. Allow any name instead of
list of hardcoded names.
2020-10-09 10:10:05 +03:00
Kim B. Heino
389c22a0de
muninlite: add support for minimal runtime configuration file (#10)
It's executed as shell script. For example, you can remove unwanted
plugin by adding following line to /etc/munin/muninlite.conf:

PLUGINS=${PLUGINS/ swap/}

It could also be used to add more plugins (with runtime on/off detection!),
although pluginsdir is the preferred way to do it.

It can also be used to override other hardcoded settings, like NTP_PEER or
DF_IGNORE_FILESYSTEM_REGEX.
2020-10-08 14:02:37 +02:00
Lars Kruse
00cfedfd92
Merge pull request #7 from kimheino/wireless
wireless: add new plugin to get info about OpenWRT's APs
2020-10-08 13:28:46 +02:00
Kim B. Heino
ebd0cca326
muninlite: do not crash if empty line is received (#8)
Trivial fix for the following error:

  root@naru:~# echo "" | ./muninlite
  ./muninlite: line 696: do_: not found
  root@naru:~#
2020-10-07 19:08:49 +02:00
Kim B. Heino
4bc2b62610 wireless: add new plugin to get info about OpenWRT's APs
Following info is returned, per AP:
- Signal strength (dBm)
- Number of associated clients
2020-10-07 13:20:00 +03:00
Lars Kruse
1b43f16454 Network interface names: tolerate more than one hyphen
Previously the handling of network interface names allowed something
like "foo-bar", but failed over "foo-bar-baz".

Thanks to Kai-Uwe Eckhardt.
2020-04-12 15:53:48 +02:00
Lars Kruse
4b484f6f99 Tolerate plugin filenames containing special characters
We may only allow characters allowed in shell function names.
2020-02-09 02:21:17 +01:00
Lars Kruse
b039f7c1c8 Fix remaining spelling errors 2020-02-09 02:10:41 +01:00
Lars Kruse
829f230b9b CHange default plugin directory to /etc/munin/plugins
This path is also used by the official `munin-node` implementation.
2020-02-09 00:45:59 +01:00
Lars Kruse
9cca1e479a Change encoding of main script to UTF-8 2020-02-08 23:39:44 +01:00
Lars Kruse
a0d4d74f8d hostname: fall back to /proc/sys/kernel/hostname (linux) if "hostname" is missing
This provides a usable alternative on OpenWrt.
2020-02-08 23:39:44 +01:00
Lars Kruse
0662cfc7e8 Enable "exit-on-error" and "error-on-unset" for shell execution 2020-02-08 23:39:44 +01:00
Lars Kruse
60b16f4121 Plugin netstat: adjust filter to newer netstat version
Newer versions of netstat use "active connection openings" instead of
"active connections".
2020-02-08 23:39:44 +01:00
Lars Kruse
e439fd79a1 Use "read" without escaping 2020-02-08 23:39:44 +01:00
Lars Kruse
14251d6791 Add missing quoting 2020-02-08 23:39:44 +01:00
Lars Kruse
c2108276eb Improve parsing of commands and plugin names
Previously special characters for regular expressions (e.g. ".") could
work around the name check (without being able to cause harm).
2020-02-08 23:39:44 +01:00
Lars Kruse
281578664c Command "version": fix spelling of "muninlite" 2020-02-08 23:39:44 +01:00
Lars Kruse
b1230609dc Command "list": sort plugins by name and remove surrounding whitespace
Previously the plugin names were not sorted and a leading space was
emitted.
2020-02-08 23:39:44 +01:00
Lars Kruse
02b2eb861e Plugin directory: use "find" instead of "ls"
Relying on shell globbing is discouraged.
2020-02-08 23:39:44 +01:00
Lars Kruse
f4518e5375 Change name of executable from "munin-node" to "muninlite"
Previously MuninLite tried to create a drop-in-replacement for
munin-node by using the same name.  But MuninLite behaves differently
and may even be used in parallel to a regular munin-node setup on a host,
thus it should use a distinct name.
2020-02-08 23:39:44 +01:00