lighthouse metrics gatherer, inspired by garie-lighthouse
Similarity with garie-lightouse
- Audit any website and stores the metrics into InfluxDB
- Write lighthouse reports to the disk
- Minimal setup effort
- Webhook support
Difference from garie-lightouse
- Accept custom Lighthouse config
- Queue based auditing
- More stable
- Lightweight docker image (alpine based)
in red is
garie-lighthouse
docker image
in green isiceberg-lightouse
docker image, 2.6x lighter
Iceberg Lighthouse is similar in many way to garie-lighthouse, both generates and stores lighthouse data into InfluxDB
.
check docker-compose.yml
to see a usage example
Property | Type | Description |
---|---|---|
cron |
string |
Cron pattern supoorted by the cron module. if the cron is not set, iceberg lighthouse will run just once on all the urls |
urls |
array |
array of url to audit |
urls.url |
string |
url to audit |
urls.plugins |
array |
array of plugins to apply |
urls.plugins.name |
string |
set it to lighthouse to apply the plugin setting |
urls.plugins.report |
boolean |
set it to true to save lighthouse report to disk |
urls.plugins.config |
object |
lighthouse custom config |
example
{
"cron": "00 00 */6 * * *",
"urls": [
{
"url": "https://www.google.com",
"plugins": [
{
"name": "lighthouse",
"report": true
}
]
},
{
"url": "https://www.example.com",
"plugins": [
{
"name": "lighthouse",
"report": true,
"config": {
"settings": {
"emulatedFormFactor": "desktop"
}
}
}
]
}
]
}
visit the server root to see all the stored report:
To trigger the webhooks. You will need to POST
or GET
request to /collect
.
Payload
Property | Type | Description |
---|---|---|
url |
string (required) |
Url to get metrics for. |
report |
boolean (optional) |
When set to true a lighthouse report will be generated |
POST Example
payload:
{
"url": "https://www.example.com",
"report": true
}
curl:
curl -X POST \
http://localhost:3000/collect \
-H 'Content-Type: application/json' \
-d '{
"url": "https://www.example.com",
"report":true
}'
GET Example
curl -X GET 'http://localhost:3000/collect?url=https://www.example.com&report=true'
Lighthouse comes with loads of audits out the box. You can view all metrics in the reports.
Garie-lighthouse filters what data is stored into influxDB and returned in the webhook.
Property | Type | Description |
---|---|---|
performance-score |
number |
Overall performance score. |
pwa-score |
number |
Overall progressive web app score. |
accessibility-score |
number |
Overall accessibility score. |
best-practices-score |
number |
Overall best practices score. |
seo-score |
number |
Overall seo score. |
time-to-first-byte |
number |
Number of ms to first byte. |
firstContentfulPaint |
number |
Number of ms to first contentful paint. |
firstMeaningfulPaint |
number |
Number of ms to first meaningful paint. |
interactive |
number |
Number of ms to interactive. |
firstCPUIdle |
number |
Number of ms to CPU idle. |
speedIndex |
number |
Google speed index. |
estimatedInputLatency |
number |
Input Latency. |
errors-in-console |
number |
Number of errors in the console. |
redirects |
number |
Number of redirects. |