New announcements for Serverless, Network, RUM, and more from Dash! New announcements from Dash!

Lighthouse

Agent Check Agent Check

Supported OS: Linux

Overview

Get metrics from Google Chrome Lighthouse in real time to: * Visualize and monitor Lighthouse stats * Track and audit scores for your websites accessibility, best practices, performance, PWA, and SEO audit scores

Setup

The Lighthouse check is not included in the Datadog Agent package, so you will need to install it yourself.

Installation

If you are using Agent v6.8+ follow the instructions below to install the Google Chrome Lighthouse check on your host. See our dedicated Agent guide for installing community integrations to install checks with the Agent prior to version 6.8 or the Docker Agent:

  1. Install the developer toolkit.
  2. Clone the integrations-extras repository:

    git clone https://github.com/DataDog/integrations-extras.git.
    
  3. Update your ddev config with the integrations-extras/ path:

    ddev config set extras ./integrations-extras
    
  4. To build the lighthouse package, run:

    ddev -e release build lighthouse
    
  5. Download and launch the Datadog Agent.

  6. Run the following command to install the integrations wheel with the Agent:

    datadog-agent integration install -w <PATH_OF_LIGHTHOUSE_ARTIFACT_>/<LIGHTHOUSE_ARTIFACT_NAME>.whl
    
  7. Configure your integration like any other packaged integration.

Configuration

  1. Edit the lighthouse.d/conf.yaml file in the conf.d/ folder at the root of your Agent’s configuration directory to start collecting your Lighthouse metrics. See the sample lighthouse.d/conf.yaml for all available configuration options.

  2. Restart the Agent

Requirements

  1. Lighthouse requires Node 8 LTS (8.9) or later. Check you have Node and npm installed:

    node -v
    npm -v
    

    If not, install Node and npm.

  2. Install Lighthouse:

    npm install -g lighthouse
    
  3. 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
    

Validation

Run the Agent’s status subcommand and look for lighthouse under the Checks section.

Data Collected

Metrics

lighthouse.accessibility
(gauge)
The google chrome lighthouse score for accessibility
shown as percent
lighthouse.best_practices
(gauge)
The google chrome lighthouse score for best_practices
shown as percent
lighthouse.performance
(gauge)
The google chrome lighthouse score for performance
shown as percent
lighthouse.pwa
(gauge)
The google chrome lighthouse score for pwa
shown as percent
lighthouse.seo
(gauge)
The google chrome lighthouse score for seo
shown as percent

Events

The Lighthouse integration does not include any events.

Service Checks

The Lighthouse integration does not include any service checks.

Troubleshooting

Need help? Contact Datadog support.


Mistake in the docs? Feel free to contribute!