PHPackages                             bpmconcept/ping-this - 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. bpmconcept/ping-this

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

bpmconcept/ping-this
====================

PingThis is a lightweight PHP 8.3+ toolkit that lets you compose headless monitoring checks and route actionable alerts with just a bit of code.

v3.2(6mo ago)057[1 PRs](https://github.com/bpmconcept/ping-this/pulls)MITPHPPHP ^8.3CI passing

Since Jun 17Pushed 3w ago1 watchersCompare

[ Source](https://github.com/bpmconcept/ping-this)[ Packagist](https://packagist.org/packages/bpmconcept/ping-this)[ RSS](/packages/bpmconcept-ping-this/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (4)Versions (8)Used By (0)

PingThis
========

[](#pingthis)

[![CI](https://github.com/bpmconcept/ping-this/actions/workflows/php.yml/badge.svg)](https://github.com/bpmconcept/ping-this/actions/workflows/php.yml)

PingThis is a lightweight PHP 8.3+ toolkit that lets you compose headless monitoring checks and route actionable alerts with just a bit of code.

Example
-------

[](#example)

```
use PingThis\Daemon;
use PingThis\Alarm\PhpEmailAlarm;
use PingThis\Ping\NetworkPing;
use PingThis\Ping\WebScraperPing;
use PingThis\Ping\DatabasePing;
use PingThis\Ping\TlsCertificateExpirationPing;

$daemon = new Daemon();

// Check if the host correctly answers to ping every 10 seconds
$daemon->registerPing(new NetworkPing(10, 'domain.com'));

// Check if a webserver responds correctly to a HTTP request every 30 seconds
$daemon->registerPing(new WebScraperPing(30, 'GET', 'https://domain.com', 'response.getStatusCode() == 200'));
$daemon->registerPing(new WebScraperPing(30, 'GET', 'https://domain.com', 'content.filter(".css").count()'));

// Or equivalently using any PHP callable
$daemon->registerPing(new WebScraperPing(30, 'GET', 'https://domain.com', function ($response, $content) {
    return $response->getStatus() < 400 && $content->filter('.element')->text() === "Hello";
}));

// Check every day that a certificate won't expire during the next week
$daemon->registerPing(new TlsCertificateExpirationPing(86400, 'domain.com', 443, TlsCertificateExpirationPing::IMPLICIT_TLS, '+7 days'));

// Check if a remote SQL server is still up every 10 seconds
$daemon->registerPing(new DatabasePing(10, 'mysql:host=my.sql.server', 'login', 'password'));

// Otherwise send an email to alert an admin
$daemon->registerAlarm(new PhpEmailAlarm('your@email.com'));

$daemon->run();
```

Quick description
-----------------

[](#quick-description)

PingThis aims to provide a simple and effective way for monitoring whatever you want. Configure a daemon with one Alarm and one or multiple Pings. The Daemon periodically verifies each Ping and, in case of failing, triggers the Alarm. Any class could act like an Alarm or a Ping, provided that it implements respectively the `AlarmInterface`or the `PingInterface`.

The different built-in Pings rely on Symfony's [Expression Language Component](https://symfony.com/doc/current/components/expression_language.html)to allow a quick and easy construction of triggering logic but can be equivalently replaced by a PHP callable.

Built-in Pings
--------------

[](#built-in-pings)

### Network

[](#network)

NameDescriptionNetworkPingSends a standard ICMP ping and checks the ICMP response (needs `CAP_NET_RAW`)StreamSocketCommandPingSends a custom payload through a TCP/UDP/Unix socket and checks the responseTlsCertificateExpirationPingInitiates a TLS handshake and checks the expiration date of a certificateSnmpGetValuePingGets SNMP object value from a remote SNMP agentSnmpWalkValuePingGets SNMP object values from a remote SNMP agentSnmpDiskUsagePingWalks SNMP storage metrics and checks disk usage against a threshold### Web

[](#web)

NameDescriptionHttpPingSends a HTTP request and checks only the returned codeWebScraperPingSends a HTTP request and get back a [Response](https://symfony.com/doc/current/components/browser_kit.html), along with a [Crawler](https://symfony.com/doc/current/components/dom_crawler.html) instanceWhoisDomainExpirationPingQueries WHOIS to ensure a domain expiration date stays beyond a threshold### Mails

[](#mails)

NameDescriptionImapServerPingConnects to a IMAP server and checks the welcome responseSmtpServerPingConnects to a SMTP server and checks the welcome responseMilterPingSimulates an SMTP conversation with a Milter server and validates its actions### Services

[](#services)

NameDescriptionDatabasePingEstablishes a connection to a database using PDODatabaseQueryPingExecutes a SQL query on a database using PDOLdapSearchPingExecutes a query on a LDAP server and checks the response### Built-in Alarms

[](#built-in-alarms)

NameDescriptionPhpEmailAlarmSend an email, using the PHP's mail() functionStreamAlarmLogs the alarms events to a given open stream (stdout or file for instance)LogAlarmSpecialized StreamAlarm for files that adds a lock on the log fileParallelAlarmDispatch the alert on multiple other Alarm instancesInstallation
------------

[](#installation)

The recommended way to install PingThis is through Composer :

```
composer require bpmconcept/ping-this
```

PingThis does not intend to provide a fully functional daemon out of the box. You are still responsible for writing a configured daemon like in the previous example.

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance83

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity83

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 100% 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 ~856 days

Total

5

Last Release

192d ago

Major Versions

v1.0 → v2.02020-05-03

v2.0 → v3.02025-11-03

PHP version history (3 changes)v1.0PHP &gt;=5.5.0

v2.0PHP &gt;=7.2.0

v3.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/9c5f4d3049d5d198f144b3e405dda0173d271a1562965de4866cd805f0c43459?d=identicon)[marcbp](/maintainers/marcbp)

---

Top Contributors

[![marcbp](https://avatars.githubusercontent.com/u/5139232?v=4)](https://github.com/marcbp "marcbp (132 commits)")

---

Tags

headlessmonitoringphp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bpmconcept-ping-this/health.svg)

```
[![Health](https://phpackages.com/badges/bpmconcept-ping-this/health.svg)](https://phpackages.com/packages/bpmconcept-ping-this)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[datadog/php-datadogstatsd

An extremely simple PHP datadogstatsd client

19124.6M15](/packages/datadog-php-datadogstatsd)

PHPackages © 2026

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