Referring Alarm associated data into an expression

Hello Everyone,

I am in the process of filtering alarms based on a property called ‘Category’ in the alarm associated data.
Alarm journal or Alarm table works absolutely fine with this filtering.
The next step is to filter the alarms and use in further calculations. I am trying to use the Gateway event scripting to do the calculations on the filtered alarms.
In order to do the calculations, I need to refer to the filtering of alarm associated data into this expression.
Can someone please help as to how can I refer an alarm associated data in expression (Scripting).

In the above screen shot, the calculation works fine without filtering. I need to use the associated data filtering in this script and run the calculation on the filtered alarms.

Thanks &Regards

You could use the any_properties or all_properties parameter.

For example, if your associated data name were “category” and its value was “cat 1”, and you wanted to only count alarms that were “cat 1” you could modify your script like this:

FACritical = len(system.alarm.queryStatus(priority=['Critical'],state=['ActiveUnacked'],path=['*'+site+'/*'],any_properties=[('category','=','cat 1')]))

More information here: system.alarm.queryStatus()

Thanks a lot.
This works absolutely fine. I did go through the user manual on any properties or all properties earlier. But couldn’t find a way to write the exact syntax.
Your reply was spot on. Thank you :slight_smile:


I have a following question on any_properties or all_properties parameter.
Can I use ‘*’ to refer to part of string in this parameter?

FACritical = len(system.alarm.queryStatus(priority=['Critical'],state=['ActiveUnacked'],path=['*'+site+'/*'],any_properties=[('category','=','cat 1')]))

in the above example - if category is defined as Cat1234, Cat2345, Cat3456 etc… can I use


The * doesn’t seem to be taking the values after the word Cat.

I have also tried - any_properties=[(‘category’,’=’,‘cat’+’*’)]))
This also returns value of 0.

Any suggstions on how to use concatenation within this any_properties parameter?

Thanks & Regards