host_class Class Reference

A host definition is used to define a physical server, workstation, device, etc. More...

Inheritance diagram for host_class:
object_class host_template_class new_host_class

Public Member Functions

 save_object ($user=true)
 Writes the $this->obj to the database if it validates properly.
 validate_object ()
 Validates an object prior to saving it to database.
 get_cmd_bar_links ()
 Returns a list of actions that are legal for this object type.
 get_nagios_struct ($prefix='')
 Export with naming and values to map nagios struct names ond format.

Data Fields

 $type = 'host'
 The nagios object type we're working with.
 $nagios_defaults
 Default values that Nagios assumes if no values are set.
 $slave_types
 A list of object types that might depend on this object type, or false.

Detailed Description

A host definition is used to define a physical server, workstation, device, etc.

that resides on your network.


Member Function Documentation

host_class::get_nagios_struct ( prefix = ''  ) 

Export with naming and values to map nagios struct names ond format.

Useful for Test this x operation

Reimplemented from object_class.

host_class::save_object ( user = true  ) 

Writes the $this->obj to the database if it validates properly.

Parameters:
$user false if this change isn't made by a user. If not, no validation will be performed, and the change won't show up in the changelog.
Returns:
true if everything worked out ok; false if not.

Reimplemented from object_class.

host_class::validate_object (  ) 

Validates an object prior to saving it to database.

This function ensures that the object being validated:

  • has all the required variables
  • doesn't rely on an object that doesn't exist
  • has valid input for 'int', 'bool' and 'checkbox' fields

Reimplemented from object_class.


Field Documentation

host_class::$nagios_defaults
Initial value:
                array('stalking_options' => array('n' => ''),
                      'notification_options' => array('n' => ''),
                      'flap_detection_options' => array('o' => 1, 'd' => 1, 'u' => 1),
                      'obsess' => '1',
                      'check_freshness' => '0',
                      )

Default values that Nagios assumes if no values are set.

Reimplemented from object_class.

host_class::$slave_types
Initial value:
 array(
                'hostextinfo',
                'hostescalation',
                'hostdependency',
                'service')

A list of object types that might depend on this object type, or false.

Reimplemented from object_class.

Reimplemented in host_template_class.


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

Generated on 22 Apr 2013 for nacoma by  doxygen 1.6.1