Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add a Reporting System that calculates the total Uptime percentage of my application #855

Open
rha-wtag opened this issue Sep 4, 2024 · 1 comment

Comments

@rha-wtag
Copy link

rha-wtag commented Sep 4, 2024

Describe the feature request

My clients require a report of the amount of time my application faced a downtime.
For example: 100% Uptime in last 1 week
95% uptime in last 365 days.

Why do you personally want this feature to be implemented?

No response

How long have you been using this project?

No response

Additional information

No response

@johanjk
Copy link

johanjk commented Sep 12, 2024

The simplest workaround would be to:

  • use gatus with sql backend.
  • Realize there is an endpoint for uptime badges, doing nearly what you require.
  • Take a look at the source code for the uptime badge generation:
    `
    SELECT SUM(total_executions), SUM(successful_executions), SUM(total_response_time)
    FROM endpoint_uptimes
    WHERE endpoint_id = $1
    AND hour_unix_timestamp >= $2
    AND hour_unix_timestamp <= $3
  • Write your own query, interfacing with the gatus db.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants