1. Go to this page and download the library: Download kafkiansky/push-prometheus library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
kafkiansky / push-prometheus example snippets
use Amp\Http\Client\Request;
use Kafkiansky\PushPrometheus\Context;
use Kafkiansky\PushPrometheus\Metrics\Counter;
use Kafkiansky\PushPrometheus\Metrics\Name;
use Kafkiansky\PushPrometheus\Metrics\Number;
use Kafkiansky\PushPrometheus\Pusher;
w Name('test', 'namespace', 'subsystem'), new Number(2)));
});
use Amp\Http\Client\Request;
use Kafkiansky\PushPrometheus\Context;
use Kafkiansky\PushPrometheus\Metrics\Gauge;
use Kafkiansky\PushPrometheus\Metrics\Name;
use Kafkiansky\PushPrometheus\Metrics\Number;
use Kafkiansky\PushPrometheus\Pusher;
use Amp\Http\Client\HttpClient;
use Amp\Http\Client\HttpClientBuilder;
new Gauge(new Name('test', 'namespace', 'subsystem'), new Number(2)));
});
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.