This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

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

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

  • FormerMember
    0 FormerMember

    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.

  • Thank you. I'll give that a try.