Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow customizing the list of monitored network interfaces #18

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions muninlite.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# the following variables are added to the top of the assembled muninlite script
NTP_PEER="pool.ntp.org"
DF_IGNORE_FILESYSTEM_REGEX="(none|unknown|rootfs|iso9660|squashfs|udf|romfs|ramfs|debugfs|cgroup_root|devtmpfs)"

#INTERFACE_NAMES_OVERRIDE="eth0"
#INTERFACE_NAMES_OVERRIDE="$(sed 's/^ *//; s/:.*$//; / /d' /proc/net/dev | grep -P '^(eth|wlan|en)')"
daald marked this conversation as resolved.
Show resolved Hide resolved
6 changes: 5 additions & 1 deletion muninlite.in
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ RES=""
for PLUG in $PLUGINS; do
case "$PLUG" in
if_|if_err_)
interface_names=$(sed 's/^ *//; s/:.*$//; / /d; /^lo$/d' /proc/net/dev)
if [ -z "${INTERFACE_NAMES_OVERRIDE:-}" ]; then
interface_names=$(sed 's/^ *//; s/:.*$//; / /d; /^lo$/d' /proc/net/dev)
else
interface_names="$INTERFACE_NAMES_OVERRIDE"
fi
for INTER in $interface_names; do
INTERRES=$(echo "$INTER" | sed -e 's/\./VLAN/' -e 's/\-/_/g')
RES="$RES ${PLUG}${INTERRES}"
Expand Down