From 8cb9e83074a2a68d71010dc60b68a7c376793703 Mon Sep 17 00:00:00 2001 From: Lupe Christoph Date: Fri, 28 Jan 2005 14:47:31 +0000 Subject: [PATCH] Add graph_info and some filed.info --- node/node.d.freebsd/cpu.in | 8 +++++++ node/node.d.freebsd/df.in | 14 ++++++++++- node/node.d.freebsd/df_inode.in | 37 +++++++++++++++++++++--------- node/node.d.freebsd/if_.in | 5 ++++ node/node.d.freebsd/if_errcoll_.in | 4 ++++ node/node.d.freebsd/load.in | 8 +++++++ node/node.d.freebsd/memory.in | 10 ++++++++ node/node.d.freebsd/netstat.in | 24 +++++++++++++++---- node/node.d.freebsd/open_files.in | 6 +++++ node/node.d.freebsd/processes.in | 5 ++++ node/node.d.freebsd/swap.in | 4 ++++ node/node.d.freebsd/vmstat.in | 8 +++++++ 12 files changed, 116 insertions(+), 17 deletions(-) diff --git a/node/node.d.freebsd/cpu.in b/node/node.d.freebsd/cpu.in index 0e0f7d3c30..7c6558cff0 100755 --- a/node/node.d.freebsd/cpu.in +++ b/node/node.d.freebsd/cpu.in @@ -10,6 +10,9 @@ # autoconf (optional - used by munin-config) # # $Log$ +# Revision 1.10 2005/01/28 14:47:31 lupe +# Add graph_info and some filed.info +# # Revision 1.9 2005/01/25 08:48:28 lupe # Correct multi-CPU bugs # @@ -95,6 +98,7 @@ if [ "$1" = "config" ]; then echo "graph_args --base 1000 -r --lower-limit 0 --upper-limit $PERCENT " echo 'graph_vlabel %' echo 'graph_scale no' + echo 'graph_info This graph shows how CPU time is spent.' echo 'graph_category system' echo 'graph_period second' echo 'system.label system' @@ -104,6 +108,7 @@ if [ "$1" = "config" ]; then echo 'system.min 0' # echo "system.warning $SYSWARNING" # echo "system.critical $SYSCRITICAL" + echo 'system.info CPU time spent by the kernel in system activities' echo "system.cdef system,$CDEF" echo 'interrupt.label interrupt' echo 'interrupt.draw STACK' @@ -117,18 +122,21 @@ if [ "$1" = "config" ]; then echo 'user.max 5000' # echo "user.warning $USRWARNING" echo 'user.type DERIVE' + echo 'user.info CPU time spent by normal programs and daemons' echo 'user.min 0' echo "user.cdef user,$CDEF" echo 'nice.label nice' echo 'nice.draw STACK' echo 'nice.max 5000' echo 'nice.type DERIVE' + echo 'nice.info CPU time spent by nice(1)d programs' echo 'nice.min 0' echo "nice.cdef nice,$CDEF" echo 'idle.label idle' echo 'idle.draw STACK' echo 'idle.max 5000' echo 'idle.type DERIVE' + echo 'idle.info Idle CPU time' echo 'idle.min 0' echo "idle.cdef idle,$CDEF" exit 0 diff --git a/node/node.d.freebsd/df.in b/node/node.d.freebsd/df.in index 9c3a8c0469..ad25ec31fd 100755 --- a/node/node.d.freebsd/df.in +++ b/node/node.d.freebsd/df.in @@ -8,6 +8,9 @@ # autoconf (optional - used by munin-config) # # $Log$ +# Revision 1.6 2005/01/28 14:47:31 lupe +# Add graph_info and some filed.info +# # Revision 1.5 2005/01/28 13:25:34 lupe # Add support for FreeBSD 4.x ramdisks # @@ -53,6 +56,8 @@ if [ "$1" = "config" ]; then echo 'graph_title Filesystem usage (in %)' echo 'graph_args --upper-limit 100 -l 0' echo 'graph_vlabel %' + echo 'graph_category disk' + echo 'graph_info This graph shows disk usage on the machine.' mfs=0 /bin/df -P -t noprocfs,devfs,fdescfs,linprocfs,nfs | tail +2 | grep -v "//" | while read i; do case $i in @@ -60,7 +65,14 @@ if [ "$1" = "config" ]; then *) name=`echo $i | awk '{ gsub("[^a-zA-Z0-9_]", "_", $1); print $1 }'` ;; esac echo -n "$name.label " - echo $i | awk '{ print $6 }' + echo $i | awk "{ + dir=\$6 + if (length(dir) <= $MAXLABEL) + print dir + else + printf (\"...%s\n\", substr (dir, length(dir)-$MAXLABEL+4, $MAXLABEL-3)) + print \"$name.info \" \$6 \" -> \" \$1; + }" echo "$name.warning 92" echo "$name.critical 98" done diff --git a/node/node.d.freebsd/df_inode.in b/node/node.d.freebsd/df_inode.in index ec7c412432..6e51d52787 100755 --- a/node/node.d.freebsd/df_inode.in +++ b/node/node.d.freebsd/df_inode.in @@ -8,6 +8,9 @@ # autoconf (optional - used by munin-config) # # $Log$ +# Revision 1.6 2005/01/28 14:47:31 lupe +# Add graph_info and some filed.info +# # Revision 1.5 2005/01/28 13:25:34 lupe # Add support for FreeBSD 4.x ramdisks # @@ -67,17 +70,29 @@ if [ "$1" = "config" ]; then echo 'graph_title Inode usage (in %)' echo 'graph_args --upper-limit 100 -l 0' echo 'graph_vlabel %' - mfs=0 - /bin/df -P -i -t noprocfs,devfs,fdescfs,linprocfs,nfs | tail +2 | grep -v "//" | while read i; do - case $i in - mfs:*) name=mfs$mfs; mfs=`expr $mfs + 1`;; - *) name=`echo $i | awk '{ gsub("[^a-zA-Z0-9_]", "_", $1); print $1 }'` ;; - esac - echo -n "$name.label " - echo $i | awk '{ print $9 }' - echo "$name.warning 92" - echo "$name.critical 98" - done + echo 'graph_category disk' + echo 'graph_info This graph shows the inode usage for the partitions of types that use inodes.' + /bin/df -P -i -t noprocfs,devfs,fdescfs,linprocfs,nfs | tail +2 | grep -v "//" | awk " + BEGIN { + mfs = 0 + } + { + name = \$1 + dir = \$9 + if (\$1 ~ /^mfs:/) { + name = \"mfs\" mfs + mfs = mfs + 1 + } else { + gsub(/[^a-zA-Z0-9_]/, \"_\", name) + } + if (length(dir) <= $MAXLABEL) + print name \".label \" dir + else + printf (\"%s.label ...%s\n\", name, substr (dir, length(dir)-$MAXLABEL+4, $MAXLABEL-3)) + print name \".info \" dir \" -> \" name + print name \".warning 92\" + print name \".critical 98\" + }" exit 0 fi diff --git a/node/node.d.freebsd/if_.in b/node/node.d.freebsd/if_.in index 80ac2d1688..63e3a85b74 100755 --- a/node/node.d.freebsd/if_.in +++ b/node/node.d.freebsd/if_.in @@ -10,6 +10,9 @@ # Any device found in /usr/bin/netstat can be monitored. # # $Log$ +# Revision 1.5 2005/01/28 14:47:31 lupe +# Add graph_info and some filed.info +# # Revision 1.4 2004/12/10 10:47:49 jimmyo # Change name from ${scale} to ${graph_period}, to be more consistent. # @@ -68,6 +71,7 @@ if [ "$1" = "config" ]; then echo 'graph_args --base 1000' echo 'graph_vlabel bits per ${graph_period} in (-) / out (+)' echo 'graph_category network' + echo "graph_info This graph shows the traffic of the $INTERFACE network interface. Please note that the traffic is showed in bits per second, not bytes." echo 'rbytes.label received' echo 'rbytes.type COUNTER' echo 'rbytes.graph no' @@ -76,6 +80,7 @@ if [ "$1" = "config" ]; then echo 'obytes.type COUNTER' echo 'obytes.negative rbytes' echo 'obytes.cdef obytes,8,*' + echo 'obytes.info Traffic sent (+) and received (-) on the $INTERFACE network interface." exit 0 fi; diff --git a/node/node.d.freebsd/if_errcoll_.in b/node/node.d.freebsd/if_errcoll_.in index e3a515a323..af822f714a 100755 --- a/node/node.d.freebsd/if_errcoll_.in +++ b/node/node.d.freebsd/if_errcoll_.in @@ -10,6 +10,9 @@ # Any device found in /usr/bin/netstat can be monitored. # # $Log$ +# Revision 1.5 2005/01/28 14:47:31 lupe +# Add graph_info and some filed.info +# # Revision 1.4 2004/12/10 10:47:49 jimmyo # Change name from ${scale} to ${graph_period}, to be more consistent. # @@ -64,6 +67,7 @@ if [ "$1" = "config" ]; then echo 'graph_args --base 1000' echo 'graph_vlabel events / ${graph_period}' echo 'graph_category network' + echo "graph_info This graph shows the amount of errors and collisions on the $INTERFACE network interface." echo 'ierrors.label Input Errors' echo 'ierrors.type COUNTER' echo 'oerrors.label Output Errors' diff --git a/node/node.d.freebsd/load.in b/node/node.d.freebsd/load.in index 15b85c5847..a5c6266366 100755 --- a/node/node.d.freebsd/load.in +++ b/node/node.d.freebsd/load.in @@ -8,6 +8,9 @@ # installation scripts): # # $Log$ +# Revision 1.4 2005/01/28 14:47:31 lupe +# Add graph_info and some filed.info +# # Revision 1.3 2004/05/20 19:02:36 jimmyo # Set categories on a bunch of plugins # @@ -78,6 +81,11 @@ if [ "$1" = "config" ]; then # problems echo 'load.warning 10' echo 'load.critical 120' + # This one is purely to add an explanation to the web page. The first + # one is for the graph itself, while the second one is for the field + # "load". + echo 'graph_info The load average of the machine describes how many processes are in the run-queue (scheduled to run "immediately").' + echo 'load.info Average load for the five minutes.' # Last, if run with the "config"-parameter, quit here (don't # display any data) diff --git a/node/node.d.freebsd/memory.in b/node/node.d.freebsd/memory.in index 47e5bd2107..c2ba4118b7 100755 --- a/node/node.d.freebsd/memory.in +++ b/node/node.d.freebsd/memory.in @@ -8,6 +8,9 @@ # autoconf (optional - only used by munin-config) # # $Log$ +# Revision 1.3 2005/01/28 14:47:31 lupe +# Add graph_info and some filed.info +# # Revision 1.2 2004/05/20 19:02:36 jimmyo # Set categories on a bunch of plugins # @@ -52,18 +55,25 @@ if [ "$1" = "config" ]; then echo 'graph_args --base 1024 -l 0 --vertical-label Bytes --upper-limit '$MEMMAX echo 'graph_title Memory usage' echo 'graph_category system' + echo 'graph_info This graph shows what the machine uses its memory for.'; echo 'graph_order active inactive wired buffers cached free' echo 'active.label active' + echo 'active.info pages recently statistically used' echo 'active.draw AREA' echo 'inactive.label inactive' + echo 'inactive.info pages recently statistically unused' echo 'inactive.draw STACK' echo 'wired.label wired' + echo 'wired.info pages that are fixed into memory, usually for kernel purposes, but also sometimes for special use in processes' echo 'wired.draw STACK' echo 'buffers.label buffers' + echo 'buffers.info pages used for filesystem buffers' echo 'buffers.draw STACK' echo 'cached.label cache' + echo 'cached.info pages that have percolated from inactive to a status where they maintain their data, but can often be immediately reused' echo 'cached.draw STACK' echo 'free.label free' + echo 'free.info pages without data content' echo 'free.draw STACK' exit 0 fi diff --git a/node/node.d.freebsd/netstat.in b/node/node.d.freebsd/netstat.in index 47a5e1c59e..71644afc43 100755 --- a/node/node.d.freebsd/netstat.in +++ b/node/node.d.freebsd/netstat.in @@ -8,6 +8,9 @@ # autoconf (optional - only used by munin-config) # # $Log$ +# Revision 1.6 2005/01/28 14:47:31 lupe +# Add graph_info and some filed.info +# # Revision 1.5 2004/12/10 10:47:49 jimmyo # Change name from ${scale} to ${graph_period}, to be more consistent. # @@ -60,24 +63,35 @@ if [ "$1" = "config" ]; then echo 'graph_args -l 0 --base 1000' echo 'graph_vlabel active connections per ${graph_period}' echo 'graph_category network' + echo 'graph_period second' + echo 'graph_info This graph shows the TCP activity of all the network interfaces combined.' echo 'active.label active' echo 'active.type DERIVE' echo 'active.min 0' - echo 'active.max 50000''' + echo 'active.max 50000' + echo 'active.info The number of active TCP openings per second.' + echo 'passive.label passive' + echo 'passive.type DERIVE' + echo 'passive.min 0' + echo 'passive.max 50000' + echo 'passive.info The number of passive TCP openings per second.' echo 'failed.label failed' echo 'failed.type DERIVE' echo 'failed.min 0' - echo 'failed.max 50000''' + echo 'failed.max 50000' + echo 'failed.info The number of failed TCP connection attempts per second.' echo 'resets.label resets' echo 'resets.type DERIVE' echo 'resets.min 0' - echo 'resets.max 50000''' + echo 'resets.max 50000' + echo 'resets.info The number of TCP connection resets.' echo 'established.label established' echo 'established.type DERIVE' echo 'established.min 0' - echo 'established.max 50000''' + echo 'established.max 50000' + echo 'established.info The number of currently open connections.' exit 0 fi -netstat -s | awk '/connection accepts/ { print "active.value " $1 } /bad connection/ { print "failed.value " $1 } /reset/ { print "resets.value " $1 } /connections established/ { print "established.value " $1 }' +netstat -s | awk '/connection requests/ { print "active.value " $1 } /connection accepts/ { print "passive.value " $1 } /bad connection/ { print "failed.value " $1 } /reset/ { print "resets.value " $1 } /connections established/ { print "established.value " $1 }' diff --git a/node/node.d.freebsd/open_files.in b/node/node.d.freebsd/open_files.in index cdd4260c48..3ef5371456 100755 --- a/node/node.d.freebsd/open_files.in +++ b/node/node.d.freebsd/open_files.in @@ -8,6 +8,9 @@ # autoconf (optional - used by munin-config) # # $Log$ +# Revision 1.3 2005/01/28 14:47:31 lupe +# Add graph_info and some filed.info +# # Revision 1.2 2004/05/20 19:02:36 jimmyo # Set categories on a bunch of plugins # @@ -52,8 +55,11 @@ if [ "$1" = "config" ]; then echo 'graph_args --base 1000 -l 0' echo 'graph_vlabel number of open files' echo 'graph_category system' + echo 'graph_info This graph monitors the Linux open files table.' echo 'used.label open files' + echo 'used.info The number of currently open files.' echo 'max.label max open files' + echo 'max.info The maximum supported number of open files.' /sbin/sysctl -n kern.maxfiles | awk '{printf "used.warning %d\nused.critical %d\n",$1*0.92,$1*0.98}' exit 0 fi diff --git a/node/node.d.freebsd/processes.in b/node/node.d.freebsd/processes.in index 1ae1bf88aa..0df61ef17f 100755 --- a/node/node.d.freebsd/processes.in +++ b/node/node.d.freebsd/processes.in @@ -9,6 +9,9 @@ # autoconf (optional - used by munin-config) # # $Log$ +# Revision 1.3 2005/01/28 14:47:31 lupe +# Add graph_info and some filed.info +# # Revision 1.2 2004/05/20 19:02:36 jimmyo # Set categories on a bunch of plugins # @@ -41,7 +44,9 @@ if [ "$1" = "config" ]; then echo 'graph_args --base 1000 -l 0 ' echo 'graph_vlabel number of processes' echo 'graph_category processes' + echo 'graph_info This graph shows the number of processes in the system.' echo 'processes.label processes' + echo 'processes.info The current number of processes.' echo 'processes.draw LINE2' exit 0 fi diff --git a/node/node.d.freebsd/swap.in b/node/node.d.freebsd/swap.in index b56e8277fb..c61b5b3109 100755 --- a/node/node.d.freebsd/swap.in +++ b/node/node.d.freebsd/swap.in @@ -8,6 +8,9 @@ # autoconf (optional - used by munin-config) # # $Log$ +# Revision 1.6 2005/01/28 14:47:31 lupe +# Add graph_info and some filed.info +# # Revision 1.5 2004/12/10 10:47:49 jimmyo # Change name from ${scale} to ${graph_period}, to be more consistent. # @@ -63,6 +66,7 @@ if [ "$1" = "config" ]; then echo 'graph_args -l 0 --base 1000' echo 'graph_vlabel pages per ${graph_period} in (-) / out (+)' echo 'graph_category system' + echo 'graph_info This graph shows the swap activity of the system." echo 'swap_in.label swap' echo 'swap_in.type DERIVE' echo 'swap_in.min 0' diff --git a/node/node.d.freebsd/vmstat.in b/node/node.d.freebsd/vmstat.in index 31bd122820..500afb99aa 100755 --- a/node/node.d.freebsd/vmstat.in +++ b/node/node.d.freebsd/vmstat.in @@ -9,6 +9,9 @@ # autoconf (optional - used by munin-config) # # $Log$ +# Revision 1.5 2005/01/28 14:47:31 lupe +# Add graph_info and some filed.info +# # Revision 1.4 2004/11/28 09:43:54 lupe # 6-CURRENT support # @@ -66,14 +69,19 @@ if [ "$1" = "config" ]; then echo 'graph_args --base 1000 -l 0' echo 'graph_vlabel process states' echo 'graph_category processes' + echo 'graph_info This graph shows number of processes in each state.' if [ "$OSV" -ge "5" ]; then echo 'running.label running' + echo 'running.info processes on CPU or waiting for CPU' echo 'running.type GAUGE' echo 'diskwait.label diskwait' + echo 'diskwait.info processes waiting for disk activity' echo 'diskwait.type GAUGE' echo 'pagewait.label pagewait' + echo 'pagewait.info processes waiting for page-in' echo 'pagewait.type GAUGE' echo 'sleep.label sleep' + echo 'sleep.info processes waiting for some event' echo 'sleep.type GAUGE' else echo 'wait.label wait'