2 Replies Latest reply on Aug 6, 2012 5:34 PM by Apollo

    LEM Agent - How to set up rule to restart windows service?

    Apollo

      Okay...I've got a rule that will alert on a stopped or stalled Windows server for a specific system. Great, that's been tested and is working as expected. I cloned that rule (for testing) and inserted under the actions section, "Restart Windows Service." that sub-box is requiring "Agent" and "Service Name" and I haven't figured out where I find those variable to insert it into that part of the rule.

       

      Any help would be greatly appreciated.

       

      ~Steve

        • Re: LEM Agent - How to set up rule to restart windows service?
          nicole pauls

          Generally, in the "Agent" box you'll want to include an alert field that has the name of the agent. If the original event you're firing the rule from is on that agent, you can use AlertInCorrelationsBox.InsertionIP (or DetectionIP). The advantage of using the alert field is that if you want to restart the service on different agents depending on where the problem is occurring, you can do it without building multiple rules. If you always only want to restart the service on a SINGLE agent, you can drag a "Text Constant" over from the "Constants" area on the left and drag it into the "Agent" box and then type the name of the agent as it appears in Manage>Nodes (or the event data, generally the name or IP of the machine).

           

          For "Service Name" you can do similarly IF it's an alert that has the service name actually in it. If not, go to "Constants" and drag over a "Text Constant" into the "Service Name" box which will enable you to just type in the name of the windows service you want to restart.