Partager via


A simple way to test a lot of SCCM distribution point availability with System Center Operations Manager

Hi everyone!

This is a simple way to monitor a URL of a SCCM Distribution Point. I have some customers with a necessity of a visualization about Distribution Point health. The customer has a lot of Distribution Points and a big problem with authentication for remote url tests. So, is not my first option create a "Web Application Availability Monitoring" for each "URL" for each "Distribution Point" (the customer has a thousands distribution points).
The simple way for this object is test the URL locally. How is this possible? I created a monitor with the script below:
Script VBS:
Option Explicit Dim objWinHttp Dim strCheckURL Dim oAPI Dim oBag Set oAPI = CreateObject("MOM.ScriptAPI") Set oBag = oAPI.CreatePropertyBag() strCheckURL = "https://localhost/sms_dp_smspkg$/cas00001" Set objWinHttp = CreateObject("WinHttp.WinHttpRequest.5.1") objWinHttp.SetTimeouts 29000, 29000, 29000, 29000 objWinHttp.Open "GET", strCheckURL On Error Resume Next objWinHttp.Send() If Err.number = 0 Then If (objWinHttp.Status = 200) Then Call oBag.AddValue ("Status","OK") End If else If (objWinHttp.Status <> 200) Then Call oBag.AddValue ("Status","Error") End If End If Set objWinHttp = Nothing oAPI.Return(oBag)

The URL showed above change on each SCCM environment because the name of the SCCM Client package. I created an override for the monitor pointing to the "ConfigMgr Distribution Point" class. With this target all new Distribution Point with the Operations Manager Client will be automatically monitored.

It's simple but very useful!