Skip to content

Start

Install the resource

The quickest way to connect: put one resource into your server, add one line to server.cfg and restart. No program to install.

What the resource is

swisser_reports is a FiveM resource. You put it into your resources folder like any other script, and it reports to Server Reports. You do not install a program, you do not need root or administrator rights, and it works on hosted game panels too.

The setup offers it first. The Agent is the other way to connect: it sees more, but needs a machine where you can install a program. See The Agent sees more.

Install it

  1. 1

    Download it

    In Server Reports, open Connect your server, give your server a name and press Download swisser_reports.zip. The key for your server is already inside, so there is nothing to fill in. Downloading means you agree that the resource reads the data listed above the button. You can turn data kinds off later in the settings.

  2. 2

    Put the folder into resources

    Unzip the file. Put the swisser_reports folder into the resources folder of your server, so this file exists:

    resources/swisser_reports/fxmanifest.lua
  3. 3

    Add it to server.cfg

    Add this line to server.cfg:

    ensure swisser_reports
  4. 4

    Restart your server

    The setup page moves on by itself as soon as the resource reports, usually a few seconds after the server starts.

Check that it works

On a good start, the server console shows these lines, with your server name, framework and database:

Server Reports v1.0.0 ready
  "My RP" | qbx_core | oxmysql (MariaDB 11.4)
  Host CPU/RAM and crash insight: install the Agent at ai.swisser.dev/docs/server-reports/agent

The last line only shows while no Agent is connected to the server.

Type this in the server console at any time to see its status: last contact, last error and how far it has read your database.

swisser

config.lua holds two settings: the key, and how much is printed (info, warn or error). Everything else is set in the browser.

What it reads

  • Live data: players joining and leaving (license, in-game name and why they left), the player count every minute, txAdmin restarts and server tick times from FXServer.
  • Your database, read only: the tables your framework and scripts keep, such as characters, accounts, items and vehicles. It reads everything once, then only the rows that changed.

It reads in small steps with a pause after each one, so players do not notice it. If the database is slow, it waits.

What it never reads

  • Data is sent as it is stored in your database, with plain license ids and in-game names.
  • Columns for passwords, IP addresses, hardware ids and Discord ids are never read.
  • It reads your database through oxmysql, which your server already uses. It never sees the database password and never writes to your database.
  • It cannot touch files outside its own folder, and it runs no code it downloads. A new version is a new download.

More in Your data and privacy.

The Agent sees more

The resource runs inside FXServer, so it cannot see the machine around it. A crash shows up as a gap between reports and a restart, without a crash report. For that, add the Agent.

  • Players and sessions, player count, disconnect reasons

    Resource:Yes
    Agent:Yes
  • txAdmin restarts and server tick times

    Resource:Yes
    Agent:Yes
  • Economy, inventories and vehicles from the database

    Resource:Yes
    Agent:Yes
  • Host CPU, RAM and disk

    Resource:No
    Agent:Yes
  • Crash dumps and hang detection

    Resource:No
    Agent:Yes
  • Console errors of other resources

    Resource:No
    Agent:Yes
  • Runs on

    Resource:Inside FXServer, like any resource
    Agent:Next to FXServer, as a program on the same machine

Both can run on the same server. In the setup, the Agent is under Advanced: the Agent.

Updates, a second install and the key

  • Updates: the resource does not update itself. When a new version is out, Agent and updates in the server settings says Update available. Download it again, replace the swisser_reports folder and restart the server.
  • Download again: every download for a server has the same key, so you can download it as often as you need.
  • A second install: only one install can report per server. If another server starts with the same key while the first one runs, the settings show Another server tried to connect with this key. Press Approve to switch to it, or Keep current.
  • Rotate key: if the file got into the wrong hands, press Rotate key in the settings. This disconnects every running install until the new download is in place.

Removing it

Delete the swisser_reports folder and the ensure swisser_reports line, then restart the server. To delete the collected data too, delete the server in the Danger zone. See Pausing and removing a server.

When it does not connect

If the setup page still waits after two minutes, check these three things:

  • The folder is in the right place. The file must be at resources/swisser_reports/fxmanifest.lua. A folder one level deeper, like resources/swisser_reports-main/swisser_reports, does not start.
  • server.cfg has the line. ensure swisser_reports must be there, and the server must have restarted after you added it.
  • The status says why. Type swisser in the server console. It names the problem, for example no internet, no database connector or a key that was rotated.

After a key rotation

An old install says this key was replaced in the panel in the console. Download the resource again and replace the folder.