hipages/php-fpm_exporter

Maybe it can support prometheus pushgateway

Opened this issue · 9 comments

Maybe it can support prometheus pushgateway

@lazychanger Can you provide more details on this?

Yes. look hear https://github.com/prometheus/pushgateway

Prometheus does not work well in a cluster environment, because the IP address of the host will change at any time. Prometheus Pushgateway can receive the client's actively reported metrics and then wait for prometheus to collect

I'am sorry for my english is not good, some from Google Translate.

Prometheus PushGateway document

The Pushgateway is an intermediary service which allows you to push metrics from jobs which cannot be scraped. 

I'm aware of PushGateway. We're using PushGateway for short-lived jobs, such as CronJobs as the scrape interval is too short for Prometheus to gather metrics.

Prometheus does not work well in a cluster environment, because the IP address of the host will change at any time.

We have been operating Prometheus in a Kubernetes cluster with php-fpm_exporter for over 4 years. Prometheus is designed to deal with conditions within a cluster environment, e.g. aggregates such as rate.

If Prometheus is not able to scrape php-fpm_exporter I would assume there is some issue with your config, e.g. scrape interval too high.

I'm still not sure I understand the reason for the feature request.

I'm sorry I misrepresented what I meant.

Prometheus needs to actively configure the client metrics address, but if my pod is scaled up, the new node cannot be collected because it is not in the Prometheus targets.

I think I understand what you mean. The new scaling node is temporary, it will not exist for a long time so that it will not form effective metrics

thank you for your reply.

You want to look at Prometheus service discovery, or discovery of scrape targets. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#kubernetes_sd_config

I haven't looked at this for quite a while. We are using Prometheus-operator which comes with CRDs such as ServiceMonitor, abstracting the configuration away.

Hope this helps.

Thank you, I will read this document carefully

stale commented

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.