Skip to content
ggodart edited this page Jan 6, 2021 · 2 revisions

SysDiag_xAP

See original

SYNOPSIS

Items.mht

Defined in items.mht as

# 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 (http://www.xapautomation.org) "connector": psixc

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

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

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

INHERITS

Base_Item

INI PARAMETERS

METHODS

None

AUTHOR

Gregg Liming [email protected]
Howard Plato [email protected]

SEE ALSO

None

Clone this wiki locally