How to monitor services availability and performance

This tutorial demonstrates how Step can be used to monitor services, availability and performance metrics.

Illustration for How to monitor services availability and performance

This tutorial will demonstrate how Step can be used to monitor services availability and metrics. We will utilize plan executions in combination with the notification package, the scheduler, and the monitoring view as a dashboard.

Prerequisites

Services availability and performance monitoring

Keywords definition

Assume you are operating 3 different Windows services and you want to monitor them by checking their status, running or dead, and measure the average response time needed to execute the check.

A simple Keyword will be used to check these services and return the output of the service’s health status, running or stopped. The Keyword has 2 inputs:

You can find a sample of the Keyword code to be used (Windows OS) in the Step sample project hosted on GitHub.

To register the sample Keyword(s), WindowsServiceStatusKeyword into Step follow the instructions below:

  1. Checkout the Step samples project using your favorite SCM tool.
  2. Execute a Maven build using the “package” goal on the project demo-system-monitoring to produce the Keywords jar.
  3. Register the WindowsServiceStatusKeyword Keyword into Step as described here.

Define your monitoring plans

Setup your keywords and TestCases

For clarity purposes, the Keyword calls have been labeled with the service name as below:

  • Check_DHCP_Client_Service_Health
  • Check_DNS_Client_Service_Health
  • Check_Print_Spooler_Service_Health

Let’s define a simple plan of type TestSet containing 3 TestCase controls to execute the services health check Keywords:

A good practice is to wrap each of your checks in a TestCase control. This enables an execution per test case split view and allows for better control on what is executed in the monitoring checks test set.

In addition, all of your test cases that are defined under a TestSet control will be executed in parallel.

Add an assertion on keyword output

In order to perform a check on the service status, running or not, within our test plan we will add an Assert control under each of our Keywords:

Let’s execute the plan and click on the Check Sprint Pooler test case to display its content:

In the screenshot above, we can see that the Check Print Spooler Keyword node status is red and marked as “FAILED” because the service is stopped. These functional checks can now be productively used in order to monitor our services.

Schedule your plan

Now that we have functional checks, we will schedule them to run periodically using the scheduler.

  1. From an execution of your plan, click “Schedule” in the top right panel.
  1. Now, define the period you want your monitoring plan to be executed in. In this example, we are using the “Every 5 minutes” preset, but you may use the Java CRON expression of your choice.
  1. Click “OK” and you will be redirected to the Step scheduler tab where you will be able to see and edit all the scheduling entries you created.

Add notifications to your plan

Notifications are made available as an Enterprise Plugin.

Step can trigger automatic email notifications based on the overall status of the executed plan to provide you with alerts.

We recommend configuring your email gateway(s) prior to setup of notifications on your plans.

  1. Open an execution of your monitoring test plan and click the “Add notifications” link in the bottom right panel.
  1. Choose what kind of event notification should be triggered, execution ended or failed. Fill your notification gateway and the notification recipient.

In this example, we chose to receive a notification when the monitoring test fails. We will stop the Print Spooler service on our monitored instance and wait for the next execution. Five minutes later, the following email has delivered to our mailbox:

Consult your monitoring dashboard

Monitoring dashboards are made available as Step’s Enterprise Versions.

You can access the monitoring dashboard by clicking on the “Monitoring” tab in the top menu:

You can see that the latest execution of our monitoring plan ended as “FAILED” because the Print Spooler service is not running.

In order to illustrate the “Last status change” column behavior, we will fix the Print Spooler service and wait for the next plan execution. Below is the monitoring view five minutes after having fixed the service:

The “Last status change” column value has been updated according to the last plan execution’s overall status.

Long term trends/history

In order to display the performance metrics over a period of time, follow these steps:

  1. Switch to the “Performance” tab and click on “Interactive analytics:
  1. Now that you have been redirected to RTM, remove the existing filter base on the execution ID. The execution ID’s purpose is to filter the measurements of the selected execution. We are interested in all the measurements of a specific plan over time, so you will remove the existing filter base on the execution ID. Click on the associated red x icon to remove it.
  1. Filter out the result to display only the Check_Print_Spooler_Service_Health Keyword’s response time.
  2. Add a simple “Text filter” based on the Keyword name

View the graph containing the average response time for the selected keyword below.

You can use a regular expression filter based on the keyword name to retrieve the executions data of all our Keywords. In the example below, all of the Keyword names start with “Check”:

Now, you can view the graph containing the average response time of each service over time:

Summary: This tutorial demonstrates how Step can be used to monitor services, availability and performance metrics.

Illustration for Using Step with Grafana
Using Step with Grafana

This article demonstrates how to connect Grafana to data generated by Step.

Illustration for Setting up system monitoring with a Step agent
Setting up system monitoring with a Step agent

This article demonstrates how to set up distributed system monitoring using Keyword executions, and analyze the results as measurements.

Illustration for NET tutorials: Microsoft Office automation with Step
NET tutorials: Microsoft Office automation with Step

This tutorial demonstrates how to automate interaction with Microsoft Office applications using the Office Interop Assembly.

Illustration for JUnit Plan Runner
JUnit Plan Runner

This article provides documentation for how to integrate JUnit tests into Step.

Illustration for .NET tutorials: AutoIt with Step
.NET tutorials: AutoIt with Step

This tutorial demonstrates how to utilize the AutoIt C# binding to automate interactions with Windows applications.

Illustration for Android Testing using Step and Appium
Android Testing using Step and Appium

This article demonstrates the automation of mobile applications on Android using the Appium framework.

Illustration for Browser-based automation with Step and Selenium
Browser-based automation with Step and Selenium

This article defines three Keywords which will be used in browser-based automation scenarios, using Step and Selenium, as general drivers.

Illustration for Load Testing with Cypress
Load Testing with Cypress - advanced

This tutorial shows you how to efficiently set up a browser-based load test using existing Cypress tests in the Step automation platform.

Illustration for Adding and Configuring New Agents
Adding and Configuring New Agents

In this short tutorial, we show how to quickly implement a simple browser-based load test based on Cypress scripts in Step.

Illustration for Load Testing with Playwright
Load Testing with Playwright using Step UI

This tutorial shows you how to set up a browser-based load test using existing Playwright tests in the Step UI.

Illustration for Basic Keyword Development
Basic Keyword Development

This article explains Keywords in Step and demonstrates how to create simple ones.

Illustration for Designing functional tests
Designing functional tests

This tutorial demonstrates the design, execution, and analysis of functional tests using the web interface of Step.

Illustration for Robotic Process Automation (RPA) with Selenium
Robotic Process Automation (RPA) with Selenium

This tutorial will demonstrate how to use Step and Selenium to automate various browser tasks.

Illustration for Robotic Process Automation (RPA) with Cypress
Robotic Process Automation (RPA) with Cypress

This tutorial demonstrates how to use Step and Cypress to automate various browser tasks.

Illustration for Synthetic Monitoring with Selenium
Synthetic Monitoring with Selenium

This tutorial demonstrates how Selenium automation tests can be turned into full synthetic monitoring using Step.

Illustration for Load Testing with Cypress
Load Testing with Cypress

In this tutorial, you'll learn how to reuse existing Cypress tests to quickly set up and run a browser-based load test using the automation as code approach.

Illustration for Load Testing with Cypress
Load Testing with Serenity BDD and Cucumber

In this tutorial, you'll learn how to reuse existing tests written with Serenity BDD and Cucumber for load testing.

Illustration for Synthetic Monitoring with Cypress
Synthetic Monitoring with Cypress

This tutorial demonstrates how Cypress automation tests can be turned into full synthetic monitoring using the automation as code approach.

Illustration for Load Testing with Cypress
Load Testing with Cypress using Step UI

In this tutorial, you'll learn how to reuse existing Cypress tests to quickly set up and run a browser-based load test using the Step UI.

Illustration for Load Testing with Selenium
Load Testing with Selenium

This tutorial demonstrates how to leverage existing Selenium tests to set up and execute browser-based load tests, following a full code-based approach.

Illustration for Load Testing with Selenium
Load Testing with Selenium using Step UI

This tutorial demonstrates how to set up a browser-based load test in the Step UI using existing Selenium tests.

Illustration for Synthetic Monitoring with Playwright
Synthetic Monitoring with Playwright

This tutorial demonstrates how Playwright automation tests can be turned into full synthetic monitoring using Step.

Illustration for Synthetic Monitoring with Cypress
Synthetic Monitoring with Cypress using Step UI

This tutorial demonstrates how Cypress automation tests can be turned into full synthetic monitoring using the Step UI.

Illustration for Robotic Process Automation (RPA) with Playwright
Robotic Process Automation (RPA) with Playwright

This tutorial will demonstrate how to use Step and Playwright to automate various browser tasks.

Illustration for Load Testing with Playwright
Load Testing with Playwright for Java

In this tutorial, you'll learn how to reuse existing Playwright tests written in Java to quickly set up and run a browser-based load test using the automation as code approach.

Illustration grafana devops tutorial
Continuous load testing with K6

Quickly integrate K6 based load-tests in your DevOps workflow

Illustration for playwright synthetic monitoring in a devops workflow
DevOps Synthetic Monitoring with Playwright - Advanced

This tutorial demonstrates how Playwright tests can be reused for synthetic monitoring of a productive environment in a DevOps workflow

Illustration for playwright synthetic monitoring in a devops workflow
DevOps Synthetic Monitoring with Playwright

This tutorial demonstrates how Playwright tests can be reused for synthetic monitoring of a productive environment in a DevOps workflow

Illustration for okhttp devops
Protocol-based load testing with okhttp

In this tutorial you'll learn how to quickly set up a protocol-based load test with okhttp

Illustration for playwright devops
Continuous end-to-end testing

Learn how to set up continuous end-to-end testing across several applications based on Playwright tests in your DevOps pipeline using Step

Illustration for playwright devops
Continuous load testing with Playwright

Learn how to quickly set up continuous browser-based load testing using Playwright tests in your DevOps pipeline

Want to hear our latest updates about automation?

Don't miss out on our regular blog posts - Subscribe now!

Image of a laptop device to incentivize users to subscribe