Monitor Workday using SCOM/Squared Up

HI all. I have a series of workday urls that I’d like to monitor using Squared Up. A couple are just basic website hits but a few others actual require a login and then download a json file that contains data.

 

What’s the best route to go about hitting these 3 sites that require a login?

 

Then lastly, is there a way for the success of this monitor to be determined if the json file is retrieved or not?

Thanks,

Gary

1 Like

Hi Gary,

as far I understand SquredUp v4 with EAM Plus would be a perfect match.

If you don’t have Plus, I would create Unit Monitors in the SCOM console that leverage Squared Ups PowerShell MP.

In Powershell would then use Invoke-Restmethod which gives a convinient way to work with JSON that is returned by web-services. I used it for several scenarios in the last months.

https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-restmethod?view=powershell-6

… and the Unit-Monitors that you have created then I would integrated them into the EA from SquaredUp then :wink:

1 Like

hmm I don’t really know if I have EAM Plus or not. I have v4. How do I know if I have plus? How would that be done in Plus? I see where on the availability tab of a new app in SUP I can put in a url and then a content match setting, etc.

Well shoot…I don’t have it. I should have whatever they offer. errr.

 

I’ve contacted sales and am awaiting a response. Do you have a script that you could provide as a template?

Thanks,

Gary

I have some interest in this as well.

I believe this will help: https://youtu.be/bIHO4tb_5c4

The script that they have as the template:

# Perform some sort of test here
try {
    $response = Invoke-WebRequest -Uri $config.url -UseBasicParsing -UseDefaultCredentials -ErrorAction Stop
}
catch{
    # If the script throws an error, we'll automatically treat it as a failing test and use the exception message as the Description
    throw "Error attempting to access '$($config.url)': $($_.Exception.Message)"
}

# Simply return a bool indicating success
# return $response.StatusCode -eq 200

# Or return an object with a Success & Description property (and anything else you want in the Alert Context)
$result = New-Object -TypeName PSobject -Property @{
    # Set the monitor result, must be true/false
    'Success' = $response.StatusCode -eq 200
    # Set the description shown in the alert message.
    'Description' = "Response code from querying $($config.url) was $($response.StatusCode)"
    # Include any extra properties, which will be shown in the Alert Context.
    'ContentLength' = $response.RawContentLength
    # If you want the monitor to be in a warning state
    # 'Level' = 'warning' 
}

return $result

The commenting should provide enough info to know what the script needs to be returned so SCOM can make a health state out of it.

Invoke-WebRequest: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-webrequest?view=powershell-6

WorkDay also has a Rest API and here’s the documentation: https://community.workday.com/api

Invoke-RestMethod: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-restmethod?view=powershell-6

And there’s a PS module for WorkDay: https://github.com/treestryder/powershell_module_workdayapi

Looks like there are several options as to how to go about it!

Wow. Very cool. Thanks Jelly. Now I just need to get that EAM Plus license:)

ok I have an EAM Plus license now. So Jelly, are you saying use the script above to try to pull this off?

Basically, what I’ve been told is if the website url hit generates a json file that has anything other than an error or [] means everything is hunky dory.

You would see “Custom PowerShell” as an option when choosing availability monitoring if you had EAM Plus