question

vijayaragavanHariharan-2276 avatar image
0 Votes"
vijayaragavanHariharan-2276 asked AlexZhu-MSFT edited

Monitoring netstat command output in SCOM

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

msc-operations-manager
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

LeonLaude avatar image
2 Votes"
LeonLaude answered LeonLaude edited

Hi @vijayaragavanHariharan-2276,

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


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.