Skip to content

Uptime gauge #109

Open
Open
@Baughn

Description

@Baughn

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions