cpburnz / minecraft-prometheus-exporter

Prometheus exporter for Minecraft.
MIT License
44 stars 8 forks source link

Does not generate config #11

Closed BossDarkReaper closed 1 year ago

BossDarkReaper commented 1 year ago

Game Version: 1.19.2 Modpack: All The Mods 8

No config is generated upon start for the first time

cpburnz commented 1 year ago

Can you provide the debug log (logs/debug.log)?

I created a test server with Minecraft 1.19.2, Forge 43.1.1, and Prometheus-Exporter-1.19.2-forge-1.0.0.jar. It created the prometheus config at world/serverconfig/prometheus_exporter-server.toml. In my logs/debug.log there is a section where the config is read/created:

[24Apr2023 23:31:06.814] [Server thread/DEBUG] [net.minecraftforge.fml.config.ConfigFileTypeHandler/CONFIG]: Built TOML config for ./world/serverconfig/prometheus_exporter-server.toml
[24Apr2023 23:31:06.815] [Server thread/DEBUG] [net.minecraftforge.fml.config.ConfigFileTypeHandler/CONFIG]: Loaded TOML config file ./world/serverconfig/prometheus_exporter-server.toml
[24Apr2023 23:31:06.816] [Server thread/DEBUG] [net.minecraftforge.fml.config.ConfigFileTypeHandler/CONFIG]: Watching TOML config file ./world/serverconfig/prometheus_exporter-server.toml for changes
[24Apr2023 23:31:06.817] [Server thread/WARN] [net.minecraftforge.common.ForgeConfigSpec/CORE]: Configuration file ./world/serverconfig/prometheus_exporter-server.toml is not correct. Correcting
[24Apr2023 23:31:06.819] [Server thread/WARN] [net.minecraftforge.common.ForgeConfigSpec/CORE]: Incorrect key collector was corrected from null to its default, SimpleCommentedConfig:{}.
[24Apr2023 23:31:06.819] [Server thread/WARN] [net.minecraftforge.common.ForgeConfigSpec/CORE]: Incorrect key collector.jvm was corrected from null to its default, true.
[24Apr2023 23:31:06.820] [Server thread/DEBUG] [net.minecraftforge.common.ForgeConfigSpec/CORE]: The comment on key collector.jvm does not match the spec. This may create a backup.
[24Apr2023 23:31:06.820] [Server thread/WARN] [net.minecraftforge.common.ForgeConfigSpec/CORE]: Incorrect key collector.mc was corrected from null to its default, true.
[24Apr2023 23:31:06.821] [Server thread/DEBUG] [net.minecraftforge.common.ForgeConfigSpec/CORE]: The comment on key collector.mc does not match the spec. This may create a backup.
[24Apr2023 23:31:06.821] [Server thread/DEBUG] [net.minecraftforge.common.ForgeConfigSpec/CORE]: The comment on key collector does not match the spec. This may create a backup.
[24Apr2023 23:31:06.822] [Server thread/WARN] [net.minecraftforge.common.ForgeConfigSpec/CORE]: Incorrect key web was corrected from null to its default, SimpleCommentedConfig:{}.
[24Apr2023 23:31:06.822] [Server thread/WARN] [net.minecraftforge.common.ForgeConfigSpec/CORE]: Incorrect key web.listen_address was corrected from null to its default, 0.0.0.0.
[24Apr2023 23:31:06.822] [Server thread/DEBUG] [net.minecraftforge.common.ForgeConfigSpec/CORE]: The comment on key web.listen_address does not match the spec. This may create a backup.
[24Apr2023 23:31:06.823] [Server thread/WARN] [net.minecraftforge.common.ForgeConfigSpec/CORE]: Incorrect key web.listen_port was corrected from null to its default, 19565.
[24Apr2023 23:31:06.823] [Server thread/DEBUG] [net.minecraftforge.common.ForgeConfigSpec/CORE]: The comment on key web.listen_port does not match the spec. This may create a backup.
[24Apr2023 23:31:06.823] [Server thread/DEBUG] [net.minecraftforge.common.ForgeConfigSpec/CORE]: The comment on key web does not match the spec. This may create a backup.
[24Apr2023 23:31:06.824] [Thread-0/DEBUG] [net.minecraftforge.fml.config.ConfigFileTypeHandler/CONFIG]: Config file prometheus_exporter-server.toml changed, sending notifies
[24Apr2023 23:31:06.824] [Thread-0/DEBUG] [net.minecraftforge.fml.config.ConfigFileTypeHandler/CONFIG]: Config file prometheus_exporter-server.toml changed, sending notifies
BossDarkReaper commented 1 year ago

Ah my bad, i thought it would have generated in the config folder not the world/serverconfig folder

cpburnz commented 1 year ago

No problem. At some point in the newer releases of Minecraft, the Forge config classes started creating configs in the world/serverconfig directory rather than the old config directory.