8 Replies Latest reply on Mar 22, 2019 5:03 PM by Kaushik KM

    Rule for delay 10 minutes

    MOHAMMED MISBAH UDDIN SIDDIQUI
      Share This:

      On child cell, I have wrote below rule to delay processes monitoring event.for 10 minutes and successfully compiled.However, it not worked out  .Further,i have

      copied the same rule on main cell which is integrated with ibrsd  to  test , again it doesn't worked.

      Can anyone suggest.

       

       

      New TimerStart   
      EVENT ($EV)
      where [ $EV.status == OPEN AND  $EV..mc_parameter == 'PROCStatus']

       

      triggers  {
      set_timer($EV,600,modifyIncident);
      opadd($EV,NewTimer:Start :,n=New Timer:Start    :');
      }
      END

       

       

      new TmerStop
      EVENT ($EV)
      where [
      $EV.status == OPEN AND $EV..mc_parameter == 'PROCStatus']

       

      timer_info:  == modifyIncident
      {
      $EV.mc_tool_class = 'YES';
      opadd($ENewTimer:Stop,'timer Stop');
      }
      END

        • 1. Re: Rule for delay 10 minutes
          Kaushik KM

          Hi MOHAMMED MISBAH UDDIN SIDDIQUI
          I hope you have other rules being applied on the event if the event is in OPEN state., so lets change the state of the event to ACK as soon as it comes in to the cell and then apply timer, after the timer expires, you can re-OPEN the event.

           

           

          refine TchangetoAck: EVENT($EV)

          where [ $EV.status not_equals CLOSED ]

          {

          $EV.status = ACK ;

          $EV.mc_parameter_unit= HOLD ;

          }

           

          new TimerStart : EVENT($EV)

          where [ $EV.status == 'ACK' AND  $EV.mc_parameter_unit == 'HOLD' ]

          triggers

          {

             opadd($EV, '', 'keeping in ACK state till time expires or reaches the limit:') ;

             set_timer($EV,600, 'HOLD4LMT') ;

          }

          END

           

          timer reopen_event : EVENT($EV)

          where [ $EV.status == ACK  ]

          timer_info : equals 'HOLD4LMT'

          {

                $EV.status = OPEN;

               $EV.mc_tool_class = 'YES';

          }

          END

           

           

          You can change the ECF and class name accordingly to apply the rule for specific events, Please let me if this works.

          Thanks,

          Kaushik KM

          • 2. Re: Rule for delay 10 minutes
            MOHAMMED MISBAH UDDIN SIDDIQUI

            HI Kaushik,

             

            Thanks, for your quick response.

             

            I have one query regarding above rule.Can i use mc_object_class == NT_PROCESS, because i need  to apply only for specific event i.e., for process

            For instance :

            refine TchangetoAck: PATROL_EV ($EV)

            where [ $EV.status not_equals CLOSED AND $EV.mc_object_class == NT_PROCESS ]

            {

            $EV.status = ACK ;

            $EV.mc_parameter_unit= HOLD ;

            }

             

            new TimerStart : EVENT($EV)

            where [ $EV.status == 'ACK' AND  $EV.mc_parameter_unit == 'HOLD' ]

            triggers

            {

               opadd($EV, '', 'keeping in ACK state till time expires or reaches the limit:') ;

               set_timer($EV,600, 'HOLD4LMT') ;

            }

            END

             

            timer reopen_event : EVENT($EV)

            where [ $EV.status == ACK  ]

            timer_info : equals 'HOLD4LMT'

            {

                  $EV.status = OPEN;

                 $EV.mc_tool_class = 'YES';

            }

            END

            • 3. Re: Rule for delay 10 minutes
              Kaushik KM

              Hi MOHAMMED MISBAH UDDIN SIDDIQUI

               

              Yes the above code looks good, you can use -->EV.mc_object_class == 'NT_PROCESS' in where clause.

              Please give a try in your DEV environment and let us know the results.

               

              Thanks,

              Kaushik KM

              • 4. Re: Rule for delay 10 minutes
                MOHAMMED MISBAH UDDIN SIDDIQUI

                I am getting error in this line dilimiter or sometimes expected ‘, ‘

                 

                opadd($EV, '', 'keeping in ACK state till time expires or reaches the limit:') ;

                Please let me know as i have tried with multiple ways made many changes still facing error

                Sent from my iPhone

                 

                 

                 

                Best Regards,

                 

                Mohammed Misbah Siddiqui

                 

                System Engineer

                Information And Communications Technology

                 

                 

                 

                 

                تحيـاتــــــــي

                • 5. Re: Rule for delay 10 minutes
                  Kaushik KM

                  Hi MOHAMMED MISBAH UDDIN SIDDIQUI

                  I did not compile it when i sent you.

                  let me try and post it tomorrow.

                  Thanks,

                  Kaushik KM

                  • 6. Re: Rule for delay 10 minutes
                    MOHAMMED MISBAH UDDIN SIDDIQUI

                    Hi Kaushik,

                     

                    Thanks, for your swift response.

                     

                    I have written following by rule by considering yours advise.

                     

                    refine TchnagetoACK:

                    PATROL_EV($EV)

                    where [$EV.status != CLOSED AND $EV.mc_object_class == 'NT_PROCESS']

                     

                    {

                    $EV.status =ACK;

                    $EV.mc_parameter_unit = HOLD;

                    }

                    END

                     

                    new FirstTimerStart :

                    PATROL_EV($EV)

                    where [ $EV.status == 'ACK' AND  $EV.mc_parameter_unit == 'HOLD' AND $EV.mc_object_class == 'NT_PROCESS' ]

                    triggers

                    {

                       opadd($EV,DPUFIisrt TimerStart, 'DPU TIMER START') ;

                       set_timer($EV,600, 'HOLD4LMT') ;

                    }

                    END

                     

                    FirstTimerStop:

                    PATROL_EV ($EV)

                    where [ $EV.status == ACK  AND $EV.mc_object_class == 'NT_PROCESS' ]

                    timer_info : ==  'HOLD4LMT'

                    {

                          $EV.status = OPEN;

                         $EV.mc_tool_class = 'YES';

                     

                    opadd($EV,DPUFIisrt TimerStart, 'DPU TIMER START') ;

                    }

                    END

                    • 7. Re: Rule for delay 10 minutes
                      MOHAMMED MISBAH UDDIN SIDDIQUI

                      Hi Kaushik,

                       

                      I have tried with certain corrections which helped me to compile rules successfully. However, the rule is not working to hold or delay.

                       

                      Please find below rule.

                       

                       

                       

                       

                      let me know your inputs.

                       

                      Thanks,

                      Misbah

                       

                       

                      Best Regards,

                       

                      Mohammed Misbah Siddiqui

                       

                      System Engineer

                      Information And Communications Technology

                       

                       

                       

                       

                      تحيـاتــــــــي

                      • 8. Re: Rule for delay 10 minutes
                        Kaushik KM

                        Hi MOHAMMED MISBAH UDDIN SIDDIQUI

                        sorry for the delay... were you able to get it working ? if yes what was the problem?
                        if not,you can enable trace to view more information on how the event is going through the rules and make corrections accordingly.

                        In the above what do you mean it was not working ?
                        were the events not going through the rule ? i hope you are using the rule in your child cell.

                         

                        to enable the trace use, and check the mcell logs after sending a test event.

                        mcfgtrace -n CELLNAME ALL ALL stderr

                        mcontrol -n CELLNAME tracerule on

                         

                        one your done, turn it off:

                        mcfgtrace -n CELLNAME ALL ALL no

                        mcontrol -n CELLNAME tracerule off


                        Thanks,

                        Kaushik KM