Skip to content

Conversation

@jkisor
Copy link

@jkisor jkisor commented Jan 22, 2023

Requirements:

  • Permissions in the repo must be updated to allow actions to create pull requests. See the Create Pull Request action docs, here

How it's triggered:

  • Manually via GitHub's Actions tab
  • Scheduled once a month

How it works:

  • Collects last seen times for each server from https://servers.treestats.net. For more info on how this data source works, go here
  • Determines which servers haven't successfully received a login packet in 3 months.
  • If any expired servers are found, it modifies the Servers.xml and opens a pull request
  • If a previous PR is still open, The action will modify and force push to the same branch/PR.

@amoeba
Copy link
Collaborator

amoeba commented Jan 27, 2023

This looks great @jkisor. Looking at the current list, we have some servers that are often down like GDLE Test and Hightide. We might first discuss whether to keep these listed types of servers in the list and, if so, then discuss tweaking this action's logic to ignore one or more servers.

I'm going to leave this unmerged until discussion wraps up in #111.

Thanks again.

@jkisor
Copy link
Author

jkisor commented Feb 4, 2023

I've returned to refactor and add a keep list. There's a new file, "keep", for adding server IDs to exclude. I've gone ahead and added the example servers you shared.

But ... I discovered that I misunderstood the values returned by servers.treestats.net -- 'last_seen` isn't what I assumed (and I overlooked it when fixing the invert bug). It returns the last date of a status event (even if its down). So this PR doesn't work as intended at the moment.

https://github.com/amoeba/ac-server-monitor/blob/88161e4724249f1cb64facaaa74bf220c614d59e/api/servers.go#L67-L68

@amoeba
Copy link
Collaborator

amoeba commented Feb 6, 2023

My fault there, sorry @jkisor. I've since pushed an update that should report this correctly. For servers that have been seen, you get:

  "status": {
      "online": true,
      "last_seen": "2023-02-06T03:13:57Z",
      "last_checked": "2023-02-06T03:13:56Z"
    }

Note: last_seen will be null when the server has never been seen online.

@amoeba
Copy link
Collaborator

amoeba commented Apr 11, 2023

I'm still interested in seeing this added but need to do some refactoring of https://servers.treestats.net to support this and I'm just really busy at the moment. I'll revisit this when the service is in a good state and work on getting this merged.

@amoeba amoeba self-assigned this Aug 5, 2023
@amoeba amoeba self-requested a review August 5, 2023 07:15
@amoeba
Copy link
Collaborator

amoeba commented Aug 5, 2023

I refactored some things on https://servers.treestats.net and it's ready for use here. I pushed some minor tweaks to jkisor#4 so please have a look and merge those so this PR updates. I think we could merge this and still discuss (1) how long it takes us to consider a server expired and (2) what we do when we expire a server. In #110, @Mag-nus points out we could flip a flag instead of removing a server from the list and ask tools (i.e. ThwargLauncher) to respect it.

@amoeba amoeba removed their request for review September 17, 2025 02:19
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

Successfully merging this pull request may close these issues.

2 participants