AMPTemplates icon indicating copy to clipboard operation
AMPTemplates copied to clipboard

[Software] Uptime Kuma

Open CostcoFanboy opened this issue 1 year ago • 38 comments

Module Request

Note: Please try setting up a configuration yourself before raising an issue to request a configuration: ~~https://config.getamp.sh/~~ ***There is a newer beta version available at https://iceofwraith.github.io/GenericConfigGen/

Game Information:

Uptime Kuma is FoSS tool to show uptime of various services and can be used to push notifs on certain status down events. Just generally unbelievably useful as this would allow me to check that the server that hosts my own game servers can maintain connection with sources.

This would allow AMP users to give a public status page to their users without giving access to AMP itself.

Software Title: Uptime Kuma How to obtain: https://hub.docker.com/r/louislam/uptime-kuma Suppoted OSs: Multi as it can be dockerized Supports RCON/Console input?No

I confirm:

  • [x] that I have searched for an existing module request for this application.
  • [ ] that the server is an official server distributed by the games publishers/developers.
  • [x] that the server is available to the general public.
  • [x] that the server can be run headless (without a GUI).
  • [ ] I have already attempted to create a configuration myself using the configuration tool
  • [x] that my checkboxes above look like the one on the left (remove this line when done)

CostcoFanboy avatar Nov 09 '24 22:11 CostcoFanboy

To note, AMP's API doesn't use API keys, so awhile ago I built an authless wrapper for AMP's API so you can hook instance statuses up to Uptime Kuma (since pinging ports can be hit or miss depending on the game) https://github.com/p0t4t0sandwich/ampapi-stats-wrapper (which I may turn into a panel plugin at some point for ease of use)

p0t4t0sandwich avatar Nov 09 '24 22:11 p0t4t0sandwich

To note, AMP's API doesn't use API keys, so awhile ago I built an authless wrapper for AMP's API so you can hook instance statuses up to Uptime Kuma (since pinging ports can be hit or miss depending on the game) https://github.com/p0t4t0sandwich/ampapi-stats-wrapper (which I may turn into a panel plugin at some point for ease of use)

TIL I thought pinging Game Port of games would always be a hit. Could you elaborate as to why this could fail? Are there games that require some form of auth that only the game's client can provide? I guess that would return a rejection in of itself so at least I know the game is up 🤔

Interesting add-on, will star. Thank you for the info.

CostcoFanboy avatar Nov 09 '24 22:11 CostcoFanboy

Some games (usually UDP based ones) don't respond right to port checkers, or don't respond as expected unless you use their specific game protocol. Lots of games should respond fine, but the random few might give you weird/inconsistent responses.

p0t4t0sandwich avatar Nov 09 '24 22:11 p0t4t0sandwich

Two things to note:

This may be possible already using the NodeJS App Runner template.

It seems it supports UDP games that use Steam Query Ports. Which isn't all, but could handle a chunk.

IceOfWraith avatar Nov 09 '24 23:11 IceOfWraith

Two things to note:

This may be possible already using the NodeJS App Runner template.

It seems it supports UDP games that use Steam Query Ports. Which isn't all, but could handle a chunk.

I think a proper user-friendly template may be easier to consume for users.

It seems it supports UDP games that use Steam Query Ports. Which isn't all, but could handle a chunk.

Honestly, I don't really understand how "reliably pinging UDP ports" is possible. Just conceptually as a whole considering the nature of UDP, but I'm not really an SME.

I'd like to announce a $50 USD bounty on the template. Will pay through PayPal in Canadian dollars at the current exchange rate at the time of the merge of the PR.

Will try templating this next weekend when I got more free time if someone didn't already get to it.

CostcoFanboy avatar Nov 09 '24 23:11 CostcoFanboy

Honestly, I don't really understand how "reliably pinging UDP ports" is possible. Just conceptually as a whole considering the nature of UDP

Yeah, that's kinda the thing, with UDP the application might respond if you ping it, but it'll be more likely to respond accurately if you use the game/app/etc protocol built on UDP that it's expecting. For example you can ping a MC Bedrock server on 19132 and it might respond, but it'll for-sure respond if you use the Minecraft Bedrock server ping protocol that it's expecting.

p0t4t0sandwich avatar Nov 10 '24 00:11 p0t4t0sandwich

I've got some sympathy for a specific template given how it handles installation and updating. I will put one together

Greelan avatar Nov 10 '24 00:11 Greelan

Uptime Kuma need an own Docker Image based on Alpine, because Ping dont work with Debian/Ubuntu images. Also some other debs are needed like chromium and cloudflared

gOOvER avatar Nov 10 '24 07:11 gOOvER

AMP doesn't really do specialized docker containers, just generalized ones. It isn't Ptero lol

p0t4t0sandwich avatar Nov 10 '24 07:11 p0t4t0sandwich

AMP doesn't really do specialized docker containers, just generalized ones. It isn't Ptero lol

you can create an own image also for AMP, but the Base image is based on Debian. Check: Meta.SpecificDockerImage=

gOOvER avatar Nov 10 '24 07:11 gOOvER

Imo it's not needed, it would be redundant to create a special image just for Uptime Kuma

p0t4t0sandwich avatar Nov 10 '24 07:11 p0t4t0sandwich

I just wanted to mention that some functions, such as ping, do not work with debian.

gOOvER avatar Nov 10 '24 07:11 gOOvER

Template functioning pretty well, including ping. Just can't install cloudflared in the standard AMP container at runtime. Otherwise docker handles the other packages (though apprise is the older bookworm version), and I don't bother with nscd

Nothing to stop a user installing all of the relevant packages on their host system and running outside docker tho

@CostcoFanboy

Greelan avatar Nov 13 '24 11:11 Greelan

Successfully monitoring a test L4D2 server too lol

Greelan avatar Nov 13 '24 11:11 Greelan

I just wanted to mention that some functions, such as ping, do not work with debian.

It would be beyond crazy if "ping" inside of a web application actually leveraged "ping" debian package.

Template functioning pretty well, including ping. Just can't install cloudflared in the standard AMP container at runtime. Otherwise docker handles the other packages (though apprise is the older bookworm version), and I don't bother with nscd

Nothing to stop a user installing all of the relevant packages on their host system and running outside docker tho

@CostcoFanboy

That's amazing, thank you I just tried it out. I'll be reaching out to you in Discord over the email to paypal this to.

CostcoFanboy avatar Nov 13 '24 22:11 CostcoFanboy

No need for payment tbh. But up to you

UK's ping (TCP) functionality does indeed use the system package. The UK official docker image is also Debian based

Greelan avatar Nov 13 '24 22:11 Greelan

No need for payment tbh. But up to you

UK's ping (TCP) functionality does indeed use the system package. The UK official docker image is also Debian 12 based

Oh wow I didn't think the software used actual ICMP packets for pings. Thank you for checking.

No need for payment tbh. But up to you

Requested-for Labor needs to be paid imo especially if I gave my word so I'd like to insist. DM'd. Thanks again!

CostcoFanboy avatar Nov 13 '24 22:11 CostcoFanboy

For actual ping (like to see if a website is up) it uses ICMP. For Steam servers I understand it uses the steam api and UDP query protocol - that's why you have to add your steam web api key

My discord profile has my Ko-Fi. But see how you go with the template first xD

Greelan avatar Nov 13 '24 22:11 Greelan

My discord profile has my Ko-Fi. But see how you go with the template first xD

I tried it out already with a couple of services doing GETs, it fits my needs :) Shame for the https but that's understandable given the limitations.

CostcoFanboy avatar Nov 13 '24 22:11 CostcoFanboy

You can whack it behind a reverse proxy, or even add your own certs to it (there are settings for that)

Greelan avatar Nov 13 '24 23:11 Greelan

https://github.com/louislam/uptime-kuma/wiki/Reverse-Proxy

Greelan avatar Nov 13 '24 23:11 Greelan

Making the template was the first time I have used UK. It's a pretty neat application imo

I set up SMTP relay (via Google) to test it and that worked well too

Greelan avatar Nov 13 '24 23:11 Greelan

You can whack it behind a reverse proxy, or even add your own certs to it (there are settings for that)

Hmmm I don't really understand how this would work within the AMP ecosystem. Worth a shot either way. Nowhere near MVP more after the main functionality. Will give it a go this weekend.

Making the template was the first time I have used UK. It's a pretty neat application imo

Yeah it's one of those insane apps that is hard to believe is free like gitea, code-server, grafana, Immich, Paperless-ngx, etc.

CostcoFanboy avatar Nov 13 '24 23:11 CostcoFanboy

Using a reverse proxy is essentially independent of AMP. If you got AMP to set up nginx for you, you can just add a nginx conf and have certbot generate the cert for an appropriate subdomain

Greelan avatar Nov 13 '24 23:11 Greelan

Using a reverse proxy is essentially independent of AMP. If you got AMP to set up nginx for you, you can just add a nginx conf and have certbot generate the cert for an appropriate subdomain

Please read cloudflared docs; the you understand ;) Its a feature of Uptime Kuma. And its not the sense of docker, That you have to install needed packages on the hostsystem.

gOOvER avatar Nov 15 '24 17:11 gOOvER

Successfully monitoring a test L4D2 server too lol

Noone said, that Uptime Kuma dont work; only some features are not working with amp ;)

gOOvER avatar Nov 15 '24 17:11 gOOvER

Template functioning pretty well, including ping. Just can't install cloudflared in the standard AMP container at runtime. Otherwise docker handles the other packages (though apprise is the older bookworm version), and I don't bother with nscd

Nothing to stop a user installing all of the relevant packages on their host system and running outside docker tho

@CostcoFanboy

check uptimeKuma Bugreports ;) There is a ticket about non working Ping on Ubuntu/Debian Systems.

MB it is fixed with bookworm

gOOvER avatar Nov 15 '24 17:11 gOOvER

Disagreeing with Greelan on something he's setup in a template...

bold

IceOfWraith avatar Nov 15 '24 17:11 IceOfWraith

Disagreeing with Greelan on something he's setup in a template...

Not in any way; but he should start reading. But I'll stop here, he's always the center of the world anyway. I was just sharing my experiences ;) But let greenlan do it. Nevertheless, it's not the point of Docker that you install the required packages on the host. That's the biggest problem with AMP. I would fix that, that AMP use seperated Containers for every game, without the need to install anything on the hostsystem.

gOOvER avatar Nov 15 '24 17:11 gOOvER

I mean I literally tested the ping feature and it is functioning right now. You're free to help us debug this @gOOvER as I'm not able to repro on my side.

CleanShot 2024-11-15 at 12 43 11

Not in any way; but he should start reading. But I'll stop here, he's always the center of the world anyway.

Kind reminder that this is Github not Twitter. I requested a template and support and got it. Not drama and weird petty squabbles to get notified by.

CostcoFanboy avatar Nov 15 '24 17:11 CostcoFanboy