Navigation Menu

Skip to content

Commit

Permalink
Add graph_info and some filed.info
Browse files Browse the repository at this point in the history
  • Loading branch information
LupeChristoph committed Jan 28, 2005
1 parent 8c82eda commit 8cb9e83
Show file tree
Hide file tree
Showing 12 changed files with 116 additions and 17 deletions.
8 changes: 8 additions & 0 deletions node/node.d.freebsd/cpu.in
Expand Up @@ -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
#
Expand Down Expand Up @@ -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'
Expand All @@ -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'
Expand All @@ -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
Expand Down
14 changes: 13 additions & 1 deletion node/node.d.freebsd/df.in
Expand Up @@ -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
#
Expand Down Expand Up @@ -53,14 +56,23 @@ 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
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 $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
Expand Down
37 changes: 26 additions & 11 deletions node/node.d.freebsd/df_inode.in
Expand Up @@ -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
#
Expand Down Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions node/node.d.freebsd/if_.in
Expand Up @@ -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.
#
Expand Down Expand Up @@ -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'
Expand All @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions node/node.d.freebsd/if_errcoll_.in
Expand Up @@ -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.
#
Expand Down Expand Up @@ -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'
Expand Down
8 changes: 8 additions & 0 deletions node/node.d.freebsd/load.in
Expand Up @@ -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
#
Expand Down Expand Up @@ -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)
Expand Down
10 changes: 10 additions & 0 deletions node/node.d.freebsd/memory.in
Expand Up @@ -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
#
Expand Down Expand Up @@ -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
Expand Down
24 changes: 19 additions & 5 deletions node/node.d.freebsd/netstat.in
Expand Up @@ -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.
#
Expand Down Expand Up @@ -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 }'

6 changes: 6 additions & 0 deletions node/node.d.freebsd/open_files.in
Expand Up @@ -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
#
Expand Down Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions node/node.d.freebsd/processes.in
Expand Up @@ -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
#
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions node/node.d.freebsd/swap.in
Expand Up @@ -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.
#
Expand Down Expand Up @@ -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'
Expand Down
8 changes: 8 additions & 0 deletions node/node.d.freebsd/vmstat.in
Expand Up @@ -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
#
Expand Down Expand Up @@ -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'
Expand Down

0 comments on commit 8cb9e83

Please sign in to comment.