Giter VIP home page Giter VIP logo

muninlite's People

Contributors

daald avatar dotmpe avatar kimheino avatar steveschnepp avatar sumpfralle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

muninlite's Issues

df config vs fetch

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 misparses report for some NTP servers

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.

OpenWRT netstat -s command not present

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

munin-node crashes when interface speed is unknown

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

xinetd / inetd issues

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

fetch_df is broken on 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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.