graph_collection_class Class Reference

Graph collections lets you create one page with a collection of different graphs. More...

Inheritance diagram for graph_collection_class:
pnp_class object_class

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 ()
 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 ()
 save_object ($user=true)
 Does not write to db, write to file.

Static Public Member Functions

static object_exists ($obj_type, $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 = 'graph_collection'
 The type name of this object - must be overridden.

Detailed Description

Graph collections lets you create one page with a collection of different graphs.

This is different from Combined graphs, which creates one graph from multiple data sources.

You decide which graphs that should be included in a collection, either through specifying a list of Services, or through enabling the Use of regex and writing regular expressions for Host name and Service description. The official documentation at http://docs.pnp4nagios.org/pnp-0.6/page includes more information about regular expressions and collections in general.

When you have configured your Graph collections, they will immediately be visible in the Graphs UI. This means that you do not need to apply your changes when dealing with Graph collections, they are generated as soon as you save them.


Member Function Documentation

graph_collection_class::delete_object (  ) 
Returns:
boolean

Reimplemented from object_class.

graph_collection_class::get_object (  ) 

Loads an object from database and populates $this->obj with it.

Returns:
$this->obj, or false if object wasn't found

Reimplemented from object_class.

graph_collection_class::get_object_name (  ) 
Returns:
string

Reimplemented from object_class.

static graph_collection_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.

Parameters:
$obj_type string; Object type to check for
$id integer; Id of the object to find

Reimplemented from object_class.

graph_collection_class::save_object ( user = true  ) 

Does not write to db, write to file.

Parameters:
$user = true boolean
Returns:
string full path of newly created page

Reimplemented from object_class.


Field Documentation

graph_collection_class::$properties
Initial value:
 array(
                'var_index' => array(
                        'use_regex' => 'pnp_page_use_regex',
                        'page_name' => 'string',
                        'host_name' => 'string', 
                        'service_desc' => 'string', 
                        'services' => 'mselect' 
                ),
                'required' => array(
                        'use_regex',
                        'page_name'
                ),
                'label' => array(
                        'use_regex' => 'Use regex',
                        'page_name' => 'Page name',
                        'host_name' => 'Host name',
                        'service_desc' => 'Service description',
                        'hosts' => 'Hosts',
                        'services' => 'Services'
                ),
                'special' => array(
                        'services' => array(), 
                ),
                'topic' => 'page_name'
        )

This object's properties (required vars, allowed values etc).

Reimplemented from object_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