2017 © Pedro Peláez
 

library laravel-prometheus-exporter

A prometheus exporter for Laravel & Lumen

image

traum-ferienwohnungen/laravel-prometheus-exporter

A prometheus exporter for Laravel & Lumen

  • Friday, June 15, 2018
  • by traum
  • Repository
  • 4 Watchers
  • 0 Stars
  • 968 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 0 Open issues
  • 15 Versions
  • 242 % Grown

The README.md

laravel-prometheus-exporter

Build Status, (*1)

A prometheus exporter for the Laravel and the Lumen web framework., (*2)

It tracks latency and request counts by request method, route and response code., (*3)

Project State

This is unreleased software. I commit backwards incompatible changes without notice., (*4)

Installation

composer require traum-ferienwohnungen/laravel-prometheus-exporter, (*5)

Adapters

Then choose from two storage adapters: APCu is the default option. Redis can also be used., (*6)

APCu

Ensure apcu-bc is installed and enabled., (*7)

Redis

Ensure php redis is installed and enabled., (*8)

By default it looks for a redis server at localhost:6379. The server can be configured in config/prometheus_exporter.php., (*9)

Laravel

Enable the Middleware

In app/Http/Kernel.php, (*10)

protected $middleware = [
    ...
    \traumferienwohnungen\PrometheusExporter\Middleware\LaravelResponseTimeMiddleware::class,
];

Add an endpoint for the metrics

Route::get('metrics', \traumferienwohnungen\PrometheusExporter\LaravelController::class . '@metrics');

Lumen

Register the ServiceProvider

In bootstrap/app.php, (*11)

$app->register(traumferienwohnungen\PrometheusExporter\LumenServiceProvider::class);

Add an endpoint for the metrics

In bootstrap/app.php, (*12)

$app->router->get('metrics', ['as' => 'metrics', 'uses'=> 'traumferienwohnungen\PrometheusExporter\LumenController@metrics']);

Configuration

The configuration can be found in config/prometheus_exporter.php., (*13)

name description
adapter Storage adapter to use: 'apc' or 'redis' default: 'apc'
namespace name (prefix) to use in prometheus metrics. default: 'default'
namespace_http_server name (prefix) to use for http latency in prometheus metrics. default: 'http_server'
redis array of redis parameters. see prometheus_exporter.php for details

The Versions

15/06 2018

dev-master

9999999-dev

A prometheus exporter for Laravel & Lumen

  Sources   Download

MIT

The Requires

 

The Development Requires

by Till Backhaus

laravel lumen prometheus

15/06 2018

0.1.2

0.1.2.0

A prometheus exporter for Laravel & Lumen

  Sources   Download

MIT

The Requires

 

The Development Requires

by Till Backhaus

laravel lumen prometheus

24/05 2018

0.1.1

0.1.1.0

A prometheus exporter for Laravel & Lumen

  Sources   Download

MIT

The Requires

 

The Development Requires

by Till Backhaus

laravel lumen prometheus

24/05 2018

0.1.0

0.1.0.0

A prometheus exporter for Laravel & Lumen

  Sources   Download

MIT

The Requires

 

The Development Requires

by Till Backhaus

laravel lumen prometheus

24/05 2018

dev-fix-lumen-compat

dev-fix-lumen-compat

A prometheus exporter for Laravel & Lumen

  Sources   Download

MIT

The Requires

 

The Development Requires

by Till Backhaus

laravel lumen prometheus

22/02 2018

0.0.9

0.0.9.0

A prometheus exporter for the Laravel web framework

  Sources   Download

MIT

The Requires

 

The Development Requires

by Till Backhaus

laravel prometheus

30/01 2018

dev-build-environments

dev-build-environments

A prometheus exporter for the Laravel web framework

  Sources   Download

MIT

The Requires

 

The Development Requires

by Till Backhaus

laravel prometheus

10/01 2018

0.0.8

0.0.8.0

A prometheus exporter for the Laravel web framework

  Sources   Download

MIT

The Requires

 

The Development Requires

by Till Backhaus

laravel prometheus

24/11 2016

0.0.7

0.0.7.0

A prometheus exporter for the Laravel web framework

  Sources   Download

MIT

The Requires

 

The Development Requires

by Till Backhaus

laravel prometheus

24/11 2016

0.0.6

0.0.6.0

A prometheus exporter for the Laravel web framework

  Sources   Download

MIT

The Requires

 

The Development Requires

by Till Backhaus

laravel prometheus

23/11 2016

0.0.5

0.0.5.0

A prometheus exporter for the Laravel web framework

  Sources   Download

MIT

The Requires

 

The Development Requires

by Till Backhaus

laravel prometheus

22/11 2016

0.0.4

0.0.4.0

A prometheus exporter for the Laravel web framework

  Sources   Download

MIT

The Requires

 

The Development Requires

by Till Backhaus

laravel prometheus

22/11 2016

0.0.3

0.0.3.0

A prometheus exporter for the Laravel web framework

  Sources   Download

MIT

The Requires

 

The Development Requires

by Till Backhaus

laravel prometheus

20/11 2016

0.0.2

0.0.2.0

A prometheus exporter for the Laravel web framework

  Sources   Download

MIT

The Requires

 

The Development Requires

by Till Backhaus

laravel prometheus

19/11 2016

0.0.1

0.0.1.0

A prometheus exporter for the Laravel web framework

  Sources   Download

MIT

The Requires

 

by Till Backhaus

laravel prometheus