Monitor Everything with Monitis – And do it easily with PowerShell – Part 4

Monitoring Web Applications with Monitis

We’ve been learning about a lot of cool things we can do with the Monitis PowerShell Module, which is built on top of the Monitis REST API.  Yesterday, we saw how we can use a simple script to monitor as many domains as we want.  The day before that, we saw how we can seamlessly manage all of our monitors.  Today, we’re going to cover monitoring web applications.

As a reminder, start out by running PowerShell, and running the command:  Import-Module Monitis.  Then use the Connect-Monitis command and your APIKey and SecretKey to connect.  From then on in, you’ll reuse your keep for every operation.

To see how you can use Monitis to help you monitor your web applications, run:

Get-Help Add-MonitisExternalMonitor –parameter PostData

In PowerShell, every command and parameter has built in help and examples.  You can use this to explore the possibilities of what you can do with the command right on your desktop.

PostData sends additional data for the web request, and from this, you can test your web applications.  For instance, if you have a search page, you can use –PostData to send the appropriate information to the page.   Another parameter, -Credential allows you to store a credential for the request, and another –OverSsl, will force the request to occur over SSL.

By making the monitor use postdata, instead of just ping your site, you can ensure that your web sites  and services are properly functioning.   Here’s a quick example of a monitor for a custom search engine:

Add-MonitisExternalMonitor -Name "SearchEngineMonitor" -Tag "MySites" -MonitorType http -PostData "q=hello+world" -url "a.searchengine.com"

If it was a user update page, you might try something like:

Add-MonitisExternalMonitor -Name "UserUpdateMonitor" -Tag "MySites" -MonitorType http -OperationType Post –Credential (Get-Credential) -OverSsl -Url "users.mydomain.com/update.aspx" -PostData "newPhoneNumber=8675309"

Monitis keeps track of how long it takes to complete the request from several locations, so you can keep track of how your web application responds from anywhere within the world.

Today, we’ve learned how easy it is to monitor web applications with Monitis.  Next, we’ll talk about testing web content, and how you can use a nifty little command in PowerShell called Import-CSV to easily create lists of tests for your web application, and then keep track of how they perform in Monitis.

See also

Monitor Everything with Monitis – And do it easily with PowerShell – Part 1

Monitor Everything with Monitis – And do it easily with PowerShell – Part 2

Monitor Everything with Monitis – And do it easily with PowerShell – Part 3

You might also like