Livestatus Class Reference

Livestatus Class. More...

Public Member Functions

 __construct ($config=null)
 Creates a new isntance of the livestatus interface.
 getBackend ()
 Returns the backend used.
 calc_duration ($row)
 Returns the duration.
 filterable_columns ()
 Fugly but the right place to .
 getHosts ($options=null)
 Retrieve hosts from Livestatus.
 getHostgroups ($options=null)
 Dummy documentation.
 getHostsByGroup ($options=null)
 Dummy documentation.
 getServices ($options=null)
 Dummy documentation.
 getServicegroups ($options=null)
 Dummy documentation.
 getContacts ($options=null)
 Dummy documentation.
 getContactgroups ($options=null)
 Dummy documentation.
 getCommands ($options=null)
 Dummy documentation.
 getTimeperiods ($options=null)
 Dummy documentation.
 getLogs ($options=null)
 Dummy documentation.
 getComments ($options=null)
 Dummy documentation.
 getDowntimes ($options=null)
 Dummy documentation.
 getProcessInfo ($options=null)
 Dummy documentation.
 getHostTotals ($options=null)
 Dummy documentation.
 getServiceTotals ($options=null)
 Dummy documentation.
 getHostPerformance ($last_program_start, $options=null)
 Dummy documentation.
 getServicePerformance ($last_program_start, $options=null)
 Dummy documentation.
 getSchedulingQueue ($last_program_start, $options=null)
 Dummy documentation.
 getPerformanceStats ($type, $last_program_start, $options=null)
 Dummy documentation.

Static Public Member Functions

static instance ($config=null)
 Singleton instantiator.

Detailed Description

Livestatus Class.

usage:

access nagios data by various get<Table> methods.

options is an hash array which provides filtering and other query options:

example: $ls = Livestatus::instance(); $hosts = getHosts($options)

options = array( 'auth' => bool, # authentication is enabled by default. # use this switch to disable it

'limit' => nr of records, # limit result set

'paging' => $this, # use paging. $this is a reference to # a kohana object to access the input # and template reference

'order' => $order, # sorting / order by structure, ex.: # array('name' => 'DESC') # array('host_name' => 'DESC', 'description' => 'DESC') 'order_mappings' => $map, # Makes it possible to map a fictive column name to a real # column name for sorting. Useful when using 'callback' columns.

'filter' => $filter, # filter structure used to filter the # resulting objects # simple filter: # array('name' => 'value') # simple filter with operator: # array('name' => array('!=' => 'value')) # logical operator: # array('-or' => array('name' => 'value', 'address' => 'othervalue')) # nested filter: # array('-or' => array('name' => 'value', 'address' => array('~~' => 'othervalue'))) # # filter can also be a string containing an expression with livestatus operations, # grouped with logical operators. Example: # # 'host_name ~~ "name regexp" and (status = 1 or status = 2)' # # see livestatus docs for details about available operators 'extra_header' => # A raw livestatus header block, useful for example to raw filters. );


Constructor & Destructor Documentation

Livestatus::__construct ( config = null  ) 

Creates a new isntance of the livestatus interface.

Parameters:
$config array Of configuration for connection

Member Function Documentation

Livestatus::filterable_columns (  ) 

Fugly but the right place to .

. place it. Originally intended for config listing.

Todo:
this only suits string columns, not lists, not ints
Returns:
array
Livestatus::getHosts ( options = null  ) 

Retrieve hosts from Livestatus.

Parameters:
$options 
Returns:
array

The documentation for this class was generated from the following file:
 All Data Structures Functions Variables

Generated on 19 Dec 2018 for ninja by  doxygen 1.6.1