Summary_Reports_Model Class Reference

Big, fat TODO: Almost every method asks the DB for all data and returns it. More...

Inheritance diagram for Summary_Reports_Model:
Reports_Model

Public Member Functions

 get_events ($auth)
 Used from the HTTP API.
 top_alert_producers ()
 Get alert summary for "top (hard) alert producers".
 alert_totals ()
 Get alert totals.
 recent_alerts ()
 Find and return the latest $this->options['summary_items'] alert producers according to the search criteria.
 histogram ($slots=false)
 Fetch alert history for histogram report.

Static Public Member Functions

static add_event_comment ($timestamp, $event_type, $host_name, $service, $comment, $username)
 Add a new comment to the event pointed to by the timestamp/event_type/host_name/service.

Detailed Description

Big, fat TODO: Almost every method asks the DB for all data and returns it.

Instead, users should subscribe what they're interested in, and be fed that data once the query runs, once.


Member Function Documentation

Summary_Reports_Model::alert_totals (  ) 

Get alert totals.

This is identical to the toplist in many respects, but the result array is different.

Returns:
Array of counts divided by object types and states
Summary_Reports_Model::get_events ( auth  ) 

Used from the HTTP API.

Parameters:
$auth Op5Auth
Returns:
array
Summary_Reports_Model::histogram ( slots = false  ) 

Fetch alert history for histogram report.

Parameters:
$slots array with slots to fill with data
Returns:
array with keys: min, max, avg, data
Summary_Reports_Model::top_alert_producers (  ) 

Get alert summary for "top (hard) alert producers".

Returns:
Array in the form { rank => array() }

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