function gettext_noop($message) { return N_($message); }
<?php use Icinga\Application\Config; $section = $this->menuSection(N_('Maps'))->setUrl('nagvis/show/map')->setIcon('globe'); foreach (Config::module('nagvis')->getSection('menu') as $name => $caption) { $section->add($caption, array('url' => 'nagvis/show/map', 'urlParameters' => array('map' => $name))); } $this->providePermission('nagvis/read', $this->translate('Show NagVis maps')); $this->providePermission('nagvis/edit', $this->translate('Modify NagVis maps')); $this->providePermission('nagvis/admin', $this->translate('Nagvis administration')); $this->provideRestriction('nagvis/map/filter', $this->translate('Filter NagVis maps'));
<?php $cycleClass = new Cycle('class="col1"', 'class="col2"'); ?> <table cellspacing="0" cellpadding="4" class="cycles caches"> <caption><?php echo _T('Caches'); ?> </caption> <tr> <?php echo th(N_("cache.cache")), th(N_("cache.slots")), th(N_("cache.size")), th(N_("cache.avail")), th(N_("cache.blocksgraph")), th(N_("cache.operations")), th(N_("cache.status")), th(N_("cache.hits")), th(N_("cache.hits_graph")), th(N_("cache.hits_avg_h")), th(N_("cache.hits_avg_s")), th(N_("cache.updates")), th(N_("cache.skips")), th(N_("cache.ooms")), th(N_("cache.errors")), th(N_("cache.readonly_protected")), th(N_("cache.cached")), th(N_("cache.deleted")), th(N_("cache.gc_timer")); ?> </tr> <?php $numkeys = explode(',', 'slots,size,avail,hits,updates,skips,ooms,errors,cached,deleted'); $l_clear = _T('Clear'); $l_disabled = _T('Disabled'); $l_disable = _T('Disable'); $l_enable = _T('Enable'); $l_compiling = _T('Compiling'); $l_normal = _T('Normal'); $l_confirm = _T('Sure?'); foreach (getCacheInfos() as $i => $ci) { $class = $cycleClass->next(); echo <<<TR \t<tr {$class}> TR; $pvalue = (int) ($ci['avail'] / $ci['size'] * 100); $pempty = 100 - $pvalue;
$dashboard->add(N_('Downtimes Active For More Than Three Days'), 'monitoring/list/downtimes?downtime_is_in_effect=1&downtime_scheduled_start<-3%20days&sort=downtime_start&dir=asc'); /* * Muted Objects */ $dashboard = $this->dashboard(N_('Muted'), array('priority' => 80)); $dashboard->add(N_('Disabled Service Notifications'), 'monitoring/list/services?service_notifications_enabled=0&limit=10'); $dashboard->add(N_('Disabled Host Notifications'), 'monitoring/list/hosts?host_notifications_enabled=0&limit=10'); $dashboard->add(N_('Disabled Service Checks'), 'monitoring/list/services?service_active_checks_enabled=0&limit=10'); $dashboard->add(N_('Disabled Host Checks'), 'monitoring/list/hosts?host_active_checks_enabled=0&limit=10'); $dashboard->add(N_('Acknowledged Problem Services'), 'monitoring/list/services?service_acknowledgement_type=2&service_problem=1&sort=service_state&limit=10'); $dashboard->add(N_('Acknowledged Problem Hosts'), 'monitoring/list/hosts?host_acknowledgement_type=2&host_problem=1&sort=host_severity&limit=10'); /* * Activity Stream */ $dashboard = $this->dashboard(N_('Activity Stream'), array('priority' => 90)); $dashboard->add(N_('Recent Events'), 'monitoring/list/eventhistory?timestamp>=-3%20days&sort=timestamp&dir=desc&limit=8'); $dashboard->add(N_('Recent Hard State Changes'), 'monitoring/list/eventhistory?timestamp>=-3%20days&type=hard_state&sort=timestamp&dir=desc&limit=8'); $dashboard->add(N_('Recent Notifications'), 'monitoring/list/eventhistory?timestamp>=-3%20days&type=notify&sort=timestamp&dir=desc&limit=8'); $dashboard->add(N_('Downtimes Recently Started'), 'monitoring/list/eventhistory?timestamp>=-3%20days&type=dt_start&sort=timestamp&dir=desc&limit=8'); $dashboard->add(N_('Downtimes Recently Ended'), 'monitoring/list/eventhistory?timestamp>=-3%20days&type=dt_end&sort=timestamp&dir=desc&limit=8'); /* * Stats */ $dashboard = $this->dashboard(N_('Stats'), array('priority' => 99)); $dashboard->add(N_('Check Stats'), 'monitoring/health/stats'); $dashboard->add(N_('Process Information'), 'monitoring/health/info'); /* * CSS */ $this->provideCssFile('colors.less'); $this->provideCssFile('service-grid.less');
<?php $section = $this->menuSection(N_('Overview'))->add($this->translate('Business Processes'))->setPriority(45)->setUrl('businessprocess');
*/ $dashboard = $this->dashboard(N_('Overdue'), array('priority' => 70)); $dashboard->add(N_('Late Host Check Results'), 'monitoring/list/hosts?host_next_update<now'); $dashboard->add(N_('Late Service Check Results'), 'monitoring/list/services?service_next_update<now'); $dashboard->add(N_('Acknowledgements Active For At Least Three Days'), 'monitoring/list/comments?comment_type=Ack&comment_timestamp<-3 days&sort=comment_timestamp&dir=asc'); $dashboard->add(N_('Downtimes Active For More Than Three Days'), 'monitoring/list/downtimes?downtime_is_in_effect=1&downtime_scheduled_start<-3%20days&sort=downtime_start&dir=asc'); /* * Muted Objects */ $dashboard = $this->dashboard(N_('Muted'), array('priority' => 80)); $dashboard->add(N_('Disabled Service Notifications'), 'monitoring/list/services?service_notifications_enabled=0&limit=10'); $dashboard->add(N_('Disabled Host Notifications'), 'monitoring/list/hosts?host_notifications_enabled=0&limit=10'); $dashboard->add(N_('Disabled Service Checks'), 'monitoring/list/services?service_active_checks_enabled=0&limit=10'); $dashboard->add(N_('Disabled Host Checks'), 'monitoring/list/hosts?host_active_checks_enabled=0&limit=10'); $dashboard->add(N_('Acknowledged Problem Services'), 'monitoring/list/services?service_acknowledgement_type=2&service_problem=1&sort=service_state&limit=10'); $dashboard->add(N_('Acknowledged Problem Hosts'), 'monitoring/list/hosts?host_acknowledgement_type=2&host_problem=1&sort=host_severity&limit=10'); /* * Activity Stream */ //$dashboard = $this->dashboard(N_('Activity Stream'), array('priority' => 90)); //$dashboard->add( // N_('Recent Events'), // 'monitoring/list/eventhistory?timestamp>=-3%20days&sort=timestamp&dir=desc&limit=8' //); //$dashboard->add( // N_('Recent Hard State Changes'), // 'monitoring/list/eventhistory?timestamp>=-3%20days&type=hard_state&sort=timestamp&dir=desc&limit=8' //); //$dashboard->add( // N_('Recent Notifications'), // 'monitoring/list/eventhistory?timestamp>=-3%20days&type=notify&sort=timestamp&dir=desc&limit=8'
} // }}} checking(_T("Extension Compatibility")); // {{{ $loadedZendExtensions = get_loaded_extensions(true); $extensionGood = true; if (array_search("Zend Optimizer", $loadedZendExtensions) !== false) { result(N_("info"), _T("Zend Optimizer loaded"), _T("Optimizer feature of 'Zend Optimizer' is disabled by XCache due to compatibility reason; the Loader of it is still available, encoded files are still supported")); $extensionGood = false; } if (array_search("the ionCube PHP Loader", $loadedZendExtensions) !== false) { result(N_("info"), _T("the ionCube PHP Loader loaded"), _T("Compatibility with this the ionCube PHp Loader' is taken care of; But in case if there's any problem, report to ionCube team and/or XCache devs")); $extensionGood = false; } if (!$extensionGood) { result(N_("info"), _T("Looks good")); } // }}} checking(_T("SAPI Compatibility")); // {{{ if (php_sapi_name() == "cgi" || php_sapi_name() == "cgi-fcgi" && !isset($_SERVER["FCGI_ROLE"])) { result(N_("error"), _T("CGI is not supported"), _T("Use FastCGI or FPM instead")); } else { if (php_sapi_name() == "cgi-fcgi" && isset($_SERVER["FCGI_ROLE"]) && (int) getenv("PHP_FCGI_CHILDREN") < 1) { result(N_("error"), "PHP_FCGI_CHILDREN<1", _T("PHP_FCGI_CHILDREN should be >= 1 and use 1 group of parent/childs model. See http://xcache.lighttpd.net/wiki/Faq")); } else { result(N_("info"), _T("Looks good")); } } // }}} include "./diagnosis.tpl.php";
\t\t<tr> TR; if ($isphp) { echo th(N_("entry.id")); } else { echo th(N_("entry.remove")); } echo th(N_("entry.name")), th(N_("entry.hits")), th(N_("entry.size")); if ($isphp) { echo th(N_("entry.refcount")), th(N_("entry.phprefcount")), th(N_("entry.class_cnt")), th(N_("entry.function_cnt")), th(N_("entry.file_size")), th(N_("entry.file_mtime")); echo th(N_("entry.file_device")), th(N_("entry.file_inode")); } echo th(N_("entry.hash")), th(N_("entry.atime")), th(N_("entry.ctime")); if ($listName == 'Deleted') { echo th(N_("entry.delete")); } ?> </tr> <?php foreach ($entries as $i => $entry) { $class = $cycleClass->next(); echo <<<TR \t\t<tr {$class}> TR; $hits = number_format($entry['hits']); $size = size($entry['size']); if ($isphp) { $class_cnt = number_format($entry['class_cnt']); $function_cnt = number_format($entry['function_cnt']);