FreenetIS
 All Classes Namespaces Functions Variables Pages
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes | List of all members
Monitor_host_Model Class Reference
Inheritance diagram for Monitor_host_Model:
ORM

Public Member Functions

 get_all_monitored_hosts ($priority=NULL, $order_by=NULL, $filter_sql= '')
 Return all monitored hosts.
 get_all_hosts_by_state ($state)
 Returns all hosts by given state to notification.
 get_max_state_changed_diff ($state)
 Return maximum diff between state changed date and last attempt date.
 get_all_priorities ()
 Return all priorities.
 update_host ($ip_address, $state, $latency)
 Update host with data from fping.
 insert_hosts ($ids=array(), $priority=0)
 Adds hosts to monitoring.
 update_hosts ($ids=array(), $priority=0)
 Updates given hosts by IDs.
 delete_hosts ($ids=array(), $column= 'device_id')
 Deletes given hosts by IDS from monitoring.

Static Public Member Functions

static get_state ($text)
 Return state as number from string format.
static get_label ($state)
 Return state as label from number format.
static get_color ($state)
 Return state as color from number format.

Public Attributes

const STATE_UNKNOWN = 0
 State of host is unknown.
const STATE_UP = 1
 State of host is up.
const STATE_DOWN = 2
 State of host is down.

Protected Attributes

 $belongs_to = array('device')

Member Function Documentation

Monitor_host_Model::delete_hosts (   $ids = array(),
  $column = 'device_id' 
)

Deletes given hosts by IDS from monitoring.

Author
Michal Kliment klime.nosp@m.nt@f.nosp@m.reene.nosp@m.tis..nosp@m.org
Parameters
array$ids
string$column
Returns
MySQL_Result
Monitor_host_Model::get_all_hosts_by_state (   $state)

Returns all hosts by given state to notification.

Author
Michal Kliment
Parameters
type$state
Returns
type
Monitor_host_Model::get_all_monitored_hosts (   $priority = NULL,
  $order_by = NULL,
  $filter_sql = '' 
)

Return all monitored hosts.

Author
Michal Kliment
Parameters
type$priority
string$order_by
type$filter_sql
Returns
type
Monitor_host_Model::get_all_priorities ( )

Return all priorities.

Author
Michal Kliment
static Monitor_host_Model::get_color (   $state)
static

Return state as color from number format.

Author
Michal Kliment
Parameters
type$state
Returns
boolean
static Monitor_host_Model::get_label (   $state)
static

Return state as label from number format.

Author
Michal Kliment
Parameters
type$state
Returns
boolean
Monitor_host_Model::get_max_state_changed_diff (   $state)

Return maximum diff between state changed date and last attempt date.

Author
Michal Kliment
Parameters
type$state
Returns
type
static Monitor_host_Model::get_state (   $text)
static

Return state as number from string format.

Author
Michal Kliment
Parameters
type$text
Returns
type
Monitor_host_Model::insert_hosts (   $ids = array(),
  $priority = 0 
)

Adds hosts to monitoring.

Author
Michal Kliment
Parameters
type$ids
type$priority
Returns
type
Monitor_host_Model::update_host (   $ip_address,
  $state,
  $latency 
)

Update host with data from fping.

Author
Michal Kliment
Parameters
type$ip_address
type$state
null$latency
Returns
type
Monitor_host_Model::update_hosts (   $ids = array(),
  $priority = 0 
)

Updates given hosts by IDs.

Author
Michal Kliment klime.nosp@m.nt@f.nosp@m.reene.nosp@m.tis..nosp@m.org
Parameters
array$ids
integer$priority
Returns
MySQL_Result

The documentation for this class was generated from the following file: