* @license http://www.gnu.org/licenses/gpl-2.0.txt GPL, version 2 * @author Icinga Development Team */ // {{{ICINGA_LICENSE_HEADER}}} namespace Icinga\Module\Monitoring\DataView; class EventHistory extends DataView { /** * Retrieve columns provided by this view * * @return array */ public function getColumns() { return array( 'cnt_notification', 'cnt_hard_state', 'cnt_soft_state', 'cnt_downtime_start', 'cnt_downtime_end', 'host_name', 'service_description', 'object_type', 'timestamp', 'raw_timestamp', 'state', 'attempt', 'max_attempts', 'output', 'type' ); } public function getSortRules() { return array( 'raw_timestamp' => array( 'default_dir' => self::SORT_DESC ), 'timestamp' => array( 'default_dir' => self::SORT_DESC ) ); } public function getFilterColumns() { return array( 'hostgroups' ); } } ======= 'type', 'host', 'service' ); } /** * Return the table name * * @return string */ public static function getTableName() { return 'eventhistory'; } /** * Retrieve default sorting rules for particular columns. These involve sort order and potential additional to sort * * @return array */ public function getSortRules() { return array( 'raw_timestamp' => array( 'order' => self::SORT_DESC ) ); } }