1 of 1 people found this helpful
Yes. I would recommend a rule triggered by the cell tick event that calls an external script. The script can use mquery to count the events you're interested in then use mposter to update the table.
MC_CELL_TICK($E) where [ $E.status == OPEN ]
execute($E, 'housekeeping.pl', , NO);
Also note the cell tick interval is configurable in mcell.conf (default is 10 minutes).
Why have that done on a cell tick interval?
Just have a rule on that specific event class that you want a count of. Whenever an event of that class is received, use that DDA object and increment the count. Then, the count is constantly updated, no need to have a cell tick event do the count separately.
Using cell tick interval. Trying to enable event protection in case of flood scenario with predefined threshold limit in Dynamic table.
I agree with Charles. I would not be using the cell tick event to do what you are trying to do. Querying the cell every n minutes will add an unnecessary processing load on the cell and could impact performance. It is more efficient to simply increment the counter in the DDA record with a new rule every time an event of the class in question is received. The new rule would also evaluate the counter and take whatever action you want to happen when the count is too high.
You would also need to have a second rule (an execute rule) to decrement the counter when an event of the class in question is closed. You could also have the second rule re-evaluate the counter and, if the count drops below the threshold, cancel the action that the first rule initiated. This method will reduce the processing burden on the cell and, as an added benefit, remove the latency introduced by waiting for the cell tick event.