munin-monitoring / muninlite Goto Github PK
View Code? Open in Web Editor NEWMuninLite is a standalone shell script implementing the Munin protocol and containing a few basic plugins out of the box.
License: GNU General Public License v2.0
MuninLite is a standalone shell script implementing the Munin protocol and containing a few basic plugins out of the box.
License: GNU General Public License v2.0
OpenWRT:
root@naru:~# df -PT Filesystem Type 1024-blocks Used Available Capacity Mounted on /dev/root squashfs 3840 3840 0 100% /rom tmpfs tmpfs 240228 1140 239088 0% /tmp /dev/loop0 ext4 55765 5103 46335 10% /overlay overlayfs:/overlay overlay 55765 5103 46335 10% / tmpfs tmpfs 512 0 512 0% /dev root@naru:~# ./muninlite # munin node at naru.bbbs.net config df graph_title Filesystem usage (in %) graph_args --upper-limit 100 -l 0 graph_vlabel % graph_category disk graph_info This graph shows disk usage on the machine. _dev_loop0.label /overlay _dev_loop0.info _dev_loop0 -> /overlay _dev_loop0.warning 92 _dev_loop0.critical 98 . fetch df _dev_root.value 100 _dev_loop0.value 10 .
Config uses IGNORE_FILESYSTEM_REGEX to skip "_dev_root", fetch doesn't. It should.
NTPdate plugin with server set to pool.ntp.org results in a parsing failure for the 'delay' value.
Failure occurs only for 'ntpdate' reports containing multiple 'server' lines (such as when used with a pool of servers).
Has been this way for at least a year, on multiple machines, all running OpenWrt (usually kept at the latest stable version, currently 21.02.3)
It may have something to do with the rotating DNS resolution of that pool, or the number of servers returned by the 'ntpdate' binary
I don't know awk, so can't be sure if the issue is there.
A workaround so far is to insert ' | grep ^server | head -n1 ' Just before the call to awk.
Hi All,
please note that muninlite currently doesn't pickup netstat values due to the fact the command netstat -s is in fact not available in OpenWRT natively.
netstat -s
netstat: unrecognized option: s
BusyBox v1.31.1 () multi-call binary.Usage: netstat [-ral] [-tuwx] [-enWp]
Display networking information
-r Routing table
-a All sockets
-l Listening sockets
Else: connected sockets
-t TCP sockets
-u UDP sockets
-w Raw sockets
-x Unix sockets
Else: all socket types
-e Other/more information
-n Don't resolve names
-W Wide display
muninlite code
fetch_netstat() {
NINFO=$(netstat -s | sed 's/ {1,}/ /g')
echo "active.value" "$(echo "$NINFO" | grep "active connection" | cut -d " " -f 2)"
echo "passive.value" "$(echo "$NINFO" | grep "passive connection" | cut -d " " -f 2)"
echo "failed.value" "$(echo "$NINFO" | grep "failed connection" | cut -d " " -f 2)"
echo "resets.value" "$(echo "$NINFO" | grep "connection resets" | cut -d " " -f 2)"
echo "established.value" "$(echo "$NINFO" | grep "connections established" | cut -d " " -f 2)"
}
My solution to resolve this problem would be to utilize instead the following grep + wc command as per below example.
I know this is not the cleanest or quickest solution but just wanted to get the ball rolling on this issue :)
netstat -n |grep SYN_SENT |wc -l
18842
netstat -n |grep ESTABLISHED |wc -l
44707
netstat -n |grep TIME_WAIT |wc -l
1683
etstat -n |grep FIN_WAIT |wc -l
34
netstat -n |grep LAST_ACK |wc -l
3
This calculation
MAX=$(($(ethtool $1 | grep Speed | sed -e 's/[[:space:]]\{1,\}/ /g' -e 's/^ //' -e 's/M.*//' | cut -d\ -f2) * 1000000))
breaks if
# ethtool eth0
Settings for eth0:
... Speed: Unknown!
can be amended by amending the if clause
if ethtool $1 | grep -q Speed | grep -v Unknown; then
May I suggest an easier installation process with a script that install any missing package and then performs the configuration maybe requesting the user for 2 variables: PORT_munin_server and IP_munin_server.
It should never touch the iptables or maybe request if the firewall rules needs to applied or not.
I am few days struggling with xinetd and inetd that will not start regardless of what is done to them, I think this issue should be checked properly.
I am thinking of trying out to use the ssh workaround unless you have any suggestion on regards with xinetd or inetd not starting?
I am using a branch of the openwrt and is equipped with busybox
not sure what it tries to fetch, but it might be incompatible with the builtin busybox df.
# df -P | grep '^/' | sed '/\/[a-z0-9]*$/!d;s/.* \([a-z0-9\/]\{1,\}\)$/^A/g'
^A
^A
^A
# df -P
Filesystem 1024-blocks Used Available Capacity Mounted on
/dev/root 253920 108508 140172 44% /
tmpfs 1023360 1704 1021656 0% /tmp
/dev/vda1 16112 4068 11720 26% /boot
/dev/vda1 16112 4068 11720 26% /boot
tmpfs 512 0 512 0% /dev
Line 2 of ntpdate plugin has 'delay' misspelled as 'dealy'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.