Monitoring netstat command output in SCOM

vijayaragavan Hariharan 1 Reputation point
2020-11-01T11:29:08.06+00:00

Hello,

i got a requirement from application team that they want to monitor the connection pool in SCOM for the connections hit.

They are having two commands, if the command.

netstat -an | Select-String -Pattern 10.x.x.x | measure-object -line

netstat -an | Select-String -Pattern 10.x.x.x| measure-object -line

command output like

If the lines value greater than 50, SCOM should trigger an alert. Please help me to achieve this.

Regards,

Vijay

Operations Manager
Operations Manager
A family of System Center products that provide infrastructure monitoring, help ensure the predictable performance and availability of vital applications, and offer comprehensive monitoring for datacenters and cloud, both private and public.
1,419 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Leon Laude 85,666 Reputation points
    2020-11-01T11:37:11.15+00:00

    Hi @vijayaragavan Hariharan ,

    You can set up a custom monitor in SCOM with a PowerShell script with the help of Cookdown's PowerShell authoring management pack.
    Here's a YouTube video on how to set up a PowerShell monitor that runs a script with Cookdown's PowerShell authoring management pack.
    https://www.youtube.com/watch?v=--wOzKU52JE

    Here's also a guide that you can follow:
    Example of setting up a custom monitor in SCOM with a Powershell Script – Monitor NIC teams in SCOM

    As for the netstat monitoring, you can follow up on Ruben's great guide here:
    Monitor network connections and listening ports with SCOM

    ----------

    (If the reply was helpful please don't forget to upvote or accept as answer, thank you)

    Best regards,
    Leon

    2 people found this answer helpful.
    0 comments No comments