SysDiag_xAP.pm

SysDiag_xAP

SYNOPSIS

If declaring via .mht:

  SDX,  psixc_instance,   sdx_object_name,        psixc_server

Where 'psixc_instance' is the xap instance name, psixc_server is the monitored server, and 'sdx_object_name' is the Misterhouse object

  # declare the psixc "conduit" object
  $server1 = new SysDiag_xAP(instance, servername);

  # create one or more AnalogSensor_Items that will be attached to the SysDiag_xAP
  # See additional comments in AnalogSensor_Items for .mht based declaration

  $server1_eth0 = new AnalogSensor_Item('loadavg1', 'cpu');
  # 'loadavg1' is the attribute name, 'cpu' is the sensor type
  $server1_hda1 = new AnalogSensor_Item('hda1.free', 'disk');
  # 'hda1.free' is the attribute name, and sub-attribute value, 'disk' is the sensor type

  # Now add these to the SysDiag_xAP object
  $server1->add($server1_eth0, $server1_hda1);

  # Another useful function is get_diag. This returns the xAP value without creating
  # an AnalogSensor_Item object

  $server1->get_diag('disk.hda1.size');

Information on using AnalogSensor_Items is contained within its corresponding package documentation

DESCRIPTION

This package provides an interface to PhpSysInfo xml source via the xAP (www.xapautomation.org) "connector": psixc

Documentation on installing/configuring psixc is found in the psixc distribution. (Note: psixc currently relies on phpsysinfo (phpsysinfo.sourceforge.net).

The xAP message convention assumes that the phpsysinfo xAP connector, psixc, is addressed via the target: hpgl.psixc.house

Each "device" is subaddressed using the convention: :<type>.<item> where <type> can be cpu, memory, network, disk and <item> is an attribute within that item type (ie. eth0.rx hda1.used_percent)

INHERITS

Base_Item

METHODS

UnDoc

INI PARAMETERS

NONE

AUTHOR

Gregg Liming / Howard Plato gregg@limings.net hplato@gmail.com

SEE ALSO

NONE

LICENSE

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

 SysDiag_xAP.pm