Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion] - Metrics: allow to specify what metrics do you want in conf #22201

Open
Jildor opened this issue Jul 29, 2018 · 3 comments
Open

Comments

@Jildor
Copy link
Contributor

Jildor commented Jul 29, 2018

Description:

Add the posibility to enable/disable specific metric in the conf.
By example:

Metric.UpdateDiff = 0
Metric.OnlinePlayers = 0
Metric.PlayersLogins = 0
Metric.Map = 0
Metric.Mmap = 0
Metric.Network = 0

if you want log only diff and online players:

Metric.UpdateDiff = 1
Metric.OnlinePlayers = 1
Metric.PlayersLogins = 0
Metric.Map = 0
Metric.Mmap = 0
Metric.Network = 0

Branch(es):

both

TC rev. hash/commit:

a815c64

@jackpoz
Copy link
Member

jackpoz commented Jul 29, 2018

The current metrics are just a proof of concept, in my mind everything should be a metric (even every spell cast). Maybe they could be grouped into categories just like we did already on grafana dashboard.

Btw is this for performance reasons in worldserver, for space in influxdb or any other reason ? Just curious :)

@Jildor
Copy link
Contributor Author

Jildor commented Jul 30, 2018

I have configured that influxdb keep the data up to a maximum of two days, so due to space problems it is not ;)

Real performance problems do not generate the metrics in my case, but, I think it would be more optimal to be able to specify what metrics you want to obtain so as not to generate everything if you do not need it ;)

@jackpoz
Copy link
Member

jackpoz commented Mar 25, 2021

Over the past years we added some settings in worldserver.conf to specify a threshold for some metrics

# Metric threshold values: Given a metric "name"
# Metric.Threshold.name
# Description: Skips sending statistics with a value lower than the config value.
# If the threshold is commented out, the metric will be ignored.
# Only metrics logged with TC_METRIC_DETAILED_TIMER in the sources are affected.
# Disabled by default. Requires WITH_DETAILED_METRICS CMake flag.
#
# Format: Value as integer
#
#Metric.Threshold.world_update_sessions_time = 100
#Metric.Threshold.worldsession_update_opcode_time = 50

We also added some CMake options -DWITHOUT_METRICS and -DWITH_DETAILED_METRICS

if(WITHOUT_METRICS)
message("")
message(" *** WITHOUT_METRICS - WARNING!")
message(" *** Please note that this will disable all metrics output (i.e. InfluxDB and Grafana)")
add_definitions(-DWITHOUT_METRICS)
elseif (WITH_DETAILED_METRICS)
message("")
message(" *** WITH_DETAILED_METRICS - WARNING!")
message(" *** Please note that this will enable detailed metrics output (i.e. time each session takes to update)")
add_definitions(-DWITH_DETAILED_METRICS)
endif()

It's not exactly the same as what you asked but it's a step in that direction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants