File: //opt/perf/examples/config/alarmdef_shift
# The following alarm example shows how you can restict an alarm to only
# function during certain hours of the day. This would be useful if you
# want to disable alarms during off-peak periods. This example shows a
# replacement for the CPU_Bottleneck alarm. You could replace that alarm
# in your alarmdef file with this to only have CPU bottleneck alerts
# post during the workday:
start_shift = "08:00"
end_shift = "17:00"
alarm (CPU_Bottleneck > 50) and
(TIME > start_shift) and
(TIME < end_shift) for 5 minutes
type = "CPU"
start
if CPU_Bottleneck > 90 then
red alert "CPU Bottleneck probability= ", CPU_Bottleneck, "%"
else
cyan alert "CPU Bottleneck probability= ", CPU_Bottleneck, "%"
repeat every 10 minutes
if CPU_Bottleneck > 90 then
red alert "CPU Bottleneck probability= ", CPU_Bottleneck, "%"
else
cyan alert "CPU Bottleneck probability= ", CPU_Bottleneck, "%"
end
if (TIME == end_shift) then
reset alert "End of CPU Bottleneck Alert (end of shift)"
else
reset alert "End of CPU Bottleneck Alert"