PHPackages                             promphp/prometheus\_push\_gateway\_php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. promphp/prometheus\_push\_gateway\_php

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

promphp/prometheus\_push\_gateway\_php
======================================

Prometheus Push Gateway client for PHP applications.

v1.1.1(4y ago)312.4M↓32.4%6[2 issues](https://github.com/PromPHP/prometheus_push_gateway_php/issues)[3 PRs](https://github.com/PromPHP/prometheus_push_gateway_php/pulls)6Apache-2.0PHPPHP ^7.2|^8.0CI passing

Since Sep 21Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/PromPHP/prometheus_push_gateway_php)[ Packagist](https://packagist.org/packages/promphp/prometheus_push_gateway_php)[ RSS](/packages/promphp-prometheus-push-gateway-php/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (4)Dependencies (8)Versions (7)Used By (6)

A prometheus push gateway client library written in PHP
=======================================================

[](#a-prometheus-push-gateway-client-library-written-in-php)

[![Tests](https://github.com/promphp/prometheus_push_gateway_php/workflows/Tests/badge.svg)](https://github.com/promphp/prometheus_push_gateway_php/workflows/Tests/badge.svg)

This package provides an easy PHP API for Prometheus Push Gateway. It was part of [promphp/prometheus\_client\_php](https://github.com/promphp/prometheus_client_php) and was moved into a seperate package as of Prometheus Client PHP Version 2.0.0.

How does it work?
-----------------

[](#how-does-it-work)

The PushGateway allows Prometheus to get Metrics from Systems that are not scrableable (Your Prometheus cannot access that systems). With this library you can easily send your metrics to the PushGateway.

Installation
------------

[](#installation)

Add as [Composer](https://getcomposer.org/) dependency:

```
composer require promphp/prometheus_push_gateway_php
```

Usage
-----

[](#usage)

Let's assume you have that simple counter and want to send it to your PushGateway.

```
\Prometheus\CollectorRegistry::getDefault()
    ->getOrRegisterCounter('', 'some_quick_counter', 'just a quick measurement')
    ->inc();

// Now send it to the PushGateway:
$pushGateway = new \PrometheusPushGateway\PushGateway('http://192.168.59.100:9091');
$pushGateway->push(\Prometheus\CollectorRegistry::getDefault(), 'my_job', ['instance' => 'foo']);
```

Also look at the [examples](examples).

Development
-----------

[](#development)

### Dependencies

[](#dependencies)

- PHP ^7.2 | ^8.0
- [Composer](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx)

Black box testing
-----------------

[](#black-box-testing)

Just start the PushGateway by using docker-compose

```
docker-compose up

```

Use composer to grab all dependencies

```
docker run --rm --interactive --tty --volume $PWD:/app composer install

```

Execute the tests:

```
docker-compose run phpunit vendor/bin/phpunit tests/Test/

```

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance57

Moderate activity, may be stable

Popularity52

Moderate usage in the ecosystem

Community21

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 88.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~189 days

Total

4

Last Release

1543d ago

PHP version history (2 changes)v1.0.0PHP ^7.2

v1.1.0PHP ^7.2|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/bcc754aa9c84b502f0fade69790c525a42e8e898447157acce899469038bb3b1?d=identicon)[LukasKaemmerling](/maintainers/LukasKaemmerling)

![](https://www.gravatar.com/avatar/23a593969f579439fd872c91e475453dc72d08aaa98e14d759ac0b8ab707e3bd?d=identicon)[rdohms](/maintainers/rdohms)

---

Top Contributors

[![LKaemmerling](https://avatars.githubusercontent.com/u/4281581?v=4)](https://github.com/LKaemmerling "LKaemmerling (16 commits)")[![claude-vessaz-hs](https://avatars.githubusercontent.com/u/63114980?v=4)](https://github.com/claude-vessaz-hs "claude-vessaz-hs (1 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")

---

Tags

hacktoberfestphpprometheusprometheus-phpprometheus-pushgatewaypushgateway

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/promphp-prometheus-push-gateway-php/health.svg)

```
[![Health](https://phpackages.com/badges/promphp-prometheus-push-gateway-php/health.svg)](https://phpackages.com/packages/promphp-prometheus-push-gateway-php)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M164](/packages/spatie-laravel-health)[spatie/flare-client-php

Send PHP errors to Flare

177161.5M22](/packages/spatie-flare-client-php)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
