a google chrome lighthouse custom agent check for datadog
Get metrics from Google Chrome Lighthouse as a custom agent check in your Datadog app in real time to:
- Visualize and monitor Lighthouse stats
- Track and Audit scores for yours websites Accessibility, Best Practices, Performance, PWA, SEO, and more (eventually)
At the moment this is just a Custom Agent Check for Datadog. It's not included in the Datadog Agent package.
To install the Lighthouse Custom Agent Check on your host:
- Download the Datadog Agent
- Download the
custom_lighthouse.py
file for Lighthouse - Place it in your Agent's
checks.d
directory (in Linux, this would be found in/etc/datadog-agent/checks.d/
) - Create a
custom_lighthouse.yaml
file in your Agent'sconf.d
directory (in Linux, this would be found in/etc/datadog-agent/conf.d/
) - Reference the example
custom_lighthouse.yaml.example
file in this repository and copy it's contents into thecustom_lighthouse.yaml
file just created. - Edit the
custom_lighthouse.yaml
file for your use case (please note: This is a work in progress, it's unclear how resource intensive this can be, a typical lighthouse report takes about 5-10seconds to generate so it may be necessary to have a higher than usualminimum_collection_interval
) - Restart the agent
Only tried this on Ubuntu so far.
- Check you have Node and NPM installed
node -v
npm -v
Lighthouse requires Node 8 LTS (8.9) or later.
If not, install Node and npm
npm install -g lighthouse
- Make sure Google Chrome is installed or Puppeteer (this custom agent check runs chrome in headless mode)
# example
vagrant@web2:~$ npm list -g --depth=0 | grep 'puppeteer'
└── puppeteer@1.12.2
If not, install Chrome or Puppeteer
npm install -g puppeteer
Run the Agent's status
subcommand and look for custom_lighthouse
under the Checks section.
See metadata.csv
for a list of metrics provided by this check.
The Lighthouse custom agent check does not include any events.
The Light custom agent check does not include any service checks.
This is not production ready at this time, and not meant to be used in production at this time.