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.2M—2.5%6[2 issues](https://github.com/PromPHP/prometheus_push_gateway_php/issues)[2 PRs](https://github.com/PromPHP/prometheus_push_gateway_php/pulls)6Apache-2.0PHPPHP ^7.2|^8.0CI failing

Since Sep 21Pushed 1y 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 1mo ago

READMEChangelog (4)Dependencies (8)Versions (6)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

44

—

FairBetter than 92% of packages

Maintenance25

Infrequent updates — may be unmaintained

Popularity52

Moderate usage in the ecosystem

Community21

Small or concentrated contributor base

Maturity63

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

1498d 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

[spatie/laravel-health

Monitor the health of a Laravel application

86910.0M83](/packages/spatie-laravel-health)[marvinlabs/laravel-discord-logger

Logging to a discord channel in Laravel

2081.1M2](/packages/marvinlabs-laravel-discord-logger)[larabug/larabug

Laravel 6.x/7.x/8.x/9.x/10.x/11.x/12.x/13.x bug notifier

299549.3k1](/packages/larabug-larabug)[honeybadger-io/honeybadger-php

Honeybadger PHP library

381.5M4](/packages/honeybadger-io-honeybadger-php)[arquivei/laravel-prometheus-exporter

A Prometheus exporter for Laravel and Lumen

20807.4k1](/packages/arquivei-laravel-prometheus-exporter)

PHPackages © 2026

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