palworldlol / palworld-exporter

Prometheus metrics exporter for Palword Server
https://palworld.lol
MIT License
15 stars 2 forks source link

Export only palworld metrics? #1

Closed sh-cho closed 5 months ago

sh-cho commented 5 months ago
# HELP python_gc_objects_collected_total Objects collected during gc
# TYPE python_gc_objects_collected_total counter
python_gc_objects_collected_total{generation="0"} 233.0
python_gc_objects_collected_total{generation="1"} 24.0
python_gc_objects_collected_total{generation="2"} 0.0
# HELP python_gc_objects_uncollectable_total Uncollectable objects found during GC
# TYPE python_gc_objects_uncollectable_total counter
python_gc_objects_uncollectable_total{generation="0"} 0.0
python_gc_objects_uncollectable_total{generation="1"} 0.0
python_gc_objects_uncollectable_total{generation="2"} 0.0
# HELP python_gc_collections_total Number of times this generation was collected
# TYPE python_gc_collections_total counter
python_gc_collections_total{generation="0"} 39.0
python_gc_collections_total{generation="1"} 3.0
python_gc_collections_total{generation="2"} 0.0
# HELP python_info Python platform information
# TYPE python_info gauge
python_info{implementation="CPython",major="3",minor="12",patchlevel="1",version="3.12.1"} 1.0
# HELP process_virtual_memory_bytes Virtual memory size in bytes.
# TYPE process_virtual_memory_bytes gauge
process_virtual_memory_bytes 3.2514048e+07
# HELP process_resident_memory_bytes Resident memory size in bytes.
# TYPE process_resident_memory_bytes gauge
process_resident_memory_bytes 2.4301568e+07
# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.
# TYPE process_start_time_seconds gauge
process_start_time_seconds 1.70696266891e+09
# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.
# TYPE process_cpu_seconds_total counter
process_cpu_seconds_total 0.29
# HELP process_open_fds Number of open file descriptors.
# TYPE process_open_fds gauge
process_open_fds 7.0
# HELP process_max_fds Maximum number of open file descriptors.
# TYPE process_max_fds gauge
process_max_fds 1.073741816e+09
# HELP palworld_player_count Current player count
# TYPE palworld_player_count gauge
palworld_player_count 0.0
# HELP palworld_player Palworld player information
# TYPE palworld_player gauge
# HELP palworld_server Palworld server information
# TYPE palworld_server gauge
# HELP palworld_up Was last scrape of Palworld metrics successful
# TYPE palworld_up gauge
palworld_up 1.0
# HELP palworld_player_save_count Number of player save files
# TYPE palworld_player_save_count gauge
palworld_player_save_count 0.0

First of all, thank you for this awesome exporter 😎

This is exported metrics and I don't need extra metrics like python_gc_objects_collected_total.

Of course I can exclude it from prometheus scrape config, but I think it can be done in exporter side. How do you think?

bostrt commented 5 months ago

Yep! I think that's a good idea and it's easy to accomplish.

https://prometheus.github.io/client_python/instrumenting/#disabling-_created-metrics

bostrt commented 5 months ago

Fixed in v1.1.0 https://github.com/palworldlol/palworld-exporter/releases/tag/v1.1.0