Open divgwd opened 7 years ago
@divgwd The previous state is actually maintained in the code but it is not exposed. It seems like a simple task to expose that field and let handlers use it when evaluating templates etc. PRs welcome.
@nathanielc Hi, can you let me know how to compile the code once it's edited, am new to golang :)
@divgwd there's a build.sh at the root of the repo
@divgwd there is a guide on how to build and run the tests in CONTRIBUTION.MD file. See here.
Isn't it available in templates? I've tried {{.PreviousLevel}}->{{.Level}}
but I get an error: alert2: template: message:1:2: executing \"message\" at <.PreviousLevel>: can't evaluate field PreviousLevel in type kapacitor.messageInfo
Hm. It looks like there is no support for the previous level in templates. Is it possible to add it?
Hi, I wanted to if there is a way to get previous state in the alert node? meaning when I raise a critical alert for a certain system metric(say cpu usage) I get the level of the alert as 'CRITICAL' and if the usage comes down but still is high enough to raise a 'WARN' alert then I would want to know what the previous state was (in this case 'CRITICAL').Is there a way to know about the previous state?? Any help is appreciated! Thanks in advance!