DX Infrastructure Manager

Expand all | Collapse all

Alarm when process is running too long

  • 1.  Alarm when process is running too long

    Posted 02-09-2017 10:07 AM

    Hello,

     

    We have few processes on couple of servers which are sometimes hanging and these prevents other processes to run. Is it possible to configure monitoring so that alarm is created when certain process is running more than 30 minutes on a server.



  • 2.  Re: Alarm when process is running too long

    Posted 02-10-2017 07:35 AM

    Very interesting question!

     

    I think it is possible build the follow scenario:

    E.g:

     

    I - Select the process that you want to follow to alarm when UP via probe process.

    II - Create a script on NAS to set severity to Major or Critical when the Time Origin of process alarm is 30 min higher than the actual hour of system, then you will be advised by an incident from your ticket manager tool. 

     

    Regards,

    Jean Gomes



  • 3.  Re: Alarm when process is running too long

    Posted 02-20-2017 06:13 AM

    Thank you. Using NAS script sounds worthy solution.

     

    This time I ended up using nexec-probe and writed a small PowerShell script which generates alarm when certain threshold is breached. And used Nexec-probe to schedule it.

     

    The script:

     

    $process = get-process notepad # process
    $threashold = 1 #time in hours
    $timestamp = New-TimeSpan -Start (get-process $process.name).StartTime
    if ($timestamp.totalhours -gt $threashold) {
    ..\..\..\bin\nimalarm.exe -l 4 -c $process.name "Process: "$process.name" has been running "$timestamp" minutes so far. Check if it is still alive"}