@gen.coroutine
def notify(self, level, alert, value, target=None, ntype=None, rule=None):
    LOGGER.debug('Handler (%s) %s', self.name, level)
    message = self.get_short(level, alert, value, target=target, ntype=ntype, rule=rule)
    LOGGER.debug('message1:%s', message)
    if (level == 'normal'):
        event_type = 'resolve'
    else:
        event_type = 'trigger'
    headers = {'Content-type': 'application/json'}
    client_url = None
    if target:
        client_url = alert.get_graph_url(target)
    m = hashlib.md5()
    incident_key_str = 'alert={},client_url={}'.format(alert.name, client_url)
    m.update(incident_key_str)
    incident_key = m.hexdigest()
    data = {'service_key': self.service_key, 'event_type': event_type, 'description': message, 'details': message, 'incident_key': incident_key, 'client': 'graphite-beacon', 'client_url': client_url}
    (yield self.client.fetch('https://events.pagerduty.com/generic/2010-04-15/create_event.json', body=json.dumps(data), headers=headers, method='POST'))
@gen.coroutine
def notify(self, level, alert, value, target=None, ntype=None, rule=None):
    LOGGER.debug('Handler (%s) %s', self.name, level)
    message = self.get_short(level, alert, value, target=target, ntype=ntype, rule=rule)
    LOGGER.debug('message1:%s', message)
    if (level == 'normal'):
        event_type = 'resolve'
    else:
        event_type = 'trigger'
    headers = {'Content-type': 'application/json'}
    client_url = None
    if target:
        client_url = alert.get_graph_url(target)
    m = hashlib.md5()
    incident_key_str = 'alert={},client_url={}'.format(alert.name, client_url)
    m.update(incident_key_str)
    incident_key = m.hexdigest()
    data = {'service_key': self.service_key, 'event_type': event_type, 'description': message, 'details': message, 'incident_key': incident_key, 'client': 'graphite-beacon', 'client_url': client_url}
    (yield self.client.fetch('https://events.pagerduty.com/generic/2010-04-15/create_event.json', body=json.dumps(data), headers=headers, method='POST'))