check process mqtt-outbox matching "mqtt-outbox"
    start program = "/bin/systemctl start mqtt-outbox"
    stop program  = "/bin/systemctl stop mqtt-outbox"

    if cpu > 80% for 3 cycles then restart
    if memory > 50 MB then restart
    if 3 restarts within 5 cycles then exec "/bin/systemctl stop mqtt-outbox"

check program mqtt-outbox-storage path "/usr/bin/iqnergy/mqtt-outbox-check-storage.sh"
    every 12 cycles
    if status != 0 then exec "/bin/bash -c 'find /var/lib/mqtt-outbox/ -type f -delete && systemctl restart mqtt-outbox'"

