1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

- have some dirs

This commit is contained in:
Steve Schnepp 2012-02-13 18:24:46 +01:00
parent 0b089ea777
commit 08346aac58
687 changed files with 0 additions and 0 deletions

105
plugins/condor/condor_activity_ Executable file
View file

@ -0,0 +1,105 @@
#!/bin/bash
#
# Wildard-plugin to monitor "activity" property of Condor nodes.
#
# Author: Šarūnas Burdulis, sarunas(a)mail.saabnet.com, 2008
#
# Runs 'condor_status' and counts virtual machines by their
# reported Condor "activity" (Idle, Busy, Suspended, Vacating, Benchmarking).
#
# Parameters understood:
#
# config (required)
# autoconf (optional - used by munin-config)
# suggest (optional - used by munin-config)
#
# Configurable variables:
#
# env.condor_status - Path to condor_status executable,
# defaults to /usr/local/condor/bin/condor_status
# env.constraint - Condor ClassAds constraint(s), as they are
# specified on the condor_status command line. For example,
# to monitor 64-bit Linux nodes set:
# env.constraint 'arch=="x86_64" && opsys=="linux"'
#
# Magic markers - optional - used by installation scripts and
# munin-config:
#
#%# family=contrib
#%# capabilities=autoconf
# optional tag
TAG=`basename $0 | sed 's/^condor_activity_//g'`
if [ -z "$TAG" ]; then
GRAPHTITLE="Activities"
else
GRAPHTITLE="Activities (${TAG})"
fi
# env.condor_status
if [ ! -z "$condor_status" ]; then
CS="$condor_status"
else
CS="/usr/local/condor/bin/condor_status"
fi
# env.constraint
if [ ! -z "$constraint" ]; then
CONS="-constraint ${constraint}"
else
CONS=
fi
if [ "$1" = "autoconf" ]; then
echo "no"
exit 1
fi
if [ "$1" = "suggest" ]; then
echo "For example: condor_activity_Linux-x86_64."
exit 0
fi
if [ "$1" = "config" ]; then
echo "graph_title "$GRAPHTITLE""
echo "graph_order idl bus sus vac ben"
echo "graph_args --lower-limit 0 "
echo "graph_vlabel VMs"
echo "graph_scale no"
echo "graph_info Shows slot activity from condor_status."
echo "graph_category Condor"
echo "graph_period second"
echo "idl.label Idle"
echo "idl.draw AREA"
echo "idl.type GAUGE"
echo "idl.info Idle VMs"
echo "bus.label Busy"
echo "bus.draw STACK"
echo "bus.type GAUGE"
echo "bus.info Busy VMs"
echo "sus.label Suspended"
echo "sus.draw STACK"
echo "sus.type GAUGE"
echo "sus.info Suspended VMs"
echo "vac.label Vacating"
echo "vac.draw STACK"
echo "vac.type GAUGE"
echo "vac.info Vacating VMs"
echo "ben.label Benchmarking"
echo "ben.draw STACK"
echo "ben.type GAUGE"
echo "ben.info Benchmarking VMs"
exit 0
fi
echo -n "idl.value "
eval $CS $CONS | grep Idle | wc -l
echo -n "bus.value "
eval $CS $CONS | grep Busy | wc -l
echo -n "sus.value "
eval $CS $CONS | grep Suspended | wc -l
echo -n "vac.value "
eval $CS $CONS | grep Vacating | wc -l
echo -n "ben.value "
eval $CS $CONS | grep Benchmarking | wc -l

111
plugins/condor/condor_ops_ Executable file
View file

@ -0,0 +1,111 @@
#!/bin/bash
#
# Wildard-plugin to monitor integer and floating point
# performance capabilities of a Condor pool.
#
# Author: Šarūnas Burdulis, sarunas(a)mail.saabnet.com, 2008
#
# Runs 'condor_status -server',
# gets totals for MIPS and KFLOPS.
#
# Parameters understood:
#
# config (required)
# autoconf (optional - used by munin-config)
# suggest (optional - used by munin-config)
#
# Configurable variables:
#
# env.condor_status - Path to condor_status executable,
# defaults to /usr/local/condor/bin/condor_status
# env.constraint - Condor ClassAds constraint(s), as they are
# specified on the condor_status command line. For example,
# to monitor 64-bit Linux nodes only, set:
# env.constraint 'arch=="x86_64" && opsys=="linux"'
#
# Magic markers - optional - used by installation scripts and
# munin-config:
#
#%# family=contrib
#%# capabilities=autoconf
# optional tag
TAG=`basename $0 | sed 's/^condor_ops_//g'`
if [ -z "$TAG" ]; then
GRAPHTITLE="MIPS, MFLOPS"
else
GRAPHTITLE="MIPS, MFLOPS (${TAG})"
fi
# env.condor_status
if [ ! -z "$condor_status" ]; then
CS="$condor_status"
else
CS="/usr/local/condor/bin/condor_status"
fi
# env.constraint
if [ ! -z "$constraint" ]; then
CONS="-constraint ${constraint}"
else
CONS=
fi
if [ "$1" = "autoconf" ]; then
echo "no"
exit 1
fi
if [ "$1" = "suggest" ]; then
echo "For example: condor_ops_Linux-x86_64."
exit 0
fi
if [ "$1" = "config" ]; then
echo "graph_title "$GRAPHTITLE""
echo "graph_order mips_cur mips_max mflops_cur mflops_max"
echo "graph_args --lower-limit 0 "
echo 'graph_vlabel MIPS, MFLOPS'
echo 'graph_scale no'
echo 'graph_info Shows MIPS and MFLOPS from condor_status.'
echo 'graph_category Condor'
echo 'graph_period second'
echo 'mips_cur.label MIPS claimed'
echo 'mips_cur.draw LINE2'
echo 'mips_cur.min 0'
echo 'mips_cur.max 200000'
echo 'mips_cur.type GAUGE'
echo "mips_cur.info Total (millions of integer operations)/s in Claimed nodes"
echo 'mips_max.label MIPS max. possible'
echo 'mips_max.draw LINE'
echo 'mips_max.min 0'
echo 'mips_max.max 200000'
echo 'mips_max.type GAUGE'
echo "mips_max.info Total capability in (millions of integer operations)/s"
echo 'mflops_cur.label MFLOPS claimed'
echo 'mflops_cur.draw LINE2'
echo 'mflops_cur.min 0'
echo 'mflops_cur.max 200000'
echo 'mflops_cur.type GAUGE'
echo "mflops_cur.info Total (millions of floating point operations)/s in Claimed nodes"
echo 'mflops_max.label MFLOPS max. possible'
echo 'mflops_max.draw LINE'
echo 'mflops_max.min 0'
echo 'mflops_max.max 200000'
echo 'mflops_max.type GAUGE'
echo "mflops_max.info Total capability in (millions of floating point operations)/s"
exit 0
fi
# max possible:
#condor_status -cons 'arch=="x86_64" && opsys=="linux"' -totals -server
# Machines Avail Memory Disk MIPS KFLOPS
# Total 30 30 48960 257925730 104576 31092042
eval $CS $CONS -totals -server | awk 'BEGIN { mipsc=0; mflopsc=0 } /Total/ {mips = $6; kflops = $7; mflops = int(kflops/1000) } END {print "mips_max.value " mips "\nmflops_max.value " mflops}'
# currently using:
#condor_status -cons 'arch=="x86_64" && opsys=="linux"' -totals -server -claimed
# Machines MIPS KFLOPS AvgLoadAvg
# Total 28 104576 29093286 0.960
eval $CS $CONS -totals -server -claimed | awk 'BEGIN { mipsc=0; mflopsc=0 } /Total/ { mipsc = $3; kflopsc = $4; mflopsc = int(kflopsc/1000) } END {print "mips_cur.value " mipsc "\nmflops_cur.value " mflopsc}'

96
plugins/condor/condor_queue_ Executable file
View file

@ -0,0 +1,96 @@
#!/bin/bash
#
# Wildcard-plugin to monitor Condor queue.
#
# Author: Šarūnas Burdulis, sarunas(a)mail.saabnet.com, 2008
#
# Runs 'condor_q -g' (list global queue), tail's to the last
# line of output (contains job summary) and
# gets numbers of queued, idle, running and held jobs.
#
# Parameters understood:
#
# config (required)
# autoconf (optional - used by munin-config)
# suggest (optional - used by munin-config)
#
# Configurable variables:
#
# env.condor_q - Path to condor_q executable,
# defaults to /usr/local/condor/bin/condor_q
# env.title - Graph title, overrides "Condor Queue [suffix]".
# env.options - Additional command line options to condor_q.
# Only a limited set of options can be used, as many
# of them eliminate the summary line from condor_q output.
#
# Magic markers - optional - used by installation scripts and
# munin-config:
#
#%# family=contrib
#%# capabilities=autoconf
# optional tag in symlink
TAG=`basename $0 | sed 's/^condor_queue_//g'`
# env.title
TITLE="$title"
# env.condor_q
if [ ! -z "$condor_q" ]; then
CQ="$condor_q"
else
CQ="/usr/local/condor/bin/condor_q"
fi
# env.options
OPTIONS="$options"
if [ ! -z "$TITLE" ]; then
GRAPHTITLE="$TITLE"
elif [ ! -z "$TAG" ]; then
GRAPHTITLE="Queue (${TAG})"
else
GRAPHTITLE="Queue"
fi
if [ "$1" = "autoconf" ]; then
echo "no"
exit 1
fi
if [ "$1" = "suggest" ]; then
echo "For example: condor_queue_clusterTwo."
exit 0
fi
if [ "$1" = "config" ]; then
echo "graph_title "$GRAPHTITLE""
echo "graph_order held running idle queue"
echo "graph_args --lower-limit 0 "
echo "graph_vlabel Jobs"
echo "graph_scale no"
echo "graph_info Shows global Condor queue from condor_q -g."
echo "graph_category Condor"
echo "graph_period second"
echo "held.label Held"
echo "held.draw AREA"
echo "held.type GAUGE"
echo "held.info Held"
echo "running.label Running"
echo "running.draw STACK"
echo "running.type GAUGE"
echo "running.info Running"
echo "idle.label Idle"
echo "idle.draw STACK"
echo "idle.type GAUGE"
echo "idle.info Idle"
echo "queue.label Queue"
echo "queue.draw LINE"
echo "queue.type GAUGE"
echo "queue.info Queue"
exit 0
fi
# example: 3076 jobs; 3052 idle, 24 running, 0 held
$CQ -g $OPTIONS | tail -n1 | awk '{print "queue.value " $1 "\nheld.value " $7 "\nrunning.value " $5 "\nidle.value " $3}'

101
plugins/condor/condor_states_ Executable file
View file

@ -0,0 +1,101 @@
#!/bin/bash
#
# Wildard-plugin to monitor node "states" in Condor pool.
#
# Author: Šarūnas Burdulis, sarunas(a)mail.saabnet.com, 2008
#
# Runs 'condor_status' and gets totals of nodes
# ("slots") for different Condor "states".
#
# Parameters understood:
#
# config (required)
# autoconf (optional - used by munin-config)
# suggest (optional - used by munin-config)
#
# Configurable variables:
#
# env.condor_status - Path to condor_status executable,
# defaults to /usr/local/condor/bin/condor_status
# env.constraint - Condor ClassAds constraint(s), as they are
# specified on the condor_status command line. For example,
# to monitor 64-bit Linux nodes only, set:
# env.constraint 'arch=="x86_64" && opsys=="linux"'
#
# Magic markers - optional - used by installation scripts and
# munin-config:
#
#%# family=contrib
#%# capabilities=autoconf
# optional tag
TAG=`basename $0 | sed 's/^condor_states_//g'`
if [ -z "$TAG" ]; then
GRAPHTITLE="States"
else
GRAPHTITLE="States (${TAG})"
fi
# env.condor_status
if [ ! -z "$condor_status" ]; then
CS="$condor_status"
else
CS="/usr/local/condor/bin/condor_status"
fi
# env.constraint
if [ ! -z "$constraint" ]; then
CONS="-constraint ${constraint}"
else
CONS=
fi
if [ "$1" = "autoconf" ]; then
echo "no"
exit 1
fi
if [ "$1" = "suggest" ]; then
echo "For example: condor_states_Linux-x86_64."
exit 0
fi
if [ "$1" = "config" ]; then
echo "graph_title "$GRAPHTITLE""
echo "graph_order Preempting Claimed Matched Unclaimed Owner"
echo "graph_args --lower-limit 0 "
echo 'graph_vlabel VMs'
echo 'graph_scale no'
echo 'graph_info Shows Condor slot states from condor_status.'
echo 'graph_category Condor'
echo 'graph_period second'
echo 'Preempting.label Preempting'
echo 'Preempting.draw AREA'
echo 'Preempting.type GAUGE'
echo "Preempting.info Slots in Preempting state"
echo 'Claimed.label Claimed'
echo 'Claimed.draw STACK'
echo 'Claimed.type GAUGE'
echo 'Claimed.info Slots in Claimed state'
echo 'Matched.label Matched'
echo 'Matched.draw STACK'
echo 'Matched.type GAUGE'
echo 'Matched.info Slots in Matched state'
echo 'Unclaimed.label Unclaimed'
echo 'Unclaimed.draw STACK'
echo 'Unclaimed.type GAUGE'
echo 'Unclaimed.info Slots in Unclaimed state'
echo 'Owner.label Owner'
echo 'Owner.draw STACK'
echo 'Owner.type GAUGE'
echo 'Owner.info Slots in Owner state'
exit 0
fi
# condor_status -cons 'arch=="x86_64" && opsys=="linux"' -total
# Total Owner Claimed Unclaimed Matched Preempting Backfill
# X86_64/LINUX 22 1 18 3 0 0 0
# x86_64/LINUX 8 0 8 0 0 0 0
# Total 30 1 26 3 0 0 0
eval $CS $CONS -total | awk '/Total / {print "Preempting.value " $7 "\nClaimed.value " $4 "\nMatched.value " $6 "\nUnclaimed.value " $5 "\nOwner.value " $3 }'