System_Model Class Reference

Reads various nagios-related configuration files. More...

Static Public Member Functions

static get_nagios_base_path ()
 Fetch nagios base path as configured in config file.
static get_nagios_etc_path ()
 Fetch nagios etc path as configured in config file.
static get_pipe ()
 Fetch nagios command pipe as configured by the nagios_pipe setting.
static parse_config_file ($config_file)
 Reads a configuration file in the format variable=value and returns it in an array.
static get_status_info ($file= 'status.log', $section= 'programstatus')
 Fetch status info from nagios log file.
static extract_stat_key ($key=false, &$arr=false)
 Extract values from status.log array returned from get_status_info().

Detailed Description

Reads various nagios-related configuration files.


Member Function Documentation

static System_Model::get_nagios_base_path (  )  [static]

Fetch nagios base path as configured in config file.

Returns:
string 'config.nagios_base_path'
static System_Model::get_nagios_etc_path (  )  [static]

Fetch nagios etc path as configured in config file.

Returns:
string directory where nagios.cfg can be found
static System_Model::get_pipe (  )  [static]

Fetch nagios command pipe as configured by the nagios_pipe setting.

If the pipe does not exist or is not writable, fetch pipe as configured by command_file in nagios.cfg.

Returns:
string path to the configured pipe
static System_Model::parse_config_file ( config_file  )  [static]

Reads a configuration file in the format variable=value and returns it in an array.

lines beginning with # are considered to be comments

Parameters:
$config_file The configuration file to parse
Returns:
Array of key => value type on success, false on errors

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