6/29/2023 0 Comments Airbridge simple monitor![]() You should now end up on the first page in the “Sample Powershell Script 2 State Monitor” as pictured below:.Usually I’ll create a new management pack since it’s easier for an export to a customer and easier to pick out a package/function. Select a management pack for it, or create a new one.Expand: “Scripting”->”Generic”->”Sample Powershell Script 2 State Monitor”.Right-click and select “Create a monitor” -> “Unit monitor”.Firstly, if you don’t already have the “Sample Management Pack”, which is used for creating Powershell script in SCOM, go ahead and download and install that first. Now let’s configure a monitor in SCOM with our simple Powershell script. Get-NetAdapter -Name CTLAN-TEAM | select LinkSpeed –ExpandProperty LinkSpeedĬonfigure a monitor in SCOM using Powershell script However, when we want to do a comparison in SCOM, we don’t want the header included, so we want to run the following line: This is what we want, this is the healthy state. Get-NetAdapter -Name CTLAN-TEAM | select LinkSpeed If we run the following line on the server in Powershell: Getting the speed of the NIC Team in Powershell So we have 2 NICs in our physical servers, those 2 are combined into a NIC Team, and since they are 1 Gbps we know the combined linkspeed should be 2 Gbps. So how do we take those kind of problems before they grow into larger problems? We monitor our NICs and the speed on the combined team. We did some diagnostic, and one of the network cards was only working at a very low speed, and since the NIC was teamed, I was just unlucky getting connected on the slow NIC. Asking the guy responsible for the server if there was something wrong, and the answer was immediately “YOU!”… Well, it turned out that there was something more behind it. The other day I was transferring an OS Image to one of our new Hyper-V servers, and the transfer speed was around 10 Mbit on our internal network. ![]() It’s a very basic script, but it have a value we measure on, so you have all the basic building blocks. ![]() In this blogpost, I’ll run through an example of how to configure a monitor from the ground up, going through every step, for making a monitor in Powershell for SCOM.
0 Comments
Leave a Reply. |