-
Notifications
You must be signed in to change notification settings - Fork 2
Configuration
DataMine provides various settings that can be configured in its config.yml
file.
tags: [tag1, tag2]
environment: production
prefix: minecraft
host: localhost
port: 8125
async: true
delay: 300
interval: 100
instance: lobby1
events:
startup: true
worlds: true
commands:
lag: true
debug: false
The tags
, environment
, and instance
properties are all for different tags that will be added to the metrics. tags
are a list of whatever you'd want to add to every metric collected on that server, environment
allows for separation between test/staging/production environments, and instance
should be unique for each server in a multi-server network. In our case, there's additional code that auto-populates the instance tag from another plugin--coding in something similar might be preferable if you're running a large network, particularly if it can auto-scale.
prefix
allows you to change what's the metrics are named, and defaults to minecraft
if absent.
host
and port
can be used to specify where the StatsD server runs. This could be useful when Docker or virtualization is used, or if you want to only have a central StatsD server for multiple machines. It'll default to localhost
and 8125
if absent; the defaults for StatsD.
async
will run metric collection tasks asynchronously. This is generally regarded as dangerous in Minecraft's highly synchronous server design, although may be found necessary due to the high resource consumption that is necessary to collect some of these metrics. Async mode was designed to fail as gracefully as possible--if it encounters any issues during metric collection, it will stop abandon metric collection for the current run. Issues are more likely to be encountered on servers with more loaded chunks and active players. delay
controls how many ticks DataMine will wait to collect metrics after starting up and interval
is how many ticks it will wait between collecting metrics. It may be preferable to switch to synchronous mode and increase the interval for highly populated servers.
The events
section will generate DataDog events for server startups and world loading and unloading if their respective options are enabled.
commands.lag
registers a /lag
command if enabled, which logs a data point whenever a player uses the command. This may be useful for troubleshooting server performance issues when viewed alongside other metrics.
debug
enables output of additional debugging and performance information.