louislam / uptime-kuma

A fancy self-hosted monitoring tool
https://uptime.kuma.pet
MIT License
55.82k stars 5.02k forks source link

[Real-Browser] Http monitor to also check website performance metrics #1967

Open christopherpickering opened 2 years ago

christopherpickering commented 2 years ago

⚠️ Please verify that this feature request has NOT been suggested before.

🏷️ Feature Request Type

UI Feature

🔖 Feature description

When doing an http monitor it would be pretty nice to have a feature allowing us to also track the websites lighthouse scores and also plot them over time.

Similar to https://github.com/zachleat/performance-leaderboard in https://www.11ty.dev/speedlify/

A workflow would maybe be

It would be great to list sub-urls as well.

So if my main uptime check is example.com, I could add a list of 5 sub-pages that I want to check the full performance on.

✔️ Solution

Add an option to http monitors to "check full page performance" on a daily schedule.

When the uptime check passes, check the full performance.

There will probably be an additional db table added to store the performance data. The output from performance-leaderboards looks pretty flat and could probably be kept in one table.

New charts would be added to the monitor preview page and also the status pages.

❓ Alternatives

No response

📝 Additional Context

Often times we don't want to know just if the site is "on" but how the performance is going over time. Others have request checking page size, or response time, and I think this would provide a way to add more strict "on" checks for certain sites.

mabed-fr commented 2 years ago

Hello I find that the solution is very specialized and can be too complete (SEO, ranking)

Given the objective of the project, I think that adding only the variables essential to monitoring the performance of the website is sufficient:

Example of recoverable data with CURL

              time_appconnect
                             The time, in seconds, it took from the start until the SSL/SSH/etc connect/handshake to the remote host was completed. (Added in 7.19.0)

              time_connect   The time, in seconds, it took from the start until the TCP connect to the remote host (or proxy) was completed.

              time_namelookup
                             The time, in seconds, it took from the start until the name resolving was completed.

              time_pretransfer
                             The time, in seconds, it took from the start until the file transfer was just about to begin. This includes all pre-transfer commands and negotiations that
                             are specific to the particular protocol(s) involved.

              time_redirect  The  time, in seconds, it took for all redirection steps including name lookup, connect, pretransfer and transfer before the final transaction was started.
                             time_redirect shows the complete execution time for multiple redirections. (Added in 7.12.3)

              time_starttransfer
                             The time, in seconds, it took from the start until the first byte was just about to be transferred. This includes time_pretransfer and also  the  time  the
                             server needed to calculate the result.

I think they are two complementary tools