Removed RCS leftovers.
This commit is contained in:
parent
3f225ced9b
commit
f8ca78d7fd
1 changed files with 0 additions and 79 deletions
|
@ -1,79 +0,0 @@
|
|||
head 1.1;
|
||||
access;
|
||||
symbols;
|
||||
locks; strict;
|
||||
comment @# @;
|
||||
|
||||
|
||||
1.1
|
||||
date 2009.05.28.10.27.06; author root; state Exp;
|
||||
branches;
|
||||
next ;
|
||||
|
||||
|
||||
desc
|
||||
@@
|
||||
|
||||
|
||||
1.1
|
||||
log
|
||||
@Initial revision
|
||||
@
|
||||
text
|
||||
@#!/bin/sh
|
||||
#
|
||||
# Plugin to monitor running and registered virtual machines in the system.
|
||||
#
|
||||
# Parameters:
|
||||
#
|
||||
# config (required)
|
||||
# autoconf (optional - used by munin-config)
|
||||
#
|
||||
#%# family=auto
|
||||
#%# capabilities=autoconf
|
||||
|
||||
if [ "$1" = "autoconf" ]; then
|
||||
if [ -x /usr/bin/vmware-vim-cmd ]; then
|
||||
echo yes
|
||||
exit 0
|
||||
else
|
||||
echo no
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
echo 'graph_title VMware virtual machines'
|
||||
echo 'graph_vlabel number of virtual machines'
|
||||
echo 'graph_category vmware'
|
||||
echo 'graph_info This graph monitors registered and running virtual machines.'
|
||||
|
||||
echo 'running.label running'
|
||||
echo 'running.info Running virtual machines.'
|
||||
|
||||
echo 'registered.label registered'
|
||||
echo 'registered.info Registered virtual machines.'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
vmware-vim-cmd vmsvc/getallvms | awk '
|
||||
BEGIN {
|
||||
registered = 0;
|
||||
running = 0;
|
||||
}
|
||||
{
|
||||
if (/^[0-9]+/) {
|
||||
registered++;
|
||||
("vmware-vim-cmd vmsvc/power.getstate " $1 " | grep Powered") | getline state;
|
||||
if (state == "Powered on") {
|
||||
running++;
|
||||
}
|
||||
}
|
||||
}
|
||||
END {
|
||||
print "registered.value " registered
|
||||
print "running.value " running
|
||||
}
|
||||
'
|
||||
@
|
Loading…
Add table
Reference in a new issue