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

Uptime gauge #109

Open
1 task done
Baughn opened this issue Oct 19, 2023 · 0 comments
Open
1 task done

Uptime gauge #109

Baughn opened this issue Oct 19, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@Baughn
Copy link

Baughn commented Oct 19, 2023

Is there an existing feature request for this?

  • I have searched the existing issues before opening this feature request.

Describe the feature you would like to see.

A metric that tracks how long the server has been running would be great. At the moment I'm using minecraft_tick_duration_seconds_count / 20 for that, but that'll be inaccurate if TPS falls below 20.

Use cases:

  • I have a script that restarts the server twice per day. Occasionally there's an out of band restart, and I don't want to automatically restart the server again half an hour later.
  • There's also an alert for if the restart for some reason doesn't happen.

How would you like to see this implemented?

The simplest implementation would be a static gauge that just stores the POSIX timestamp from server startup.

Slightly more convenient would be to subtract the current time from the startup time at scrape-time.

Additional information to this request.

No response

@Baughn Baughn added the enhancement New feature or request label Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant