Esempio n. 1
0
 protected function _buildMonitorSummaryLines(Cacti $sender)
 {
     $this->logger->log(__METHOD__, NULL, WATCHDOG_DEBUG);
     if ($this->_loadId()) {
         $stats = $this->getStatsList();
         foreach ($stats as $key => $stat) {
             // That's a final end user input, apply formatter
             $line = $key . '=' . floor($stat->getValue() / 1000);
             $sender->AddOutputLine($line);
         }
     } else {
         $this->logger->log($this->task_module . "; no metrics available yet", NULL, WATCHDOG_DEBUG);
     }
 }
Esempio n. 2
0
 /**
  * Ensure all Helpers (log) are loaded into this object
  *
  */
 public function initHelpers()
 {
     parent::initHelpers();
     $this->logger->log(__METHOD__, NULL, WATCHDOG_DEBUG);
     // register in the Queue of StatsProviders
     $prodQueue = Queue::getInstance();
     $prodQueue->attach($this);
     // register our callback for Cacti Output
     $cactiObservable = Cacti::getInstance();
     $cactiObservable->attach($this);
     return $this;
 }