Here is a guide on setting up metrics for the Unreal Engine servers using Prometheus & Grafana.

Untitled

<aside> 📖 Table of content

</aside>

Introduction

Prometheus and **Grafana ****are two popular free and **open-source ****tools, that will help you track the state of the server to promptly prevent a lack of resources and any other potential issues (that will be covered by your metrics). Using these services you can also collect data on how people are playing your game to help game designers make better decisions, or gather statistics to present to investors in a user-friendly way.

Untitled

Setup Grafana & Prometheus

<aside> 💡 There are a few examples of how to install these tools. Most likely for real project you will install it on a remote server using docker files or something else. As, for simplicity, there are the necessary steps below to install tools on your local machine using precompiled binaries.

</aside>

Setup Prometheus

  1. Install Prometheus:

  2. Configure Prometheus:

  3. Open a terminal and run Prometheus:

    prometheus.exe --config.file=prometheus.yml
    
  4. Check localhost:9090/targets. If you did it right you will see something like that (UI may differ depending on a version):

    Untitled

Setup Pushgateway component

<aside> â›” Note that Pushgateway is an optional component, if you are not interested in the push-based model of interaction with Prometheus, you can skip installing it.

</aside>

  1. Install Prometheus Pushgateway: