bakins / php-fpm-exporter

Prometheus exporter for php-fpm status.
MIT License
203 stars 46 forks source link

Collecting metrics from multiple containers #12

Open roshan8 opened 6 years ago

roshan8 commented 6 years ago

Hi,

How do we collect metrics from single box when multiple containers are running on it ?

For example: If 9 containers are running in 2 machines, Those 9 container will be using a random service ports selected by orchestration tool.

In that scenario, How do we collect php-fpm stats from those 2 boxes (machine-wise/aggregate reports).

Thanks for any help !!

andrewhowdencom commented 6 years ago

(Background: I am not a project maintainer, but work a little bit with containers)

I would conjecture it depends on the orchestration tool, but in the case of (for example) Kubernetes, you colocate them in the same network namespace as the PHP-FPM process (termed a "pod"), and query them over localhost. In essence, you run 9 exporters also.

What orchestration tool are you using?

roshan8 commented 6 years ago

we are using Apache mesos

bakins commented 6 years ago

@roshu10 I run an instance of php-fpm-exporter as a "side car" of each PHP container using Kubernetes.