HEX
Server: Apache/2.4.34 (Red Hat) OpenSSL/1.0.2k-fips
System: Linux WORDPRESS 3.10.0-1160.118.1.el7.x86_64 #1 SMP Thu Apr 4 03:33:23 EDT 2024 x86_64
User: digital (1020)
PHP: 7.2.24
Disabled: NONE
Upload Files
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"