Versiones comparadas

Clave

  • Se ha añadido esta línea.
  • Se ha eliminado esta línea.
  • El formato se ha cambiado.

 

Tabla de contenidos

Required Software

Statistic and metric logging in TrinityCore is implemented using two projects, InfluxDB, a time-series data storage and Grafana, graph and dashboard builder for visualizing time series metrics.

Installing InfluxDB

  1. Download and install InfluxDB from https://influxdata.com/downloads/#influxdb for your platform

    Nota

    Windows is not currently available officially but an older working version can be found at https://github.com/mvadu/influxdb/releases

  2. Create an user and a database for TC using the Influx CLI

    Bloque de código
    languagesql
    themeConfluence
    CREATE DATABASE worldserver
    CREATE USER grafana WITH PASSWORD 'grafana'
    GRANT READ ON worldserver TO grafana

Installing Grafana

  1. Download and install Grafana from http://docs.grafana.org/installation/
  2. Open the dashboard at http://localhost:3000
  3. Login with username admin and password admin (defaults can be changed in Grafana's .ini files)
  4. Go to Data Sources → + Add Data Source
    Name: Influx
    Type: InfluxDB
    Urlhttp://localhost:8086
    Access: Proxy
    Database: worldserver User: grafana Password: grafana
  5. Go to Dashboards Import and import each .json file in TrinityCore's /contrib/grafana

Configuring TrinityCore

  1. Edit the worldserver.conf file
  2. Set Metric.Enable = 1
  3. Edit Metric.ConnectionInfo with connection details (e.g "127.0.0.1;8086;worldserver")
  4. Start worldserver, the dashboard should now start receiving values

Adding new metrics

There are two kinds of metrics that can be logged: values and events.

...