PHPackages                             oxil/php-travis-influxdb - 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. oxil/php-travis-influxdb

ActiveLibrary

oxil/php-travis-influxdb
========================

Read from Travis CI and write build status and metrics into an influxDB database for e.g. use in Grafana

0.7(6y ago)023PHP

Since Oct 8Pushed 6y ago2 watchersCompare

[ Source](https://github.com/OxfordInfoLabs/php-travis-influxdb)[ Packagist](https://packagist.org/packages/oxil/php-travis-influxdb)[ RSS](/packages/oxil-php-travis-influxdb/feed)WikiDiscussions master Synced today

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

php-travis-influxdb
===================

[](#php-travis-influxdb)

PHP library which reads build data from Travis CI and writes it into an influxdb time series database for e.g. use in Grafana

\###Overview

A simple PHP library / CLI application designed to read latest build status information from multiple Travis CI repos and insert the results into an Influx DB timeseries database ready for use in monitoring applications etc e.g. Grafana.

\###Installation

Installation can be done via composer either as a library

`composer require oxil/php-travis-influxdb`

or as a ready to go CLI application

`composer create-project oxil/php-travis-influxdb`

\###Getting started

The entry point is via the Processor class which is instantiated as follows:

`$processor = new Oxil\PHPTravisInflux\Processor(CONFIG_PATH);`

Where CONFIG\_PATH is an absolute path to a configuration file which is in JSON format as follows:

```
{
  "useBuildTimestamps": true,
  "influxdb": {
    "host": "localhost",
    "port": 8086,
    "database": "example",
    "username": "username",
    "password": "password"
  },
  "travis": {
    "travis_ci_org": {
      "endpoint": "https://api.travis-ci.org",
      "repositories": [
        "OxfordInfoLabs/kinikit-core",
        "OxfordInfoLabs/kinikit-mvc",
        "OxfordInfoLabs/kinikit-persistence"
      ]
    }
  }
}

```

The configuration options are as follows:

- **useBuildTimestamps** - if set to *true*, only new builds will be added to the influx database. If set to *false* an entry will be written for each repository on each run.
- **influxdb** - this subset of properties configures the connection to influxdb. *host*, *port* and *database* are required with authentication parameters supplied only if your influxdb instance requires them.
    *NB: If the database does not exist it will be created automatically on the first run.*
- **travis** - this contains the sets of repositories in travis to read the build stati from.
    Entries within the *travis* top level are indexed by an identifier of your choice and typically relate to different endpoints (e.g. when using travis-ci.org and travis-ci.com). The identifier chosen will be used as the measurement name in influxdb for all entries inserted for each repo. Within each entry, the travis ci api endpoint is supplied using the *endpoint* member and an array of repository names to read build statuses from is supplied using the *repositories* member.

To trigger a run you can simply call the process method on the processor instantiated above.

`$processor->process();`

\###Reading data back from InfluxDB

Data read from Travis CI will be inserted into a measurement within the configured database (see above) as identified by the identifier specified within the **travis** element of the configuration file.

Each measurement entry will be written with a value of 0 or **1** according to whether the build failed or succeeded respectively. The following tags will also be added to the entry for informational purposes for reporting.

- **repo** - the full string of the repository e.g. *OxfordInfoLabs/kinikit-core*
- **short\_name** - the short name of the repository (last bit after slashes) e.g. *kinikit-core*
- **status** - either *Succeeded* or *Failed* according to the status of the Travis build.
- **last\_run** - the last run time for the build as obtained from Travis.

### Ready to go CLI Application

[](#ready-to-go-cli-application)

There is a ready to go working example CLI script contained in the example directory.

To install this, please use this form of composer installation:

`composer create-project oxil/php-travis-influxdb`

And then tweak the example/config.json to your needs. You can then run the app by calling

`php example/travis_influx.php`

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 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 ~2 days

Total

7

Last Release

2391d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2d931504e416b46716c30f7a0e97faa3093ff9bdb605f2f652a082dd0d9c89c3?d=identicon)[oxilsupport](/maintainers/oxilsupport)

---

Top Contributors

[![mrobertshaw](https://avatars.githubusercontent.com/u/998437?v=4)](https://github.com/mrobertshaw "mrobertshaw (25 commits)")

---

Tags

phptravis ciInflux DB

### Embed Badge

![Health badge](/badges/oxil-php-travis-influxdb/health.svg)

```
[![Health](https://phpackages.com/badges/oxil-php-travis-influxdb/health.svg)](https://phpackages.com/packages/oxil-php-travis-influxdb)
```

###  Alternatives

[pestphp/pest-plugin-stressless

Stressless plugin for Pest

67792.6k16](/packages/pestphp-pest-plugin-stressless)

PHPackages © 2026

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