What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

How can I define my own functions in URL Scripts for Webserver Stress Tool?

Votes:

0

Your Vote:

Up

Down

I want to create my own functions in URL scripts for Webserver Stress Tool.

custom script webserver-stress-tool

Created on Feb 24, 2010 8:58:45 AM by  Daniel Zobel [Product Manager]



1 Reply

Accepted Answer

Votes:

0

Your Vote:

Up

Down

Defining Own Functions for Webserver Stress Tool

If you want to create your own functions in URL Scripts for Webserver Stress Tool please refer to the following sample in order to understand the necessary syntax:

sub MyTest(a)
  myresult="The Result is "+a
end sub

Sub OnBeforeClick
  data.url="http://web.de"
  data.log="Beforeclick: "+MyTest(inttostr(data.usernumber+1))
end Sub

Sub OnAfterClick
   data.log="Afterclick: "+MyTest(inttostr(data.usernumber+1))
end sub

Sub OnbeforeRequest
   data.log=""
end sub

Sub OnAfterRequest
   data.log=""
end sub

This will give you log file entries like this:

27.06.2010 11:57:10: User #2 Click #1: Beforeclick: The Result is 2
27.06.2010 11:57:12: User #2 Click #1: Afterclick: The Result

Created on Feb 24, 2010 9:00:22 AM by  Daniel Zobel [Product Manager]



Please log in or register to enter your reply.


Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.