Emit an alert monitor.down, which is in the OK state.

@param ctx Rule evaluation context.
322
@Override
    public void transform(Context<MutableTimeSeriesCollectionPair> ctx) {
        DateTime now = ctx.getTSData().getCurrentCollection().getTimestamp();

        ctx.getTSData().getCurrentCollection().addMetrics(MONITOR_GROUP, get_metrics_(now, ctx));

        ctx.getAlertManager().accept(new Alert(now, MONITOR_DOWN_ALERT, () -> "builtin rule", Optional.of(false), Duration.ZERO, "builtin rule: monitor is not running for some time", EMPTY_MAP));
    }
1285036
def notify(self, level, alert, value, target=None, ntype=None, rule=None):
        

        LOGGER.info('Notify %s:%s:%s:%s', level, alert, value, target or "")

        if ntype is None:
            ntype = alert.source

        for handler in self.handlers.get(level, []):
            handler.notify(level, alert, value, target=target, ntype=ntype, rule=rule)
745393
def do_stop_alerts(self, _):
        
        self._stop_thread = True
        if self._alerter_thread.is_alive():
            self._alerter_thread.join()
        else:
            print("The alert thread is already stopped")
1022348
def on_timer(self, evt):
    
    ctrl_is_down = wx.GetKeyState(wx.WXK_CONTROL)
    ms = wx.GetMouseState()

    # New initialization when keys pressed change
    if self._key_state != ctrl_is_down:
      self._key_state = ctrl_is_down

      # Keep state at click
      self._click_ms_x, self._click_ms_y = ms.x, ms.y
      self._click_frame_x, self._click_frame_y = self.Position
      self._click_frame_width, self._click_frame_height = self.ClientSize

      # Avoids refresh when there's no move (stores last mouse state)
      self._last_ms = ms.x, ms.y

      # Quadrant at click (need to know how to resize)
      width, height = self.ClientSize
      self._quad_signal_x = 1 if (self._click_ms_x -
                                  self._click_frame_x) / width > .5 else -1
      self._quad_signal_y = 1 if (self._click_ms_y -
                                  self._click_frame_y) / height > .5 else -1

    # "Polling watcher" for mouse left button while it's kept down
    if ms.leftDown:
      if self._last_ms != (ms.x, ms.y): # Moved?
        self._last_ms = (ms.x, ms.y)
        delta_x = ms.x - self._click_ms_x
        delta_y = ms.y - self._click_ms_y

        # Resize
        if ctrl_is_down:
          # New size
          new_w = max(MIN_WIDTH, self._click_frame_width +
                                 2 * delta_x * self._quad_signal_x
                     )
          new_h = max(MIN_HEIGHT, self._click_frame_height +
                                  2 * delta_y * self._quad_signal_y
                     )
          self.ClientSize = new_w, new_h
          self.SendSizeEvent() # Needed for wxGTK

          # Center should be kept
          center_x = self._click_frame_x + self._click_frame_width / 2
          center_y = self._click_frame_y + self._click_frame_height / 2
          self.Position = (center_x - new_w / 2,
                           center_y - new_h / 2)

          self.Refresh()
          self.volume_ctrl.value = (new_h * new_w) / 3e5

        # Move the window
        else:
          self.Position = (self._click_frame_x + delta_x,
                           self._click_frame_y + delta_y)

          # Find the new center position
          x, y = self.Position
          w, h = self.ClientSize
          cx, cy = x + w/2, y + h/2
          self.mod_ctrl.value = 2.5 * cx
          self.carrier_ctrl.value = 2.5 * cy
          self.angstep.value = (cx + cy) * pi * 2e-4

      # Since left button is kept down, there should be another one shot
      # timer event again, without creating many timers like wx.CallLater
      self._timer.Start(MOUSE_TIMER_WATCH, True)
1227748
public void setAlertMessage(final String MESSAGE) {
        if (null == alertMessage) {
            _alertMessage = MESSAGE;
            fireUpdateEvent(ALERT_EVENT);
        } else {
            alertMessage.set(MESSAGE);
        }
    }
337443
def alert(self, msg):
        """"""
        if self.event_callback is not None:
            try:
                self.event_callback(msg)
            except Exception as exception:  # pylint: disable=broad-except
                _LOGGER.exception(exception)

        if self.persistence:
            self.persistence.need_save = True
142932
public void info(final IJNRPEExecutionContext ctx, final String message) {
        postEvent(ctx, new LogEvent(source, LogEventType.INFO, message));
    }
381495
private void notifyTransformed(boolean teleport)
    {
        // CHECKSTYLE IGNORE LINE: BooleanExpressionComplexity
        if (teleport
            || Double.compare(getX(), getOldX()) != 0
            || Double.compare(getY(), getOldY()) != 0
            || Double.compare(getWidth(), getOldWidth()) != 0
            || Double.compare(getHeight(), getOldHeight()) != 0)
        {
            final int length = listeners.size();
            for (int i = 0; i < length; i++)
            {
                listeners.get(i).notifyTransformed(this);
            }
        }
    }
865186
public void clickOnCheckBox(int index) {
		if(config.commandLogging){
			Log.d(config.commandLoggingTag, "clickOnCheckBox("+index+")");
		}
		
		clicker.clickOn(CheckBox.class, index);
	}
1125429
private void updateState(FSEditLogOp op, boolean checkTxnId) throws IOException {
    InjectionHandler.processEvent(InjectionEvent.SERVERLOGREADER_UPDATE, op);
    
    if (checkTxnId) {
      mostRecentlyReadTransactionTxId = ServerLogReaderUtil.checkTransactionId(
        mostRecentlyReadTransactionTxId, op);
    }
    
    updateStreamPosition();

    // read a valid operation
    core.getMetrics().readOperations.inc();
    mostRecentlyReadTransactionTime = now();

    // current log segment ends normally
    if (op.opCode == FSEditLogOpCodes.OP_END_LOG_SEGMENT) {
      LOG.info("Segment - ending log segment start txid: " + currentSegmentTxId
          + ", end txid: " + op.getTransactionId());
      // move forward with next segment
      currentSegmentTxId = op.getTransactionId() + 1;
      // set the stream to null so the next getNotification()
      // will recreate it
      currentEditLogInputStream = null;
      // indicate that a new stream will be opened
      currentEditLogInputStreamPosition = -1;
    } else if (op.opCode == FSEditLogOpCodes.OP_START_LOG_SEGMENT) {
      LOG.info("Segment - starting log segment start txid: "
          + currentSegmentTxId);
    }
  }
273180
public synchronized void waiting(Context ctxt, ILexLocation location)
	{
		// Enter a waiting state - called by thread
		waitUntilState(RunState.WAITING, RunState.RUNNING, ctxt, location);
	}
18000
function stopTimeout(ctx) {
  assert(ctx);
  if (ctx.timer != null) {
    clearTimeout(ctx.timer);
    ctx.timer = null;
  }
  ctx.stopped = true;
}
253238
protected void handleAlert(Alert alert) {
        if (LOGGEER.isDebugEnabled()) {
            LOGGEER.debug("Accepting alert box with message: {}", alert.getText());
        }
        alert.accept();
    }
652455
private void calculateHighestAlert() {
        synchronized (alerts) {
            highestAlert = null;
            for (Alert alert : alerts) {
                if (isHighestAlert(alert)) {
                    highestAlert = alert;
                }
            }
            calculateHighestAlert = false;
        }
    }
357894
public void returnOutputContext(OutputContext ctx) {
        List<ByteBuffer> remaining = ctx.releaseRemaining();
        if (pending == null) {
            pending = remaining;
        } else {
            List<ByteBuffer> tmp = pending;
            pending = remaining;
            pending.addAll(tmp);
        }
    }
600840
@Override
	public void channelActive(final ChannelHandlerContext ctx) throws Exception {
		if (this.ctx == null) {
			this.ctx = ctx;
		}

		super.channelActive(ctx);
	}
889426
public void signalAll(Signal signal) {

        for (Map.Entry<CmsUUID, CmsPublishItemStatus> entry : m_status.entrySet()) {
            entry.getValue().handleSignal(signal);
        }
        runSelectionChangeAction();
    }