hipages / php-fpm_exporter

A prometheus exporter for PHP-FPM.
Apache License 2.0
592 stars 119 forks source link

Rename and fix metric names and types #182

Open roidelapluie opened 2 years ago

roidelapluie commented 2 years ago

Here are a few changes that should bring this exporter closer to Prometheus best practices.

itcsoft54 commented 2 years ago

Rename metric create breaking change with existing use of phpfpm_exporter. Need to deprecate old metric instead of remove (or rename) it

roidelapluie commented 2 years ago

Certainly. The main problem is process_request_duration which now uses the normalized second (https://prometheus.io/docs/practices/naming/#base-units).

For the rest, we could offer recording rules or relabel configs to ease the transition and release a 3.0 maybe.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

gerardnico commented 15 hours ago

All max metrics such as phpfpm_max_children_reached should be a gauge, no? I don't understand why they are set as counter. They are not going up for every request and they can go down.

gerardnico commented 15 hours ago

Note that on remote_write, the type of metrics metadata seems to be not send, you can rename them:

- url: https://metric-api.newrelic.com/prometheus/v1/write?X-License-Key=...
  write_relabel_configs:
  - source_labels: [__name__]
    regex: ^my_counter$
    target_label: newrelic_metric_type
    replacement: "counter"
    action: replace

Ref