none
Monitoring Process ID to generate alert in SCOM 2012 R2 RRS feed

  • Question

  • Hi,

    I want to create a monitor which will be monitoring my process ID. When this process ID changes more than five times in a minute (which means my process is crashing), then I want to generate a alert for the server.

    Can anyone help me with this?



    Friday, November 8, 2019 7:15 AM

Answers

  • Hi,
     
    Based on my experience, script can help on this. The main thought is as below:
    1. Ge the Process ID and name, store it in a variable.
    2. In a duration, try to get the process information more than 5 times and compare with the initial value, if the value is not the same, make count +1.
    3. After the time is end, if the count is more than 5, then an alert is generated.
     
    Hope it can help.
     
    Best regards.
    Crystal

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Friday, November 8, 2019 8:57 AM

All replies

  • Hi,

    You will most likely have to create an own monitor PowerShell or VB script to achieve this, another option would be to use the Process monitoring template and monitor the process by it's name.

    Best regards,
    Leon


    Blog: https://thesystemcenterblog.com LinkedIn:

    Friday, November 8, 2019 7:44 AM
  • Hi,
     
    Based on my experience, script can help on this. The main thought is as below:
    1. Ge the Process ID and name, store it in a variable.
    2. In a duration, try to get the process information more than 5 times and compare with the initial value, if the value is not the same, make count +1.
    3. After the time is end, if the count is more than 5, then an alert is generated.
     
    Hope it can help.
     
    Best regards.
    Crystal

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Friday, November 8, 2019 8:57 AM
  • Hi,

    I think this is doable and I would also definteley make it with PowerShell. You can use the one from Cookdown (Previously SquaredUp) and create the monitor from your PowerShell script. 

    Free PowerShell MP

    Some considerations:

    - All your logic need to be placed within the script (Crystal has a a point here).
    - You can use a counter to count the PID changes.
    - Please watch the video about the MP to understand how to build your script (not that complex actually) .You can find the video here:

    PowerShell Monitoring MP

    Hope this helps you out. Regards,


    (Please take a moment to "Vote as Helpful" and/or "Mark as Answer" where applicable. This helps the community, keeps the forums tidy, and recognizes useful contributions. Thanks!) Blog: https://blog.pohn.ch/ Twitter: @StoyanChalakov

    Friday, November 8, 2019 11:09 AM
    Moderator
  • This didn't work for me as my process uptime is less than a second. Even if I keep the Frequency to 1 second, it didn't recognize the process killed and woke up.

    Thanks.

    Thursday, November 21, 2019 7:20 AM