Find file
Fetching contributors…
Cannot retrieve contributors at this time
47 lines (33 sloc) 1.64 KB

Grab pagespeed results from external services to use them in e.g. munin.
Currently only support, which is not very reliable and sometimes slow.

Not ready for production just a toy project.

data = PagespeedGrabber.fetch('', :from => 'webpagetest', :timeout => 200)


1 of 8 graphs generated via munin: Pagespeed score over 1 day for initial request:
score for initial reqest over 1 day


sudo su

gem install pagespeed_grabber
curl --insecure > /usr/share/munin/plugins/pagespeed_grabber
chmod +x /usr/share/munin/plugins/pagespeed_grabber

Add data cron and run it once

*/5 * * * * ruby /usr/share/munin/plugins/pagespeed_grabber cache webpagetest

Add plugins for time, data, score, connections graphs

ruby -e "%w[time data score connections].each{|s| %w[initial repeated].each{|t| %x{ln -s /usr/share/munin/plugins/pagespeed_grabber /etc/munin/plugins/webpagetest_#{s}_#{t}}  } }"

Check plugins work

ruby /etc/munin/plugins/ config    # config works
ruby /etc/munin/plugins/           # values are returned




  • add other services
  • make less hacky/use official apis
  • generate initial AND repeated graph
  • find a reliable service
  • parse .har file from e.g.


Michael Grosser
Hereby placed under public domain, do what you want, just do not hold me accountable...