Send lighthouse metrics using NodeJS to Graphite

298 Views Asked by At

I am trying to send some lighthouse reports to Graphite. I have come across this NodeJS project Github lighthouse Project which generates the lighthouse reports and send to graphite.

So I've done few things -

  1. Spun up a graphite container on one my of EC2 instance using this image - https://hub.docker.com/r/graphiteapp/graphite-statsd/
  2. Modified index.js with the relevant details of Graphite to push the data from lighthouse to my graphite container.
  3. Running node index.js also works fine without any errors BUT I am not able to see any data in Graphite web UI.

These are the things which we need to configure in index.js -

const graphitePort = '8080'; // my container is exposed to port 8080
const graphiteHost = '<mypublicip of EC2>'; // e.g. 'carbon.hostedgraphite.com'
**const graphitePath = '<<No Idea on this >>'; // e.g. 'lighthouse.performance' or 'your-api-key'**
const url = 'https://github.com/';

I have no idea what the graphitePath is here and how to get it. Please if someone can advice on this that would be immensely helpful

0

There are 0 best solutions below