Switch on Smarthost (BETA)
If you want to use Smarthost, you need to expose an endpoint that our platform can use to get the information we need. For this example, we’ll call this metrics.
We need to speak with you first. There are a few values we need from you so we can set up our platform to work with your game. Speak with our support team to get everything ready.
Typically, people set this to /metrics on port 80. This is an http endpoint (not https).
You must use port 80.
The endpoint exposes a Prometheus gauge metric named occupancy with just one label slot. This label uniquely identifies the "seat" that a player can fill.
When this value is 1 (or 1.0), that means a player is present in that chair. When this value is 0 (or 0.0), there’s no player.
Here’s an example of a response to GET /metrics:
Here’s a simple Python script to do this:
With that done, Smarthost can now use that information to predict how many sessions you'll need and load them up ready for new players.