Php fpm exporter prometheus

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

License

sansible/prometheus_phpfpm_exporter

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

This roles installs Prometheus PHP FPM Exporter.

Prometheus PHP FPM Exporter makes available PHP FPM metrics for collection by Prometheus server.

For more information about Prometheus PHP FPM Exporter please visit https://github.com/bakins/php-fpm-exporter.

For more information about Prometheus Server please visit https://prometheus.io.

This role is designed to work with merge «hash_behaviour». Make sure your ansible.cfg contains these settings

[defaults] hash_behaviour = merge

Installation and Dependencies

This role will install sansible.users_and_groups for managing prometheus_phpfpm_exporter user.

To install run ansible-galaxy install sansible.prometheus_phpfpm_exporter or add this to your roles.yml .

- name: sansible.prometheus_phpfpm_exporter version: v1.0

and run ansible-galaxy install -p ./roles -r roles.yml

Читайте также:  Invalid flag error in java

This role uses tags: build and configure

Simply include role in your playbook accepting the defaults:

exporter address 0.0.0.0:9338

- name: Install and configure prometheus_phpfpm_exporter hosts: ">" roles: - role: sansible.prometheus_phpfpm_exporter

Include the role in your playbook overriding the exporter address and the PHP endpoint:

- name: Install and configure the prometheus_phpfpm_exporter hosts: "> roles: - role: sansible.prometheus_phpfpm_exporter prometheus_phpfpm_exporter: opts: --addr 0.0.0.0:1234 --endpoint http://127.0.0.1:8080/status
- name: Install, configure and start on boot prometheus_phpfpm_exporter hosts: "> roles: - role: sansible.prometheus_phpfpm_exporter prometheus_phpfpm_exporter: start_on_boot: yes opts: --addr 0.0.0.0:1234 --endpoint http://127.0.0.1:8080/status

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

php-fpm_exporter is a Prometheus exporter for PHP-FPM metrics.

brunowego/prometheus-php-fpm-exporter

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

php-fpm_exporter is a Prometheus exporter for PHP-FPM metrics.

helm install stable/prometheus-php-fpm-exporter

This chart bootstraps a php-fpm_exporter deployment on a Kubernetes cluster using the Helm package manager.

To install the chart with the release name my-release :

helm install --name my-release stable/prometheus-php-fpm-exporter

The command deploys prometheus-php-fpm-exporter on the Kubernetes cluster in the default configuration.

To uninstall/delete the my-release deployment:

The command removes all the Kubernetes components associated with the chart and deletes the release.

The following table lists the configurable parameters and their default values.

Parameter Description Default
replicaCount Desired number of prometheus-php-fpm-exporter replicas 1
image.repository prometheus-php-fpm-exporter image repository hipages/php-fpm_exporter
image.tag prometheus-php-fpm-exporter image tag 1.0
image.pullPolicy prometheus-php-fpm-exporter image pull policy IfNotPresent
service.type Desired service type ClusterIP
service.internalport Service listening port 9419
service.externalPort Public service port 9419
resources CPI/Memory resource requests/limits <>
phpFpm.webListenAddress Address on which to expose metrics and web interface :9253
phpFpm.webTelemetryPath Path under which to expose metrics /metrics
phpFpm.scrapeUri FastCGI address, e.g. unix:///tmp/php.sock;/status or tcp://127.0.0.1:9000/status tcp://myphp-fpm:9000/status
phpFpm.fixProcessCount Enable to calculate process numbers via php-fpm_exporter since PHP-FPM sporadically reports wrong active/idle/total process numbers false
phpFpm.logLevel Only log messages with the given severity or above. Valid levels: [debug, info, warn, error, fatal] (default «error») info
podAnnotations Pod annotations for easier discovery <>
serviceMonitor.enabled Enable Prometheus Operator ServiceMonitor monitoring false
serviceMonitor.additionalLabels Additional labels that can be used so ServiceMonitor will be discovered by Prometheus <>
serviceMonitor.interval Interval at which Prometheus Operator scrapes exporter 15s
serviceMonitor.namespace Define namespace where to deploy the ServiceMonitor resource []
Читайте также:  Передать все переменные php

For more information please refer to the php-fpm_exporter documentation.

Specify each parameter using the —set key=value[,key=value] argument to helm install . For example,

helm install --name my-release \ --set "phpFpm.scrapeUri=tcp://myphp-fpm:9000/status" \ stable/prometheus-php-fpm-exporter

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,

helm install --name my-release -f values.yaml stable/prometheus-php-fpm-exporter

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Prometheus exporter for php-fpm status information.

License

craigmj/phpfpm_exporter

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

Prometheus exporter for php-fpm status information. If you are running php-fpm with nginx webserver (or any other webserver), and have configured your php-fpm to serve status information, phpfpm_exporter will export the status information into a format that prometheus can read.

git clone https://github.com/craigmj/phpfpm_exporter 
cd phpfpm_exporter ./build.sh 

Now you’ve got the binary in bin/phpfpm_exporter

Читайте также:  Javascript асинхронные функции синхронно

Because this is a Go application, you only need the binary. So you can copy that to your server, which needs to be configured to report php-fpm status information.

This service is provided as a docker image that can be run with the command

docker run --rm softonic/phpfpm_exporter \ -status.url=http://nginx/status?json \ -listen.address 0.0.0.0:9099 

Just change the example parameters to fit your use case.

The exporter accepts 3 command line options

  • status.url The URL from which to scrape the php-fpm status. Defaults to http://localhost/status?json . It is essential that you have the ?json parameter in the URL, so that phpfpm_exporter can parse the returned values.
  • listen.address The address on which to serve the php-fpm metrics to prometheus. Defaults to http://127.0.0.1:9099/
  • scrape.interval The interval between scraps of the php-fpm status. Defaults to 5m . You can set any string value that can be parsed by Go’s Duration class: https://golang.org/pkg/time/#ParseDuration
  • config.path A path to a YAML configuration file that contains a list of vhosts to monitor. See: configs/example.vhosts.yaml for the proper format.

Assuming you’re running prometheus on the same server as your phpfpm_exporter, you need to add to your scrape_configs in prometheus.yml :

scrape_configs: - job_name: 'fpm' static_configs: - targets: ['127.0.0.1:9099'] 

Obviously the targets value should match the listen.address command line option you’ve set for phpfpm_exporter.

The phpfpm_exporter exports the following metrics to prometheus:

The number of connections accepted by the pool .

The size of the listen queue for each pool.

  • pool the fpm pool
  • metric one of
    • current : the listen queue value from php-fpm: the number of requests in the queue of pending connections
    • max : the max listen queue value from php-fpm: the maximum number of requests in the queue of pending connections since FPM started
    • len : the listen queue len value from php-fpm: the size of the socket queue of pending connections

    The number of processes in each pool.

    • pool : the fpm pool
    • state : the state of the proceses. One of
      • idle : the number of idle processes

      * active : the number of active processes

      * max_active : the maximum number of active processes in this pool since fpm started

      Note that we don’t reflect the total processes as reported by php-fpm, since that is simply idle + active and can thus be calculated.

      The maximum number of child processes reached in the pool.

      About

      Prometheus exporter for php-fpm status information.

      Источник

Оцените статью