2017 © Pedro Peláez
 

library prompush

Simple Prometheus PushGateway client

image

denniswinter/prompush

Simple Prometheus PushGateway client

  • Wednesday, October 19, 2016
  • by denniswinter
  • Repository
  • 1 Watchers
  • 0 Stars
  • 25 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

PromPush

Build Status, (*1)

Simple HttpClient wrapper of Prometheus PushGateway., (*2)

Installation

Using Composer:, (*3)

composer require denniswinter/prompush

API

Instantiate client using:, (*4)

<?php
$client = new PromPush\Client(new GuzzleHttp\Client([
    'base_url' => 'http://prometheus-pushgateway.example.com:9091']
));

Push metrics to Gateway:, (*5)

<?php
$data = [
    '# TYPE test_test_test summary',
    'test_test_test_sum{handler="push"} ' . $sum . "\n",
    'test_test_test_count{handler="push"} ' . $i . "\n"
];

$job = 'test_job';

$group = array('test_group_1', 'test_group_2');

$client->set($data, $job, $group);

Replace metrics on Gateway:, (*6)

<?php
$data = [
    '# TYPE test_test_test summary',
    'test_test_test_sum{handler="push"} ' . $sum . "\n",
    'test_test_test_count{handler="push"} ' . $i . "\n"
];

$job = 'test_job';

$group = array('test_group_1', 'test_group_2');

$client->replace($data, $job, $group);

Delete metrics on Gateway:, (*7)

<?php

$job = 'test_job';

$group = array('test_group_1', 'test_group_2');

$client->replace($job, $group);

The Versions

19/10 2016

dev-master

9999999-dev

Simple Prometheus PushGateway client

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dennis Winter

logging metrics push prometheus

19/10 2016

0.1.1

0.1.1.0

Simple Prometheus PushGateway client

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dennis Winter

logging metrics push prometheus

19/10 2016

0.1

0.1.0.0

Simple Prometheus PushGateway client

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dennis Winter

logging metrics push prometheus