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

Support 'uptime' in hostlist #186

Open
Oisov opened this issue Nov 28, 2022 · 1 comment
Open

Support 'uptime' in hostlist #186

Oisov opened this issue Nov 28, 2022 · 1 comment

Comments

@Oisov
Copy link

Oisov commented Nov 28, 2022

Background

A common task using Nivlheim is to log the uptime of a given host. Today this is a slightly cumbersome:

  • Using files we can extract the information from the file UptimeSince.
  • This information must then be parsed back into hostlist
  • In addition it is cumbersome to sort based on this field based on the ISO formating 2021-12-13 12:04:45

Suggestion:

Introduce a new parameter and field called uptime

Example usage:

Obtain hosts which have been rebooted between 350 and 360 days ago in descending order

/api/v2/hostlist?fields=hostname,uptime>=350d,uptime<360d&uptimesort=-uptime

Path:

What I think is needed to make this work

@oyvindhagberg
Copy link
Contributor

I agree, this is a good idea. We should implement this.

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

No branches or pull requests

2 participants