SCOM – Uptime Robot Management Pack

By | April 3, 2020

Hi,

As I posted earlier SquaredUp can be integrated with all kinds of APIs, however if you know about management pack authoring an API can also be used as datasource in a management pack. In this post I’ll show some information about an Uptime Robot Management pack I created to create classes and instances of those classes in SCOM by using the API of Uptime Robot. To accomplish this I worked together with fellow SCOM consultant Jasper Vandamme

First things first: create the API using the Uptime Robot website. (detailed steps: https://www.bpitconsulting.be/2019/11/12/squared-up-uptimerobot-api/ )

I created the management pack using Visual Studio Authoring Extensions.

Classes (with properties):

  • Uptime Robot WatcherNode
    • URL
    • APIKey
  • Uptime Robot Website
    • FriendlyName
    • ID
    • URL
    • Type
    • Interval

Uptime Robot WatcherNode Discovery:

All webrequests to the API are targeted on the watchernode. For this Discovery a registry discovery is used. It looks for a key HKLM\SOFTWARE\SCOM\Uptimerobot with values APIKey and URL. Both parameters are used afterwards in the scripts.

Uptime Robot Website Discovery:

After the WatcherNode is discovered the Website discovery kicks off, the core of the script is these lines of code:

$body = “api_key=$ApiKey&format=json”

Invoke-webrequest -method post -uri “$scripturl/v2/getMonitors” -body $body -UseBasicParsing

Monitors:

  • Website availability ( up or down)
  • API availability (up or down)

Rules:

  • API responsetime (ms)
  • Website responsetime (ms)
  • Website uptime last 7 days (%)
  • Website uptime last 30 days (%)
  • Website uptime last 90 days (%)

A dashboard can be created in SquaredUp to show the performance data

Drop me a comment below if you have any suggestions, feedback,..

Best regards,

Bert

2 thoughts on “SCOM – Uptime Robot Management Pack

  1. Manoj Mathew

    Thx Bert for sharing this soltion. Can we add synthethic tractions to this ?

    Reply
    1. bert@bpitconsulting.be Post author

      No unfortunately not as Uptimerobot doesn’t offer the possibility to add synthetic transaction in their webinterface.
      Tests are simple Up/down monitor tests.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *