:rtype: twilio.rest.monitor.v1.alert.AlertList
184227
def alerts(self):
        
        if self._alerts is None:
            self._alerts = AlertList(self)
        return self._alerts
698427
async def get_alarms(self):
        """"""
        url = '{}{}'.format(self.base_url, self.endpoint)

        try:
            with async_timeout.timeout(5, loop=self._loop):
                response = await self._session.get(url)

            _LOGGER.debug(
                "Response from Netdata: %s", response.status)
            data = await response.text()
            _LOGGER.debug(data)
            self.alarms = data

        except (asyncio.TimeoutError, aiohttp.ClientError, socket.gaierror):
            _LOGGER.error("Can not load data from Netdata")
            raise exceptions.NetdataConnectionError()
46151
def get_alerts_for_trigger(trigger_id)
      # TODO: add additional filters
      return [] unless trigger_id

      url = '/?triggerIds=' + trigger_id
      ret = http_get(url)
      val = []
      ret.each { |a| val.push(Alert.new(a)) }
      val
    end
79078
def alertingNetToMs(Facility_presence=0, ProgressIndicator_presence=0,
                    UserUser_presence=0):
    """"""
    a = TpPd(pd=0x3)
    b = MessageType(mesType=0x1)  # 00000001
    packet = a / b
    if Facility_presence is 1:
        c = FacilityHdr(ieiF=0x1C)
        packet = packet / c
    if ProgressIndicator_presence is 1:
        d = ProgressIndicatorHdr(ieiPI=0x1E)
        packet = packet / d
    if UserUser_presence is 1:
        e = UserUserHdr(ieiUU=0x7E)
        packet = packet / e
    return packet
326967
def samecode_alerts(self, samecode):
        """"""
        return [x for x in self._alerts if samecode in x.samecodes]
380352
def wait_for_and_dismiss_alert(driver, timeout=settings.LARGE_TIMEOUT):
    
    alert = wait_for_and_switch_to_alert(driver, timeout)
    alert_text = alert.text
    alert.dismiss()
    return alert_text
498367
def get_alert(self, value):
        
        ret = 'OK'
        try:
            if value <= self.get_limit('critical', stat_name=self.plugin_name):
                ret = 'CRITICAL'
            elif value <= self.get_limit('warning', stat_name=self.plugin_name):
                ret = 'WARNING'
            elif value <= self.get_limit('careful', stat_name=self.plugin_name):
                ret = 'CAREFUL'
        except (TypeError, KeyError) as e:
            # Catch TypeError for issue1373
            ret = 'DEFAULT'

        return ret
903684
def get_single_alert(alert_id)
      ret = http_get('/alert/' + alert_id)
      val = Alert.new(ret)
      val
    end
105998
def loadMonitors(self, callback=None, errback=None, **kwargs):
        
        import ns1.monitoring
        monitors_list = self.monitors().list(callback, errback)

        return [ns1.monitoring.Monitor(self.config, m) for m in monitors_list]
911269
def get_notify_observers_kwargs(self):
        
        return {'x_new': self._linear.adj_op(self._x_new),
                'z_new': self._z, 'idx': self.idx}
759952
def alert(msg,body="",icon=None):
    
    if type(body) == str:
        body = body[:200]
    if call(["which","notify-send"]) == 0:
        if icon is not None:
            call(["notify-send",msg,"-i",icon,body])
        else:
            call(["notify-send",msg,body])
    else:
        print(("ALERT: ", msg))
1130158
def get_alert(thing_name, key, session=None):
    
    return _request('get', '/get/alert/for/{0}'.format(thing_name), params={'key': key}, session=session)
31
def monitor(self):
        
        if self._monitor is None:
            from twilio.rest.monitor import Monitor
            self._monitor = Monitor(self)
        return self._monitor
1220471
def get_alert_log(self,
                      current=0,
                      minimum=0,
                      maximum=100,
                      header="",
                      action_key=None):
        """"""
        return self.get_alert(current=current,
                              minimum=minimum,
                              maximum=maximum,
                              header=header,
                              action_key=action_key,
                              log=True)
879004
public void setAlerts(List<Alert> alerts) {
		if (format == null) {
			throw new IllegalStateException(
					"You have to use setFormat with a valid output format before using setAlert!");
		}
		if (!ALARM_FORMAT.equals(format) && !INDICATOR_FORMAT.equals(format) && !DISPLAY_FORMAT.equals(format)) {
			throw new IllegalStateException(
					"You can use setAlert only for ALARM, INDICATOR or DISPLAY output formats!");
		}
		this.alerts = alerts;
	}
750218
def notifications(self):
        
        if self._notifications is None:
            self._notifications = NotificationList(self._version, account_sid=self._solution['sid'], )
        return self._notifications
1373107
def get_alert(self, stat, header=""):
        """"""
        if not isinstance(stat['size'], numbers.Number):
            ret = 'DEFAULT'
        else:
            ret = 'OK'

            if stat['critical'] is not None and \
               stat['size'] > int(stat['critical']) * 1000000:
                ret = 'CRITICAL'
            elif stat['warning'] is not None and \
                    stat['size'] > int(stat['warning']) * 1000000:
                ret = 'WARNING'
            elif stat['careful'] is not None and \
                    stat['size'] > int(stat['careful']) * 1000000:
                ret = 'CAREFUL'

        # Get stat name
        stat_name = self.get_stat_name(header=header)

        # Manage threshold
        self.manage_threshold(stat_name, ret)

        # Manage action
        self.manage_action(stat_name,
                           ret.lower(),
                           header,
                           stat[self.get_key()])

        return ret