Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Enhancements to 90 Day Uptime Visualization #257

Open
wants to merge 19 commits into
base: dev
Choose a base branch
from

Conversation

OstlerDev
Copy link

@OstlerDev OstlerDev commented Dec 15, 2023

Overview

The "Last 90 day" view in my opinion could be further utilized to display the services status for the day. I have made some changes that I think look good while adding much more detail to the service's status for a particular day. The changes display if a service was online, or if there was an outage, how severe the outage was based on the number of bad data points we recieved.

Currently the application will display a grey cell for no issues, and a bright red cell if there is even a single issue. In my opinion showing a server as "red" means it was completely offline or severely impaired, and missing a single ping shouldn't be cause for showing an "outage" for the full day.

It was that reason that I decided it might be nice if it was a little more dynamic.

Changelog

Fixed

  • [DevOps] Development Dockerfile with hot reloading, since I needed it working to get this working haha.
  • [UI] Fixed display of day (xAxis) on the Service Heatmap (on the service page), see picture below
  • [Go] Calculation of Uptime when a service has never been online

Changed

  • [Env] Default to keep records for 365 days before purging

Added

  • [Go] Better/more diverse sample data for service hits/failures.
  • [UI & Go] Added uptime calculation for the past 12 months
  • [UI] Dynamic Color Coding: Modified the day cells to reflect a range of statuses/outage severities with a new color scheme.
    • #e9e9e9 #e9e9e9 Light Grey for days with no data
    • #4CAF50 #4CAF50 Green for days with 100% uptime
    • A gradient from light green to yellow, orange, and red, indicating the severity of outages based on duration.
      • #98EE99 #98EE99 (Minor outage) Light green for days with between 1-30 failures (up to 30 minutes of downtime)
      • #FFEB3B #FFEB3B (Moderate outage) Yellow for days with between 31-120 failures (up to 2 hours of downtime)
      • #FF9800 #FF9800 (Major outage) Orange for days with between 121-240 failures (up to 4 hours of downtime)
      • #F44336 #F44336 (Critical outage) Red for days with over 240 failures (over 4 hours of downtime)

Ideas for improvement

It would be great if the outage severities could be set inside the settings of Statping-ng, I just didn't have time at the moment to add it, but I did leave everything very configurable in the Vue file in case someone wants to get around to it eventually. If I get some time I will try to add it in another MR, but no promises.

Preview

status-graph 4-service-view 6-service-view 12-month-uptime service-heatmap

What it used to look like

day-view-old

@OstlerDev OstlerDev changed the title Enhancements to Statping Service Uptime Visualization Enhancements to 90 Day Uptime Visualization Dec 15, 2023
@jemand771
Copy link
Member

wow, this looks good! I agree that the thresholds could be configurable, but this is already an improvement, so no worries :)
let's see if CI broke again

also, thanks for fixing the dev setup - I've been procrastinating on that for, what, a year now?

@jemand771 jemand771 added the Improvement An Improvement of an already implemented feature label Dec 15, 2023
@OstlerDev
Copy link
Author

OstlerDev commented Dec 15, 2023

Glad you like it!

Happy to help haha, sometimes it's the small things that are just hard to get to!

Looks like I might have broken the tests with changing the sample data 😵 Though when I took a look at the failing tests it doesn't seem to be that 🤔

@jsnbuchanan
Copy link

Love this PR. Thank you @OstlerDev!

@OstlerDev
Copy link
Author

OstlerDev commented Dec 20, 2023

I built and released a version on Docker Hub so that anybody who wants can test this out.

ostlerdev/statping-ng:v0.91.0-beta4 Link to Docker Hub

Note: Docker building was broken, but I fixed it, and included this fix in this new Pull Request: #259

types/hits/samples.go Outdated Show resolved Hide resolved
@OstlerDev
Copy link
Author

Alright, that should fix the issue 😸

@OstlerDev
Copy link
Author

OstlerDev commented Mar 25, 2024

I went through and took another quick look and decided to add another couple things to this pull request that I think enhance it a little further. Figured I would get to those while I was working on things. Let me know what you think of all the changes, I figure they are in line with the goal of this project so hopefully they are easy wins 😸

  1. Added Uptime calculation for the past year, to give people the ability to view their SLA Uptime over the past 12 months.
Screenshot 2024-03-25 at 12 53 19 AM
  1. Fixed the Service Heatmap (on the service page) so that it properly displays the day of the month, along with a better tooltip
Screenshot 2024-03-25 at 12 53 40 AM

@OstlerDev
Copy link
Author

Looks like there was an issue with the testing workflows building the Go app properly. I saw that it might be an issue with newer versions, so I pinned the tests to use Go v1.20.0 to match the Main Dockerfile exactly. It looks like it was installing Go v1.20.14 I believe, so maybe using an older version will work? I will attempt to run the worlflows locally to see if I can get them working as expected.

@OstlerDev
Copy link
Author

OstlerDev commented Mar 26, 2024

Alright @jemand771, I finally got the tests working 😵 Turns out there was a couple errors in the test pipelines, but fixing a couple things with the Go version/setup seems to make them run just fine when I tested them on my personal GitHub repo 😸

Hope they also work for you, they are running like a charm for me now 😄 (other than docker-build taking 1h+ to run haha)

@adamboutcher
Copy link
Collaborator

Sorry for being silent, is this merge good to go?

@jemand771
Copy link
Member

something's up with the tests (but only somtimes?) that I'd like to sort out first: #282

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement An Improvement of an already implemented feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants