Getting Started with Server Monitoring

User rating:
4.6 (9 ratings)
Try the full experience of Pro:

This tutorial explains how to monitor an IIS web server running Windows. However, the procedure is very similar for any other type of Server Monitor. We will assume that you already know the basics of LoadUI, as well as how to use the Statistics Tab. Please note that Server Monitoring is only available in LoadUI Pro.

0.1. Video Tutorial



0.2. Configuring the Server

For LoadUI to be able to connect to your server, you will need to configure it's software. What needs to be configured depends on which server application that you want to monitor. Learn how to configure your particular server software here.

0.3. Creating a Basic Test

Start by creating a simple load test, consisting for example of a Fixed Rate Generator connected to a Web Page Runner. Set the Runner to target a web page or service on the server that you want to monitor.

serMon_gettingStarted_1s

0.4. Creating Server Monitors

Now you are ready to add some Server Monitors. To do this, open the Statistics Tab and expand the Monitors bottom panel. Then drag the IIS monitor icon to the empty area to the right.

serMon_createMonitor

This opens up a configuration wizard, which in its first step prompts us for the hostname (or IP-address if you will) of the server that IIS runs on.

serMon_gettingStarted_4s

Click next to go to the second and final step, which lets us test the connection. We recommend that you always do this when adding a monitor.

serMon_gettingStarted_5s

Click Finish. You will now see a black rectangle labeled Server 1, representing the server. Contained in the server, represented by a grey rectangle, you will also find the IIS monitor.

serMon_gettingStarted_55s

The IIS monitor will monitor things directly related to the IIS software, like number of requests, users and cache hits. To monitor Operating System general metrics like CPU usage, you need to add a monitor from the Operating System category. For example a Windows monitor:

serMon_createMonitor2

0.5. Adding Monitor Statistics to Charts

You add Server Monitors to charts exactly the same way as components are: by dragging them from the Statistics toolbox to the chart area.

serMon_gettingStarted_8s

0.6. Custom Monitors

Just as with Components, you can create and share your own Server Monitors. For the sake of this article, we created a simple monitor called My Monitor. My Monitor exposes two statistics: a sine and a cosine wave:

serMon_custom2

This is the code for My Monitor:

counterGroup( "Math" ) {
    counter( "Sin" )
    counter( "Cos" )
}

double time = 0

onStop = { time = 0.0 }

onUpdate = {
    time += 0.1
    updateCounter( "Math" ).with( "Sin": Math.sin( time ), "Cos": Math.cos( time ) )
}

Optionally, to add a page to My Monitor's configuration wizard and set My Monitor's default statistic to be Sin, we would add:

settings( label: "Test" ) {
	label ( label: "Hello world!" )
}

defaultStatistics << statistic( "Math", "Sin" )