Headless Server Health

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Tuetenk0pp
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Nov 27, 2019 7:14 am
Contact:

Headless Server Health

Post by Tuetenk0pp »

I want to monitor if my headless server is up and be notified if it crashes for some reason. I use uptime kuma for other websites and apps I host and also used it to monitor my factorio server. I was able to make it work with this link: https://multiplayer.factorio.com/get-ga ... s/16025881. But unfortunately, the game-id changes from time to time, e.g. when I upload a new save or update the server.

Is there a way to monitor the server directly instead of monitoring the multiplayer.factorio.com server? Something like https://HOSTNAME:PORT/....
adam_bise
Filter Inserter
Filter Inserter
Posts: 510
Joined: Fri Jun 08, 2018 10:42 pm
Contact:

Re: Headless Server Health

Post by adam_bise »

Factorio using UDP and I don't know if it responds to a rudimentary test connection. So maybe monitor the process or service.

Linux? try using watchdogsec and onfailure systemd options. With those you could run scripts to send an alert email or restart the service, etc..
Tuetenk0pp
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Nov 27, 2019 7:14 am
Contact:

Re: Headless Server Health

Post by Tuetenk0pp »

I was able to do it with the server list and an access token, then searched for my server name. This puts more load on the multiplayer server since it needs to send the entire server list but it works if the game is changes.
User avatar
Sanqui
Factorio Staff
Factorio Staff
Posts: 342
Joined: Mon May 07, 2018 7:22 pm
Contact:

Re: Headless Server Health

Post by Sanqui »

You can also pass the host address to get-game-details, e.g. https://multiplayer.factorio.com/get-ga ... 0.0.1:1234 (replace with your public IP address and port number).
ovo
codabool
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Oct 25, 2024 7:23 pm
Contact:

Re: Headless Server Health

Post by codabool »

@Tueten0pp If you are using the Docker image for Factorio you can just check using the Docker option in Uptime Kuma. Here is mine, https://i.imgur.com/f2qaF60.png

Here is also my docker-compose.yml file in case that helps:

https://github.com/CodaBool/docker-publ ... ompose.yml
Post Reply

Return to “Technical Help”