sitespeedio / sitespeed.io

sitespeed.io is an open-source tool for comprehensive web performance analysis, enabling you to test, monitor, and optimize your website’s speed using real browsers in various environments.
https://www.sitespeed.io/
MIT License
4.73k stars 600 forks source link

No errors but data not populating in Grafana #4022

Open rfyffe-mgmresorts opened 9 months ago

rfyffe-mgmresorts commented 9 months ago

Your question

We currently have an implementation with Grafana & Sitespeed (sitespeedio/sitespeed.io:30.7.0). This is working correctly for our existing test runs, however after setting up a new dashboard I cannot send data to it. I have turned on verbose output and I do not get any errors when running sitespeed:

[2023-12-07 07:47:39] DEBUG: [plugin.pagexray] Generate summary metrics from PageXray
[2023-12-07 07:47:39] DEBUG: [sitespeedio.plugin.graphite] Send data to Graphite graphite.hostname.com:2003
[2023-12-07 07:47:39] VERBOSE: [sitespeedio.plugin.graphite] Sending mock_namespace.desktop.firstView.summary.www_sitespeed_io.chrome.native.pagexray.contentTypes.html.transferSize.median 9785 1701935243
mock_namespace.desktop.firstView.summary.www_sitespeed_io.chrome.native.pagexray.contentTypes.html.transferSize.mean 9785 1701935243
...
...
[2023-12-07 08:06:27] INFO: [sitespeedio.plugin.html] HTML stored in /sitespeed.io/sitespeed-result/firstView/2023-12-07-08-06-07

Grafana Dashboard Variables:

This is using the example Page metrics dashboard provided.

image

All of the connection settings for Grafana are correct. Any suggestions why this would not be working?

soulgalore commented 9 months ago

Hi @rfyffe-mgmresorts so it just in that dashboard that you cannot see any data? I would try to just do manually query to verify the names of the key paths and see that they are correct and match the variables. You can do that by adding a new metric and then look at the data step by step.

Screenshot 2023-12-07 at 07 05 05
rfyffe-mgmresorts commented 9 months ago

We are running the commands from our CI pipeline which is outputting the HTML.

I just checked in Graphite, I don't see the namespace (base) at all in the metric dropdown (I see my other tests) so it looks like it is not getting sent to Grafana at all.

soulgalore commented 9 months ago

Normally you will get an error if the metrics can't be sent. There's some settings in Graphite on how to handle metrics and metric names in the storage-schemas.conf file. Checkout https://github.com/sitespeedio/docker-graphite-statsd/blob/main/conf/graphite/storage-schemas.conf

Do you have any matching there for your base path?

rfyffe-mgmresorts commented 9 months ago

The storage schema has the following:

[carbon]
pattern = ^carbon\.
retentions = 60:1d

[catch_them_all]
pattern = .*
retentions = 10s:1w,1m:30d,10m:90d,30m:2y

This should catch all namespaces passed?

soulgalore commented 9 months ago

Yes that looks good for catching them.

Do you have access to Graphite logs? I think you should be able tail them to see what happens when the metrics is receivd.

There's another config that isn't perfect by default, the number of metrics that can be created per minute. In our default it's set to infinite, but a smaller value could mess things up for you, however if you run the test some metric should come through, so its probably not that. https://github.com/sitespeedio/docker-graphite-statsd/blob/main/conf/graphite/carbon.conf#L80

rfyffe-mgmresorts commented 8 months ago

Will provide an update shortly, still digging into this after the holidays. thanks