muninlite: update to 2.0.1
* follow upstream ressources to github * rename /usr/sbin/munin-node to /usr/sbin/muninlite (following the chane of upstream) * change plugin directory from /usr/sbin/munin-node-plugin.d/ to /etc/munin/plugins (compatible to upstream / munin-node) * all patches (except one OpenWrt-specific patch) were merged upstream Signed-off-by: Lars Kruse <devel@sumpfralle.de>
This commit is contained in:
parent
f0e94f3add
commit
e2788641aa
11 changed files with 18 additions and 155 deletions
|
@ -8,12 +8,14 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=muninlite
|
PKG_NAME:=muninlite
|
||||||
PKG_VERSION:=1.0.4
|
PKG_VERSION:=2.0.1
|
||||||
PKG_RELEASE:=10
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=@SF/$(PKG_NAME)
|
PKG_SOURCE_URL:=https://github.com/munin-monitoring/$(PKG_NAME)/releases/download/$(PKG_VERSION)/
|
||||||
PKG_HASH:=736482dd6d6849d014d975b1f5794f20dda6e123dbba2d8c2f169c8e787e6f7e
|
PKG_HASH:=8277ccd146b4fc5b57602dba3f5612c7d6f840b4c3ee2ff3756ff4b3d8527966
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=Jonathan McCrohan <jmccrohan@gmail.com>
|
||||||
PKG_LICENSE:=GPL-2.0-or-later
|
PKG_LICENSE:=GPL-2.0-or-later
|
||||||
PKG_LICENSE_FILES:=LICENSE
|
PKG_LICENSE_FILES:=LICENSE
|
||||||
|
|
||||||
|
@ -24,8 +26,7 @@ define Package/muninlite
|
||||||
CATEGORY:=Administration
|
CATEGORY:=Administration
|
||||||
DEPENDS:=+xinetd
|
DEPENDS:=+xinetd
|
||||||
TITLE:=Munin node implemented in shell
|
TITLE:=Munin node implemented in shell
|
||||||
URL:=http://sourceforge.net/projects/muninlite/
|
URL:=https://github.com/munin-monitoring/muninlite
|
||||||
PKG_MAINTAINER:=Jonathan McCrohan <jmccrohan@gmail.com>
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/muninlite/Default/description
|
define Package/muninlite/Default/description
|
||||||
|
@ -35,13 +36,14 @@ endef
|
||||||
|
|
||||||
define Package/muninlite/install
|
define Package/muninlite/install
|
||||||
$(INSTALL_DIR) $(1)/usr/sbin/
|
$(INSTALL_DIR) $(1)/usr/sbin/
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/munin-node $(1)/usr/sbin/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/muninlite $(1)/usr/sbin/
|
||||||
$(INSTALL_DIR) $(1)/etc/xinetd.d
|
$(INSTALL_DIR) $(1)/etc/xinetd.d
|
||||||
$(INSTALL_DATA) ./files/etc/xinetd.d/munin $(1)/etc/xinetd.d/
|
$(INSTALL_DATA) ./files/etc/xinetd.d/muninlite $(1)/etc/xinetd.d/
|
||||||
|
$(INSTALL_DIR) $(1)/etc/munin/plugins
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/muninlite/conffiles
|
define Package/muninlite/conffiles
|
||||||
/etc/xinetd.d/munin
|
/etc/xinetd.d/muninlite
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/Configure
|
define Build/Configure
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
service munin
|
service muninlite
|
||||||
{
|
{
|
||||||
socket_type = stream
|
socket_type = stream
|
||||||
protocol = tcp
|
protocol = tcp
|
||||||
wait = no
|
wait = no
|
||||||
user = root
|
user = root
|
||||||
group = root
|
group = root
|
||||||
server = /usr/sbin/munin-node
|
server = /usr/sbin/muninlite
|
||||||
disable = no
|
disable = no
|
||||||
}
|
}
|
|
@ -1,10 +0,0 @@
|
||||||
--- a/plugins/df
|
|
||||||
+++ b/plugins/df
|
|
||||||
@@ -19,6 +19,6 @@ fetch_df() {
|
|
||||||
do
|
|
||||||
PINFO=$(df -P $PART | tail -1);
|
|
||||||
PNAME=$(echo $PINFO | cut -d\ -f1 | sed 's/[\/.-]/_/g')
|
|
||||||
- echo "$PNAME.value" $(echo $PINFO | cut -f5 -d\ | sed -e 's/\%//g')
|
|
||||||
+ echo "$PNAME.value" $(echo $PINFO | sed -e 's/\%//g' -e 's/ */ /g' | cut -f5 -d' ')
|
|
||||||
done
|
|
||||||
}
|
|
|
@ -1,11 +1,11 @@
|
||||||
--- a/munin-node.in
|
--- a/muninlite.in
|
||||||
+++ b/munin-node.in
|
+++ b/muninlite.in
|
||||||
@@ -113,7 +113,7 @@ PLUGINS=$RES
|
@@ -113,7 +113,7 @@ PLUGINS=$RES
|
||||||
|
|
||||||
# ===== MAIN LOOP =====
|
# ===== MAIN LOOP =====
|
||||||
FUNCTIONS="list nodes config fetch version quit"
|
FUNCTIONS="list nodes config fetch version quit"
|
||||||
-HOSTNAME=$(hostname -f 2>/dev/null || hostname)
|
-HOSTNAME=$( { hostname -f || hostname || cat /proc/sys/kernel/hostname || echo "unknown"; } 2>/dev/null )
|
||||||
+HOSTNAME=$(/sbin/uci get "system.@system[0].hostname" 2>/dev/null || cat /proc/sys/kernel/hostname)
|
+HOSTNAME=$(/sbin/uci get "system.@system[0].hostname" 2>/dev/null || cat /proc/sys/kernel/hostname)
|
||||||
echo "# munin node at $HOSTNAME"
|
echo "# munin node at $HOSTNAME"
|
||||||
while read arg0 arg1
|
while read -r arg0 arg1
|
||||||
do
|
do
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
--- a/plugins/if_
|
|
||||||
+++ b/plugins/if_
|
|
||||||
@@ -15,10 +15,14 @@ config_if() {
|
|
||||||
echo "up.min 0"
|
|
||||||
echo "up.negative down"
|
|
||||||
echo "up.cdef up,8,*"
|
|
||||||
- if ethtool $1 | grep -q Speed; then
|
|
||||||
- MAX=$(($(ethtool $1 | grep Speed | sed -e 's/[[:space:]]\{1,\}/ /g' -e 's/^ //' -e 's/M.*//' | cut -d\ -f2) * 1000000))
|
|
||||||
- echo "up.max $MAX"
|
|
||||||
- echo "down.max $MAX"
|
|
||||||
+ if [ -n "$(which ethtool)" ]; then
|
|
||||||
+ if [ -x "$(which ethtool)" ]; then
|
|
||||||
+ if ethtool $1 | grep -q Speed; then
|
|
||||||
+ MAX=$(($(ethtool $1 | grep Speed | sed -e 's/[[:space:]]\{1,\}/ /g' -e 's/^ //' -e 's/M.*//' | cut -d\ -f2) * 1000000))
|
|
||||||
+ echo "up.max $MAX"
|
|
||||||
+ echo "down.max $MAX"
|
|
||||||
+ fi
|
|
||||||
+ fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
fetch_if() {
|
|
|
@ -1,12 +0,0 @@
|
||||||
--- a/plugins/uptime
|
|
||||||
+++ b/plugins/uptime
|
|
||||||
@@ -4,8 +4,7 @@ config_uptime() {
|
|
||||||
echo "graph_vlabel uptime in days"
|
|
||||||
echo "uptime.label uptime"
|
|
||||||
echo "uptime.draw AREA"
|
|
||||||
- echo "uptime.cdef uptime,86400,/"
|
|
||||||
}
|
|
||||||
fetch_uptime() {
|
|
||||||
- echo "uptime.value" $(cut -d\ -f1 /proc/uptime)
|
|
||||||
+ awk '{printf "uptime.value %.2f",$1/86400; print ""}' /proc/uptime
|
|
||||||
}
|
|
|
@ -1,20 +0,0 @@
|
||||||
--- a/munin-node.in
|
|
||||||
+++ b/munin-node.in
|
|
||||||
@@ -72,7 +72,7 @@ RES=""
|
|
||||||
for PLUG in $PLUGINS
|
|
||||||
do
|
|
||||||
if [ "$PLUG" = "if_" ]; then
|
|
||||||
- for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g');
|
|
||||||
+ for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g');
|
|
||||||
do
|
|
||||||
INTERRES=$(echo $INTER | sed 's/\./VLAN/')
|
|
||||||
RES="$RES if_$INTERRES"
|
|
||||||
@@ -80,7 +80,7 @@ do
|
|
||||||
eval "config_if_${INTERRES}() { config_if $INTER $@; };"
|
|
||||||
done
|
|
||||||
elif [ "$PLUG" = "if_err_" ]; then
|
|
||||||
- for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g');
|
|
||||||
+ for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g');
|
|
||||||
do
|
|
||||||
INTERRES=$(echo $INTER | sed 's/\./VLAN/')
|
|
||||||
RES="$RES if_err_$INTERRES"
|
|
|
@ -1,24 +0,0 @@
|
||||||
--- a/munin-node.in
|
|
||||||
+++ b/munin-node.in
|
|
||||||
@@ -72,17 +72,17 @@ RES=""
|
|
||||||
for PLUG in $PLUGINS
|
|
||||||
do
|
|
||||||
if [ "$PLUG" = "if_" ]; then
|
|
||||||
- for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g');
|
|
||||||
+ for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\|br-\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g');
|
|
||||||
do
|
|
||||||
- INTERRES=$(echo $INTER | sed 's/\./VLAN/')
|
|
||||||
+ INTERRES=$(echo $INTER | sed -e 's/\./VLAN/' -e 's/\-/_/')
|
|
||||||
RES="$RES if_$INTERRES"
|
|
||||||
eval "fetch_if_${INTERRES}() { fetch_if $INTER $@; };"
|
|
||||||
eval "config_if_${INTERRES}() { config_if $INTER $@; };"
|
|
||||||
done
|
|
||||||
elif [ "$PLUG" = "if_err_" ]; then
|
|
||||||
- for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g');
|
|
||||||
+ for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\|br-\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g');
|
|
||||||
do
|
|
||||||
- INTERRES=$(echo $INTER | sed 's/\./VLAN/')
|
|
||||||
+ INTERRES=$(echo $INTER | sed -e 's/\./VLAN/' -e 's/\-/_/')
|
|
||||||
RES="$RES if_err_$INTERRES"
|
|
||||||
eval "fetch_if_err_${INTERRES}() { fetch_if_err $INTER $@; };"
|
|
||||||
eval "config_if_err_${INTERRES}() { config_if_err $INTER $@; };"
|
|
|
@ -1,22 +0,0 @@
|
||||||
--- a/plugins/if_
|
|
||||||
+++ b/plugins/if_
|
|
||||||
@@ -26,7 +26,7 @@ config_if() {
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
fetch_if() {
|
|
||||||
- IINFO=$(grep "$1:" /proc/net/dev | cut -d: -f2 | sed -e 's/ / /g')
|
|
||||||
+ IINFO=$(grep "$1:" /proc/net/dev | cut -d: -f2 | sed -e 's/ */ /g' -e 's/^[ \t]*//')
|
|
||||||
echo "down.value" $(echo $IINFO | cut -d\ -f1)
|
|
||||||
echo "up.value" $(echo $IINFO | cut -d\ -f9)
|
|
||||||
}
|
|
||||||
--- a/plugins/if_err_
|
|
||||||
+++ b/plugins/if_err_
|
|
||||||
@@ -15,7 +15,7 @@ config_if_err() {
|
|
||||||
echo "trans.warning 1"
|
|
||||||
}
|
|
||||||
fetch_if_err() {
|
|
||||||
- IINFO=$(grep "$1:" /proc/net/dev | cut -d: -f2 | sed -e 's/ / /g')
|
|
||||||
+ IINFO=$(grep "$1:" /proc/net/dev | cut -d: -f2 | sed -e 's/ */ /g' -e 's/^[ \t]*//')
|
|
||||||
echo "rcvd.value" $(echo $IINFO | cut -d\ -f3)
|
|
||||||
echo "trans.value" $(echo $IINFO | cut -d\ -f11)
|
|
||||||
}
|
|
|
@ -1,20 +0,0 @@
|
||||||
--- a/munin-node.in
|
|
||||||
+++ b/munin-node.in
|
|
||||||
@@ -72,7 +72,7 @@ RES=""
|
|
||||||
for PLUG in $PLUGINS
|
|
||||||
do
|
|
||||||
if [ "$PLUG" = "if_" ]; then
|
|
||||||
- for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\|br-\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g');
|
|
||||||
+ for INTER in $(grep -E '^ *(ppp|eth|wlan|ath|ra|ipsec|tap|br-)[^:]{1,}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g');
|
|
||||||
do
|
|
||||||
INTERRES=$(echo $INTER | sed -e 's/\./VLAN/' -e 's/\-/_/')
|
|
||||||
RES="$RES if_$INTERRES"
|
|
||||||
@@ -80,7 +80,7 @@ do
|
|
||||||
eval "config_if_${INTERRES}() { config_if $INTER $@; };"
|
|
||||||
done
|
|
||||||
elif [ "$PLUG" = "if_err_" ]; then
|
|
||||||
- for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\|br-\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g');
|
|
||||||
+ for INTER in $(grep -E '^ *(ppp|eth|wlan|ath|ra|ipsec|tap|br-)[^:]{1,}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g');
|
|
||||||
do
|
|
||||||
INTERRES=$(echo $INTER | sed -e 's/\./VLAN/' -e 's/\-/_/')
|
|
||||||
RES="$RES if_err_$INTERRES"
|
|
|
@ -1,10 +0,0 @@
|
||||||
--- a/plugins/irqstats 2007-11-30 11:39:08.000000000 +0100
|
|
||||||
+++ b/plugins/irqstats 2018-08-29 08:20:50.809468406 +0200
|
|
||||||
@@ -1,6 +1,6 @@
|
|
||||||
config_irqstats() {
|
|
||||||
echo "graph_title Individual interrupts
|
|
||||||
-graph_args --base 1000 -l 0;
|
|
||||||
+graph_args --base 1000 -l 0
|
|
||||||
graph_vlabel interrupts / \${graph_period}
|
|
||||||
graph_category system"
|
|
||||||
CPUS=$(grep 'CPU[0-9]' /proc/interrupts | wc -w)
|
|
Loading…
Reference in a new issue