defcheck :redis do opts ({ cpu_warn: 85, cpu_critical: 95 }) task def cpu metric = rand(1..100) s = state(metric, warn: o[:cpu_warn], critical: o[:cpu_critical]) event "cpu", state, metric, description event ({ service: "cpu", description: "cpu", metric: metric, state: s }) end # task def memory # end end