Forum Discussion

mnagel's avatar
mnagel
Icon for Professor rankProfessor
9 years ago

event handlers

In Nagios, there is a concept of an event handler that can run to try to fix problems (e.g., restart a service, remove old files, etc.).  I see no similar capability in LM and it is of course something customers want to see happen.  For example, I just deployed a custom DS for someone to check for too many files in a share, indicating a service problem.  Once I implemented that, the next question was "Can you restart the service when that goes into warning?"  I see no facility for this in LM, but perhaps a custom alert could be used to trigger the behavior.  If I used that approach, I would insert a custom HTTP alert into the escalation chain earlier on to give the problem a chance to be corrected, then I will have to create a secure REST API server to accept those and trigger the correct behavior.  So in theory it could be done (if I am not missing something), but it feels like using a screwdriver to hammer in a nail.

Thanks,

Mark

  • Using Powershell, you can issue the task as a job, which will then run in the background without the need for a return message.  This can keep the script "lighter"  I did this in SCOM to handle restarting the SCOM service where necessary.  I'd issue the job and the script would just move on.  I'm currently working on a script that lives on the collector as an external alert target that has a collection of scripts/tasks stored at the collector level.  The message being sent to the collector manager (or whatever I choose to call it... it'll be something witty) can be used to tell it which script you're really trying to run and it runs it for you.  It'll take stored credentials that are passed and use CredSSP delegation to pass those credentials on to a target machine to run the needed task (I've posted the delegation code in another thread about this topic).

    By the time I finish, Logic Monitor will probably have it included ;)