sitespeed.io icon indicating copy to clipboard operation
sitespeed.io copied to clipboard

How to use resultBaseURL for NodeJS+InfluxDB+Grafana setup on Windows machine [Local] to view HTML URL and Screenshot on Grafana

Open shrutiseth opened this issue 2 years ago • 5 comments

Your question

Hello @soulgalore,

I am configuring sitespeedio on my windows local machine using NodeJS + InfluxDB + Grafana, since docker is not allowed in my organization.

I have been able to get the Front End metrics on the Grafana dashboard for all the tests done during the time window in a table: image

I want to get the link to the Index.HTML for each of the tests along with Screenshot in the table too. Can you please guide me what should be the syntax?

I have referred - https://www.sitespeed.io/documentation/sitespeed.io/performance-dashboard/#annotations and https://www.sitespeed.io/documentation/sitespeed.io/performance-dashboard/#annotations but I am not sure of the command.

Currently I am using: sitespeed.io https://www.sitespeed.io/ --urlAlias Sitespeedio -n 1 --influxdb.host localhost --video --visualMetrics --viewPort 1024x768 --influxdb.annotationScreenshot --resultBaseURL localhost -v --logToFile

Output: image

Log file shows: image

My question is: What should i write in --resultBaseURL <what should be the path here?>

Thanks for your time!

shrutiseth avatar Apr 26 '24 12:04 shrutiseth

Hello @soulgalore - Am able to insert with following command: sitespeed.io https://www.sitespeed.io/ --urlAlias Sitespeedio -n 1 --influxdb.host localhost --video --visualMetrics --viewPort 1024x768 --influxdb.annotationScreenshot --resultBaseURL file:///C:/Users/shruti.s.seth/AppData/Roaming/npm/node_modules/sitespeed-result/ -v --logToFile

Log file: image

Am able to get correct path in events measurement of influxDB: image

And my index.html is accessible from this path when I copy paste below command in Chrome address bar: file:///C:/Users/shruti.s.seth/AppData/Roaming/npm/node_modules/sitespeed-result//www.sitespeed.io/2024-04-26-22-40-01/pages/www_sitespeed_io/Sitespeedio/index.html

However, how do I add my Device Name: D2BLAP-FEHJJDW or IP address 10.251.23.210 to access the index.html? so anyone can open it directly?

shrutiseth avatar Apr 26 '24 17:04 shrutiseth

@zer0kool can you please guide here?

shrutiseth avatar Apr 28 '24 10:04 shrutiseth

Hi @shrutiseth I would try to serve the content through a web server so you would do it the same way if you serve it locally or through a web server. If you have the server running your result base you can use your IP adress instead of file:// etc.

soulgalore avatar Apr 28 '24 14:04 soulgalore

Hello @soulgalore

I tried using http://hostname - image

Using IP address: sitespeed.io https://www.sitespeed.io/ -n 1 -b chrome --influxdb.host localhost --resultBaseURL http://10.4.169.100/C/Users/sethss/AppData/Roaming/npm/node_modules/sitespeed-result/ image

When I try to open this file:

image

http://awnhybristestq8/www.sitespeed.io/2024-05-03-08-42-41/index.html also gives same error.

Please guide :(

shrutiseth avatar May 03 '24 12:05 shrutiseth

Have you setup a HTTP server that serves the content on your machine? I'm not 100% sure I understand what you want to accomplish? :) Do you want to run it locally to test everything or what's your end goal?

soulgalore avatar May 03 '24 13:05 soulgalore

Thanks. After installing Apache24 I was able to make it a file server.

shrutiseth avatar Jun 28 '24 09:06 shrutiseth