# you can disable an alarm notification by setting the 'to' line to: silent

# --- Availability ---

 template: am_express_route_circuit_arp_availability
       on: azure_monitor.express_route_circuit.arp_availability
    class: Availability
     type: Other
component: ExpressRoute
   lookup: average -5m unaligned of average
    units: percentage
    every: 1m
     warn: $this < (($status >= $WARNING)  ? (99) : (95))
     crit: $this < (($status == $CRITICAL) ? (95) : (90))
    delay: down 5m multiplier 1.5 max 1h
  summary: ExpressRoute ARP availability on ${label:resource_name}
     info: ARP availability of ExpressRoute circuit ${label:resource_name} \
           in ${label:resource_group} (${label:region}). \
           Low ARP availability indicates layer 2 connectivity problems between \
           the Microsoft edge and the provider/customer edge
       to: sysadmin

 template: am_express_route_circuit_bgp_availability
       on: azure_monitor.express_route_circuit.bgp_availability
    class: Availability
     type: Other
component: ExpressRoute
   lookup: average -5m unaligned of average
    units: percentage
    every: 1m
     warn: $this < (($status >= $WARNING)  ? (99) : (95))
     crit: $this < (($status == $CRITICAL) ? (95) : (90))
    delay: down 5m multiplier 1.5 max 1h
  summary: ExpressRoute BGP availability on ${label:resource_name}
     info: BGP availability of ExpressRoute circuit ${label:resource_name} \
           in ${label:resource_group} (${label:region}). \
           Low BGP availability indicates routing session problems that can \
           cause traffic disruption
       to: sysadmin

# --- Bandwidth Utilization ---

 template: am_express_route_circuit_ingress_bandwidth_utilization
       on: azure_monitor.express_route_circuit.bandwidth_utilization
    class: Utilization
     type: Other
component: ExpressRoute
   lookup: average -5m unaligned of ingress
    units: percentage
    every: 1m
     warn: $this > (($status >= $WARNING)  ? (70) : (80))
     crit: $this > (($status == $CRITICAL) ? (80) : (90))
    delay: down 5m multiplier 1.5 max 1h
  summary: ExpressRoute ingress bandwidth on ${label:resource_name}
     info: Ingress bandwidth utilization of ExpressRoute circuit ${label:resource_name} \
           in ${label:resource_group} (${label:region}). \
           High utilization can cause packet drops and increased latency
       to: sysadmin

 template: am_express_route_circuit_egress_bandwidth_utilization
       on: azure_monitor.express_route_circuit.bandwidth_utilization
    class: Utilization
     type: Other
component: ExpressRoute
   lookup: average -5m unaligned of egress
    units: percentage
    every: 1m
     warn: $this > (($status >= $WARNING)  ? (70) : (80))
     crit: $this > (($status == $CRITICAL) ? (80) : (90))
    delay: down 5m multiplier 1.5 max 1h
  summary: ExpressRoute egress bandwidth on ${label:resource_name}
     info: Egress bandwidth utilization of ExpressRoute circuit ${label:resource_name} \
           in ${label:resource_group} (${label:region}). \
           High utilization can cause packet drops and increased latency
       to: sysadmin

# --- QoS Drops ---

 template: am_express_route_circuit_qos_drop_in
       on: azure_monitor.express_route_circuit.qos_dropped_bits
    class: Errors
     type: Other
component: ExpressRoute
   lookup: average -5m unaligned of in
    units: bits/s
    every: 1m
     warn: $this > (($status >= $WARNING) ? (0) : (1000))
    delay: down 5m multiplier 1.5 max 1h
  summary: ExpressRoute QoS ingress drops on ${label:resource_name}
     info: Rate of QoS-dropped ingress bits on ExpressRoute circuit ${label:resource_name} \
           in ${label:resource_group} (${label:region}). \
           Non-zero QoS drops indicate traffic is exceeding configured QoS policies
       to: sysadmin

 template: am_express_route_circuit_qos_drop_out
       on: azure_monitor.express_route_circuit.qos_dropped_bits
    class: Errors
     type: Other
component: ExpressRoute
   lookup: average -5m unaligned of out
    units: bits/s
    every: 1m
     warn: $this > (($status >= $WARNING) ? (0) : (1000))
    delay: down 5m multiplier 1.5 max 1h
  summary: ExpressRoute QoS egress drops on ${label:resource_name}
     info: Rate of QoS-dropped egress bits on ExpressRoute circuit ${label:resource_name} \
           in ${label:resource_group} (${label:region}). \
           Non-zero QoS drops indicate traffic is exceeding configured QoS policies
       to: sysadmin
