6 Replies Latest reply on Sep 13, 2018 10:58 AM by Albert Taylor

    Executing Remote action using MRL Rule.

    Anita Hatagale

      Hi All,

       

      I am working on Triage and Remediation use case. Currently I am using operational console for triggering specific workflow from ao_action.mrl rule.

       

      I want to automate this process and need write .mrl rule for calling remote action.

       

      Version Details:

      RSSO & TSPS :11.0.00

      TSIM: 11.00.02 fix pack 2

      Patrol Agent Version: 11.0.00

       

      Could you please suggest how can I achieve this task using execute rule?

       

      Thanks in advance.

       

      Regards,

      Anita Hatagale.

        • 1. Re: Executing Remote action using MRL Rule.
          Charles Kelley

          Hi Anita,

           

          The same admin_execute that is being performed in the ao_actions.mrl, you could call in an execute rule (or other rule phase).

           

          This post has an example already written of executing the admin_execute in the Execute rule phase:

           

          MRL - I need count closed events in the last hour when an event come

           

          Charles

          • 2. Re: Executing Remote action using MRL Rule.
            Anita Hatagale

            Hi Charles,

             

            I am executing remote action for agent restart workflow. I have written below rule to execute remote action but at compilation getting below error :

             

            **Rule**

             

            execute bao_remote_actions_Agent_Restart:PPM_SM_EV($SV)

            where [ $SV.mc_object_class equals 'PROACTIVENET_COMPONENT' AND $SV.status equals 'OPEN' AND $SV.severity equals 'CRITICAL']

            triggers

            {

              $SV.status='ACK';

              admin_execute(BEMGW,$SV,"Atrium_Orchestrator_Agent_Restart_Workflow",["false","normal","false","true","BMC Impact Manager"],YES);

              ntadd($SV,'remote action test');

            }

            END

             

            Please let me know if I am missing something.

             

            Thanks in advance.

             

            Regards,

            Anita Hatagale.

            • 3. Re: Executing Remote action using MRL Rule.
              Charles Kelley

              Hi Anita,

               

              The 'triggers' clause is not valid syntax for the Execute rule phase.  That is used only in the New rule phase.  Here are the syntax details for the Execute rule phase:

               

              https://docs.bmc.com/docs/TSInfrastructure/113/execute-rule-syntax-774798528.html

              Execute rule examples - Documentation for BMC TrueSight Infrastructure Management 11.3 - BMC Documentation

               

              Thanks,

               

              Charles

              1 of 1 people found this helpful
              • 4. Re: Executing Remote action using MRL Rule.
                Anita Hatagale

                Hi Charles,

                 

                Thank you so much.

                 

                Now I am able to Trigger remote action through execute rule for below workflow :

                 

                Atrium_Orchestrator_Agent_Restart_Workflow

                Atrium_Orchestrator_Disk_Full_Workflow

                Atrium_Orchestrator_DB_Tablespace_Full_Workflow

                 

                using admin_execute(BEMGW,$EV,"Atrium_Orchestrator_Agent_Restart_Workflow",["false","normal","false","true","BMC Impact Manager"],YES);

                 

                But unable to understand, how to call remote action for service restart workflow. It needs host,servicename and service action parameter to pass dynamically in admin _execute primitive.

                 

                Example:

                admin_execute(BEMGW,$EV,"Atrium_Orchestrator_Service_Restart_ Workflow",[$CREATECHANGERQUEST, $CHANGEREQUESTTYPE,$UID,$HOST,$SERVICE,$SERVICE_ACTION],YES);

                 

                Please suggest.

                 

                 

                Thanks & Regards,

                Anita Hatagale

                • 5. Re: Executing Remote action using MRL Rule.
                  Anita Hatagale

                  Hi Charles,

                   

                  I want to execute remote action on critical event which is running fine with below condition:

                   

                  if ($EV.mc_object_class == 'NT_LOGICAL_DISKS' AND $EV.severity within ['CRITICAL'] ) then

                    {

                       admin_execute(BEMGW,$EV,"Atrium_Orchestrator_Disk_Full_Workflow",["false","normal","false","true","BMC Impact Manager"],YES);

                    };

                   

                  But for testing purpose when I change severity of MAJOR alert to critical manually using " modify slot value option " in operational console. Remote action is not getting called.

                   

                  please suggest.

                   

                  Thanks,

                  Anita

                  • 6. Re: Executing Remote action using MRL Rule.
                    Albert Taylor

                    Anita,

                     

                    you will need to have a execute rule to handle the severity change, and make it run when it changes.

                     

                    Example: (you may need to modify this a little, it did not try to compile it and test it, but the concept is there)

                     

                    it will only run when severity is critical and the operation for   AO DiskFull WorkflowRun is not on the event.

                     

                    exeucte run_ao_action: EVENT ($EV)

                    when $EV.severity

                    {

                    if ($EV.mc_object_class == 'NT_LOGICAL_DISKS' AND $EV.severity within ['CRITICAL'] AND opqry($EV,"AO DiskFull","WorkflowRun",$SEQNR,$ARG) == '' ) then

                      {

                         admin_execute(BEMGW,$EV,"Atrium_Orchestrator_Disk_Full_Workflow",["false","normal","false","true","BMC Impact Manager"],YES);

                         opadd($EV,"AO DiskFull,"WorkflowRun","Ran Workflow");

                      };

                    1 of 1 people found this helpful