How can I capture the Web server machine name

How can I capture the Web server machine name

If the web application you are monitoring has multiple frontend web servers and you would like to see performance broken down by servername then you can have the webtuna.js capture the servername by overriding the JavaScript function wt.server with your own function to get it from the application and return it to WebTuna.

The JavaScript function needs to be called wt.server and needs to be declared somewhere in the page so that it exists at the point the where the onload handler is called.

Capture Severname PHP example

This example code will capture the Servername so it can be seen by WebTuna. Note the servername capture code must come after the line which calls webtuna.js. You may need to modify src to point to the location where you copied the webtuna.js.

//NEED SOME SERVER SIDE CODE TO GET THE SERVERNAME AND SET IT AS A JAVASCRIPT VARIABLE



About the Author

Comments are closed.