4 Replies Latest reply on Aug 18, 2019 8:35 PM by Brendan Murray

    Can we update DDA table using cell tick internal event ?

    Prasad Veerangan
      Share This:

      Hi Team,

       

      Can we update a DDA table  using MC cell tick internal event ?

       

      I need to update the count incoming events of a particular event class using cell tick interval.

       

      Thanks

      Prasad V

        • 1. Re: Can we update DDA table using cell tick internal event ?
          Daniel Ciorciari

          Hi Prasad,

           

          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.

           

          refine housekeeping:

            MC_CELL_TICK($E) where [ $E.status == OPEN ]

            {

              execute($E, 'housekeeping.pl', [], NO);

            }

          END

           

          Also note the cell tick interval is configurable in mcell.conf (default is 10 minutes).

           

            CellTickInterval=10m

           

          Dan

          1 of 1 people found this helpful
          • 2. Re: Can we update DDA table using cell tick internal event ?
            Charles Kelley

            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.

             

            Charles

            • 3. Re: Can we update DDA table using cell tick internal event ?
              Prasad Veerangan

              Hi Charles,

               

              Using cell tick interval. Trying to enable event protection in case of flood scenario with predefined threshold limit in Dynamic table.

              • 4. Re: Can we update DDA table using cell tick internal event ?
                Brendan Murray

                Hi Prasad,

                 

                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.

                 

                Regards,

                 

                Brendan