rabbitmq / rabbitmq-prometheus

A minimalistic Prometheus exporter of core RabbitMQ metrics
Other
145 stars 109 forks source link

Exposed metrics filtering #56

Closed sepich closed 4 years ago

sepich commented 4 years ago

Hello, there are too many high cardinality metrics exposed:

docker run -v enabled_plugins:/etc/rabbitmq/enabled_plugins -d --rm -p 15692:15692 rabbitmq:3.8.3-management
curl -s localhost:15692/metrics | egrep -v '^#' | sed -r 's/([a-z_]+).*/\1/' | sort | uniq -c | sort -n
...
      1 telemetry_scrape_encoded_size_bytes_sum
      1 telemetry_scrape_size_bytes_count
      1 telemetry_scrape_size_bytes_sum
      2 erlang_vm_memory_atom_bytes_total
      2 erlang_vm_memory_bytes_total
      2 erlang_vm_memory_processes_bytes_total
      5 erlang_vm_memory_system_bytes_total
    156 erlang_vm_msacc_alloc_seconds_total
    156 erlang_vm_msacc_aux_seconds_total
    156 erlang_vm_msacc_bif_seconds_total
    156 erlang_vm_msacc_busy_wait_seconds_total
    156 erlang_vm_msacc_check_io_seconds_total
    156 erlang_vm_msacc_emulator_seconds_total
    156 erlang_vm_msacc_ets_seconds_total
    156 erlang_vm_msacc_gc_full_seconds_total
    156 erlang_vm_msacc_gc_seconds_total
    156 erlang_vm_msacc_nif_seconds_total
    156 erlang_vm_msacc_other_seconds_total
    156 erlang_vm_msacc_port_seconds_total
    156 erlang_vm_msacc_send_seconds_total
    156 erlang_vm_msacc_sleep_seconds_total
    156 erlang_vm_msacc_timers_seconds_total
    912 erlang_vm_allocators

Metrics erlang_vm_msacc* are not even in the list of https://github.com/rabbitmq/rabbitmq-prometheus/blob/master/metrics.md Metric erlang_vm_allocators should be aggregated by instance_no at least. Could you please implement ability to filter out not needed metrics?

Example: https://github.com/kbudde/rabbitmq_exporter#settings see EXCLUDE_METRICS and also nice SKIP_* regexes

michaelklishin commented 4 years ago

There are several issues in one here, our team strongly prefers focussed, specific problem definitions. It's not clear whether metric aggregation is enabled in this environment.

Instead of telling others to do something in a complaining tone, you are welcome to contribute the improvements you need. This is open source software after all.