bundles/minecraft: add monitoring via telegraf

This commit is contained in:
Franzi 2022-11-13 17:47:19 +01:00
parent cb1222600d
commit 019d5ce2b6
Signed by: kunsi
GPG key ID: 12E3D2136B818350
3 changed files with 87 additions and 3 deletions

View file

@ -33,6 +33,62 @@ defaults = {
'-XX:MaxGCPauseMillis': 200,
'-XX:MaxTenuringThreshold': 1,
'-XX:SurvivorRatio': 32,
'-javaagent:/home/minecraft/jolokia.jar=port=25576,host=localhost': None,
},
},
'telegraf': {
'input_plugins': {
'builtin': {
'jolokia2_agent': [{
'urls': ['http://localhost:25576/jolokia'],
'metric': [
{
'name': 'minecraft_tick',
'mbean': 'net.minecraft.server:type=Server',
'paths': [
'averageTickTime',
],
},
{
'name': 'minecraft_memory',
'mbean': 'java.lang:type=Memory',
'paths': [
'HeapMemoryUsage',
'NonHeapMemoryUsage',
'ObjectPendingFinalizationCount',
],
},
{
'name': 'minecraft_gc',
'mbean': 'java.lang:name=*,type=GarbageCollector',
'paths': [
'CollectionTime',
'CollectionCount',
],
'tag_keys': ['name'],
},
{
'name': 'minecraft_mempool',
'mbean': 'java.lang:name=*,type=MemoryPool',
'paths': [
'CollectionUsage',
'PeakUsage',
'Usage',
],
'tag_keys': ['name'],
},
{
'name': 'minecraft_os',
'mbean': 'java.lang:type=OperatingSystem',
'paths': [
'OpenFileDescriptorCount',
'ProcessCpuLoad',
'ProcessCpuTime',
],
},
],
}],
},
},
},
'users': {