Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anowarcst/prometheuslaravelhealthexporter
A prometheus exporter for Laravel API Health
https://github.com/anowarcst/prometheuslaravelhealthexporter
api laravel laravel7 php74 prometheus prometheus-exporter
Last synced: about 12 hours ago
JSON representation
A prometheus exporter for Laravel API Health
- Host: GitHub
- URL: https://github.com/anowarcst/prometheuslaravelhealthexporter
- Owner: AnowarCST
- Created: 2020-04-03T11:43:10.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-04-10T10:08:45.000Z (over 4 years ago)
- Last Synced: 2024-09-23T16:03:37.463Z (1 day ago)
- Topics: api, laravel, laravel7, php74, prometheus, prometheus-exporter
- Language: PHP
- Size: 13.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PrometheusLaravelHealthExporter
A very simple Prometheus exporter for Laravel 6.* and 7.* supported. Basically a Middleware to export API Health, Status and Performance metrics of Laravel API.
## Supported version
- Laravel 5.5-5.9, 6.* and 7.*
- PHP 5.6 - 7.4## Pre-installed
- Redis
- Laravel## Install via Composer
composer require anowarcst/prometheus-laravel-health-exporter#### Vendor publish
To publish config filephp artisan vendor:publish --provider="AnowarCST\PrometheusLaravelHealthExporter\LaravelRequestMonitoringServiceProvider"
if your Redis host is not the default one, please update Redis host, port in your *.env* or *prometheus_exporter.php*
#### Add this middleware in `App\Http\Kernel.php`
protected $middleware = [
...
\AnowarCST\PrometheusLaravelHealthExporter\Middleware\RequestExporter::class,
];#### Preview
php artisan serve
http://localhost:8000/metrics
## Prometheus
Update `prometheus.yml`scrape_configs:
- job_name: 'laravel'
static_configs:
- targets: ['localhost:8000']Restart your Prometheus Server. (Update *localhost:8000* if you are using prometheus in different server)
## Grafana
[Grafana Dashboard](https://grafana.com/grafana/dashboards)