1834007 Members
1961 Online
110063 Solutions
New Discussion

errors in Alarmdef file

 
SOLVED
Go to solution
Maurice Peterse
Frequent Advisor

errors in Alarmdef file

this is a part of my alarmdef file.... what's wrong?
the error is : IF conditions must be followed by THEN clause.
("/var/opt/perf/alarmdef", near line - 33)

this is a part :
alarm CPU_Bottleneck > 60 and omniagent:APP_ALIVE_PROC == 0 for 5 minutes
type = "CPU"
start
if CPU_Bottleneck > 80 and omniagent:APP_ALIVE_PROC == 0 for 5 minutes then
red alert "CPU Bottleneck probability= ", CPU_Bottleneck, "%"
else
yellow alert "CPU Bottleneck probability= ", CPU_Bottleneck, "%"
repeat every 15 minutes
if CPU_Bottleneck > 80 and omniagent:APP_ALIVE_PROC == 0 for 5 minutes then
red alert "CPU Bottleneck probability= ", CPU_Bottleneck, "%"
else
yellow alert "CPU Bottleneck probability= ", CPU_Bottleneck, "%"
end
reset alert "End of CPU Bottleneck Alert"
3 REPLIES 3
Christopher McCray_1
Honored Contributor
Solution

Re: errors in Alarmdef file

It looks to me that you don't have your test condition in brackets or parentheses, whichever shell you are using, or you need to separate the last word of your test and then with a semicolon. Or, try putting the then on a different line. Good luck an hope I have helped.

Chris
It wasn't me!!!!
Maurice Peterse
Frequent Advisor

Re: errors in Alarmdef file

in brackets didn't work...
different lines AND brackets did

thanx!!
Christopher McCray_1
Honored Contributor

Re: errors in Alarmdef file

You may also have the then on the same line if you separate the ] and then with a semicolon. Maybe too much info since it works, but I thought I'd offer it up as a style point. I am always happy to help. Good luck.

Chris
It wasn't me!!!!