Combined graphs lets you create graphs that combines multiple checks into one single graph. More...
Public Member Functions | |
__construct ($id=false) | |
constructor | |
get_object_by_name ($name) | |
returns an object as identified by its nagios-name | |
get_properties () | |
Fetches the properties for the current object type. | |
get_object () | |
Loads an object from database and populates $this->obj with it. | |
delete_object () | |
Delete object after validating that it is safe to do so. | |
get_cmd_bar_links () | |
Returns a list of actions that are legal for this object type. | |
get_objects_for_user ($obj_type=false) | |
Thin wrapper for returning user's objects of an optionally specified type. | |
get_object_name () | |
Returns the name of the object in question. | |
save_object ($user=true) | |
Writes the $this->obj to the database if it validates properly. | |
Static Public Member Functions | |
static | object_exists ($obj, $id) |
Check if an object of the specified type and id exists. | |
Data Fields | |
$properties | |
This object's properties (required vars, allowed values etc). | |
$type = 'combined_graph' | |
The type name of this object - must be overridden. |
Combined graphs lets you create graphs that combines multiple checks into one single graph.
This is different from Graph collections, which combines several graphs into one page.
Select the services and hosts you wish to combine into one graph below - remember to consider the scale of the output.
For more information, see http://docs.pnp4nagios.org/pnp-0.6/tpl_special
combined_graph_class::delete_object | ( | ) |
Delete object after validating that it is safe to do so.
.. Delete exactly one object of the type $obj_type match topic value against topic to work around pressing 'reload'
This method is adapted from previous version to use object variables and NOT to print anything - only return true or array with messages to the user to be handled by the gui.
This method calls banish_object() to do the actual deletion (mostly). Call banish_object() straight away if you want to force the deletion.
Error or success messages can be retrieved from get_deletion_message()
Reimplemented from object_class.
combined_graph_class::get_object | ( | ) |
Loads an object from database and populates $this->obj with it.
Reimplemented from object_class.
static combined_graph_class::object_exists | ( | $ | obj_type, | |
$ | id | |||
) | [static] |
Check if an object of the specified type and id exists.
Objects 'exist' if they're mentioned in the Object_Index_Table for their class. This can mean that they exist in limbo if the programmer added it via the 'add_to_object_index_table()' function, but we need to live with that.
$obj_type | string; Object type to check for | |
$id | integer; Id of the object to find |
Reimplemented from object_class.
combined_graph_class::save_object | ( | $ | user = true |
) |
Writes the $this->obj to the database if it validates properly.
$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. |
Reimplemented from object_class.
combined_graph_class::$properties |
array( 'var_index' => array( 'title' => 'string', 'comment' => 'string', 'type' => 'select', 'services' => 'mselect', ), 'required' => array( 'title', 'comment', 'type', 'services', ), 'label' => array( 'title' => 'Title', 'comment' => 'Comment', 'type' => 'Type', 'services' => 'Services', ), 'special' => array( 'type' => array('area' => 'Area', 'line1' => 'Thin line', 'line2' => 'Medium line', 'line3' => 'Thick line'), 'services' => array(), ), 'topic' => 'title', )
This object's properties (required vars, allowed values etc).
Reimplemented from object_class.