Versiones comparadas

Clave

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



 

 

Columna

Columna

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 a dashboard builder for visualizing time series metrics.

...

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

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


  2. Create n 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

...

  • Players online (tic)
  • Logins per hour, per day, day of week, etc (tic)
  • Mails sent (error)
  • Auction house usage (error)
  • Character levels (error)
  • Gold earn/spend (error)
  • LFG queues (error)

...


Info

We'd like help implementing these and other metrics, feel free to send us a pull request.

 


Adding new metrics

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

...

  • category: Same as above;
  • value: A measurement, it can have one of the following types: bool, std::string, float, double or any integral type (int, int32, uint, etc).

 


Bloque de código
languagecpp
themeConfluence
titleExamples
linenumberstrue
// Registering player logins: in WorldSession::HandlePlayerLogin(LoginQueryHolder* holder)
TC_METRIC_EVENT("player_events", "Login", pCurrChar->GetName());
 
// Logging the update diff time: in World::Update(uint32 diff)
TC_METRIC_VALUE("update_time_diff", diff);

...

Sección

InfluxDB is part of a bigger set of projects by InfluxData which integrate nicely with the DB: 


Columna

Columna
  • Telegraf can be used to collect system metrics like CPU, I/O, memory usage and other services such as MySQL – to display this info next to the TC metrics.
  • Chronograf is an alternative to Grafana to graph and visualize time-series metrics.
  • Kapacitator is able to process streaming data from InfluxDB to provide alerts, trigger events, detect anomalies or transform data.

...