# IBM MQ health alerts

# Queue manager availability
template: mq_queue_manager_down
      on: mq.qmgr.status
   class: Availability
    type: Message Queue
component: IBM MQ
    calc: $status
   units: status
   every: 30s
    crit: $this < 1
 summary: IBM MQ queue manager status
    info: Queue manager status value is ${value} (0=down, 1=running)
      to: sysadmin

# Log utilization
template: mq_log_utilization
      on: mq.qmgr.log_utilization
   class: Utilization
    type: Message Queue
component: IBM MQ
  lookup: average -5m unaligned of used
   units: %
   every: 1m
    warn: $this > 80
    crit: $this > 90
   delay: down 30m multiplier 1.5 max 2h
 summary: IBM MQ queue manager log utilization
    info: Queue manager log utilization is ${value}%
      to: dba

# Queue depth percentage
template: mq_queue_depth_percentage
      on: mq.queue.depth_percentage
   class: Utilization
    type: Message Queue
component: IBM MQ
  lookup: max -5m unaligned of percentage
   units: %
   every: 1m
    warn: $this > 80
    crit: $this > 90
   delay: down 15m multiplier 1.5 max 2h
 summary: IBM MQ queue ${label:queue} depth percentage
    info: Queue ${label:queue} is at ${value}% of its configured depth
      to: sysadmin
