Forum Discussion

Kelemvor's avatar
Kelemvor
Icon for Expert rankExpert
23 hours ago

Any way to automate tasks via alerts?

Hi,

I know LM doesn't support taking any action when there's an alert.  However, I'm wondering if anyone has any neat ideas on how to accomplish something by way of some other automation program.  Maybe Power Automate?

Here's what I'm thinking.

I have a module that monitors a service to see if it's running or not.  If it's not, it generates an alert.  This seems like the most basic thing to automate because all I'd want to do is run the start-service command to start it back up.  So, I'm wondering if I can have the alert send an email to a certain address.  That address could then watch for a certain email to arrive.  It could then parse out the servername and service name and put that into a start-service -computername xxx -name yyy.

Has anyone looked into doing anything like that and did you have any success?

Thanks.

  • Could you just include the logic to restart the service in the existing datasource?

    I've done something similar with a datasource collection. Checks to see if the service is running,  tracks restarts, checks to see how long the service is up (didn't want to issue a restart if the service is starting due to a reboot), etc.  

    Regarding your direct question, I think you could automate it with Alert rules and Integrations (custom email delivery or custom HTTP delivery). 

    I'm sure others will have stronger suggestions.