Lines Matching refs:this

35         $this->mainHelper = $this->loadHelper('loglog_main');
36 $this->logHelper = $this->loadHelper('loglog_logging');
47 $this->handleThreshold(
49 $this->getConf('login_failed_max'),
50 $this->getConf('login_failed_interval'),
51 $this->getConf('login_failed_email')
54 $this->handleThreshold(
56 $this->getConf('login_success_max'),
57 $this->getConf('login_success_interval'),
58 $this->getConf('login_success_email')
77 $this->resetMultiplier();
78 $this->threshold = $threshold;
79 $this->interval = $minuteInterval * 60;
80 $this->now = time();
81 $max = $this->now;
82 $min = $this->now - ($this->interval);
84 $msgNeedle = $this->mainHelper->getNotificationString($logType, 'msgNeedle');
85 $lines = $this->logHelper->readLines($min, $max);
86 $cnt = $this->logHelper->countMatchingLines($lines, $msgNeedle);
92 $this->statfile = $conf['cachedir'] . '/loglog.' . $logType . '.stat';
94 if ($this->actNow()) {
95 io_saveFile($this->statfile, $this->multiplier);
96 $this->sendAlert($logType, $email);
108 $template = $this->localFN($logType);
110 $this->mainHelper->sendEmail(
112 $this->getLang($this->mainHelper->getNotificationString($logType, 'emailSubjectLang')),
115 'threshold' => $this->threshold,
116 'interval' => $this->interval / 60, // falling back to minutes for the view
117 'now' => date('Y-m-d H:i', $this->now),
118 'sequence' => $this->getSequencePhase(),
119 'next_alert' => date('Y-m-d H:i', $this->getNextAlert()),
133 if (!is_file($this->statfile)) {
137 $lastAlert = filemtime($this->statfile);
138 $this->multiplier = (int)file_get_contents($this->statfile);
140 $intervalsAfterLastAlert = (int)floor(($this->now - $lastAlert) / $this->interval);
142 if ($intervalsAfterLastAlert === $this->multiplier) {
143 $this->increaseMultiplier();
144 } elseif ($intervalsAfterLastAlert < $this->multiplier) {
146 } elseif ($intervalsAfterLastAlert > $this->multiplier) {
147 $this->resetMultiplier(); // no longer part of series, reset multiplier
162 return $this->multiplier === 1 ? $this->multiplier : log($this->multiplier, 2) + 1;
172 return $this->now + $this->interval * $this->multiplier * 2;
180 $this->multiplier = 1;
188 $this->multiplier *= 2;