6.1
Table Of Contents
- Endpoint Operations Management Agent Plug-in Development Kit
- Contents
- About the Endpoint Operations Management Agent Plug-in Development Kit
- Introduction to Plug-in Development
- The Role of the Server and Agent in Plug-ins
- Technical Overview
- Plug-in Implementations
- Using Support Classes to Simplify a Plug-in
- Writing Plug-ins
- JMX Plug-in
- Script Plug-ins
- SNMP Plug-in
- JMX-Based Management
- Auto-Discovery of JMX Resources
- Configuration Properties for JMX Monitoring
- Creating a Custom JMX Plug-in
- Defining Service Types to Provide Management via Custom MBeans
- Defining an ObjectName to Access Custom MBeans
- Defining Configuration Properties to Appear in the User Interface
- Defining and Gathering Metrics
- Specifying the Availability Metric for MBeans
- Implementing Control Actions
- Defining the Server Auto-Inventory Element
- Discovering Custom Properties
- Running and Testing Plug-ins from the Command Line
- Using Auto-Discovery Support Classes in Plug-ins
- Working with Plug-in Descriptors
- Plug-In Support Classes
- Index
details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA.
-->
<plugin>
<!-- extracted to: pdk/work/scripts/sendmail/hq-sendmail-stat -->
<script name="hq-sendmail-stat">
<![CDATA[
#!/bin/sh
# linux / aix
[ -d "/var/spool/mqueue" ] &&
msgdir="/var/spool/mqueue" &&
premsgdir="/var/spool/clientmqueue"
# solaris
[ -d "/usr/spool/mqueue" ] &&
msgdir="/usr/spool/mqueue" &&
premsgdir="/usr/spool/clientmqueue"
# If the mqueue dir doesn't exist, exit 1
[ -z "$msgdir" -o ! -r "$msgdir" ] &&
exit 1
# May not have permission to cd to the mqueue, make sure
# stdout/err don't get echo'd
cd $msgdir > /dev/null 2>&1
[ "$?" != "0" ] &&
exit 1
# count msgs in sendmail mqueue dir. DO NOT use find since it
# may fail when there are lots of files
messfiles=`ls 2>/dev/null | wc -w`
premessfiles=0
if [ ! -z "$premsgdir" ] && [ -d "$premsgdir" ] && [ -r "$premsgdir" ]
then
[ `cd $premsgdir > /dev/null 2>&1` ] && [ "$?" = "0" ] &&
premessfiles=`ls 2>/dev/null | wc -w`
fi
echo MessagesInQueue=$messfiles
echo MessagesAwaitingPreprocessing=$premessfiles
exit 0
]]>
</script>
<server name="Sendmail"
version="8.x">
Chapter 1 Introduction to Plug-in Development
VMware, Inc. 17