# IBM AS/400 (IBM i) health alerts

# CPU utilization
# High sustained CPU usage across the entire system usually warrants action.
template: as400_cpu_utilization
      on: as400.cpu_utilization
   class: Utilization
    type: Database
component: AS/400
  lookup: average -5m unaligned of utilization
   units: %
   every: 30s
    warn: $this > 85
    crit: $this > 92
   delay: down 15m multiplier 1.5 max 1h
 summary: AS/400 CPU utilization
    info: CPU utilization is ${value}% on the AS/400 system
      to: dba

# System ASP (disk) usage
# Alert when the primary storage pool approaches capacity.
template: as400_system_asp_usage
      on: as400.system_asp_usage
   class: Utilization
    type: Database
component: AS/400
  lookup: average -5m unaligned of used
   units: %
   every: 1m
    warn: $this > 85
    crit: $this > 92
   delay: down 30m multiplier 1.5 max 2h
 summary: AS/400 system ASP usage
    info: System ASP usage is ${value}% on the AS/400 system
      to: dba

# Average disk busy percentage
# Sustained high disk activity often correlates with system slowdowns.
template: as400_disk_busy_average
      on: as400.disk_busy_average
   class: Utilization
    type: Database
component: AS/400
  lookup: average -5m unaligned of busy
   units: %
   every: 1m
    warn: $this > 80
    crit: $this > 90
   delay: down 30m multiplier 1.5 max 2h
 summary: AS/400 average disk busy
    info: Average disk busy percentage is ${value}% on the AS/400 system
      to: dba

# Waiting jobs in the main job queue
# Trigger only when a large backlog of waiting jobs accumulates.
template: as400_job_queue_waiting
      on: as400.job_queue_length
   class: Workload
    type: Database
component: AS/400
  lookup: max -5m unaligned of waiting
   units: jobs
   every: 1m
    warn: $this > 200
    crit: $this > 500
   delay: down 15m multiplier 1.5 max 2h
 summary: AS/400 waiting jobs in main job queue
    info: ${value} jobs are waiting in the system job queue on the AS/400 system
      to: dba
