Skip to content

Instantly share code, notes, and snippets.

@kcleong
Last active April 5, 2016 12:23
Show Gist options
  • Save kcleong/4aaca8f0188fe00b46061953ae2ede8f to your computer and use it in GitHub Desktop.
Save kcleong/4aaca8f0188fe00b46061953ae2ede8f to your computer and use it in GitHub Desktop.

Plone performance metrics

This gist describes how-to install and use zperfmetrics. The zperfmetrics module uses statd and graphite. The easiest way to set-up statd and graphite is to use a docker image. First install Docker compose, then use Kitematic to install the graphite-statsd Docker image. After installing the image the 'Graphite dashboard' can be opened in Kitematic by clicking on the web review option.

Next configure buildout, I used a separate buildout-perf.cfg which extends from the development buildout. See the installation part on the zperfmetrics page for more info about the configuration options:

[buildout]
extends =
    buildout-dvl.cfg

parts +=
    instance-perf

[instance-perf]
<= instance0
debug-mode = off
verbose-security = off
http-address = 8888
zope-conf-imports =
    zperfmetrics
zope-conf-additional =
    %import zperfmetrics
    <perfmetrics>
        uri statsd://192.168.99.100:32768
        before MyFancyProject
        hostname on
        after ${:_buildout_section_name_}
    </perfmetrics>
eggs =
    ${instance:eggs}
    zperfmetrics

Note the port for stats, normally statsd is available under port 8125. But because docker is used statsd is in use on other port. Go to Kitematic → graphite-statsd → Settings → Port to lookup the correct statsd port.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment