saschahemleb / php-grafana-api-client

A client for the Grafana API, written in PHP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PHP Grafana API Client

A client for the Grafana API, written in PHP.

Project Status

This project is still in an alpha state; not all API endpoints are implemented yet, and the public package API is subject to major changes.

Installation

Via Composer

$ composer require saschahemleb/php-grafana-api-client

Framework Integration

I've written a bridge package for Laravel, providing a facade and a connection manager for controlling multiple grafana instances. You can find it here.

Example

use Saschahemleb\PhpGrafanaApiClient\Client;
use Saschahemleb\PhpGrafanaApiClient\Authentication;

$client = Client::create(
    new Uri('http://localhost:3000/'), // url to grafana
    Authentication::basicAuth('admin', 'admin')
);

echo $client->other()->health()->getVersion();
// 8.3.6

About

A client for the Grafana API, written in PHP


Languages

Language:PHP 100.0%