2017 © Pedro Peláez
 

library laravel-zabbix-graph

Get nice looking graphs of your Zabbix devices in Laravel.

image

casperboone/laravel-zabbix-graph

Get nice looking graphs of your Zabbix devices in Laravel.

  • Friday, April 21, 2017
  • by casperboone
  • Repository
  • 3 Watchers
  • 5 Stars
  • 32 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 2 Versions
  • 14 % Grown

The README.md

📈 Laravel Zabbix Graph

Latest Version on Packagist Software License StyleCI Build Status SensioLabsInsight Quality Score Code Coverage, (*1)

Get a graph from Zabbix to display on a webpage or to save to a file. If you are not using Laravel, then please check out this repository., (*2)

Installation

You can install the package via composer:, (*3)

composer require casperboone/laravel-zabbix-graph

You must install the service provider:, (*4)

// config/app.php
'providers' => [
    ...
    CasperBoone\LaravelZabbixGraph\ZabbixGraphServiceProvider::class,
],

If you want to, you can also add the facade:, (*5)

// config/app.php
'aliases' => [
    ...
    'ZabbixGraph' => CasperBoone\LaravelZabbixGraph\ZabbixGraphFacade::class,
],

You can publish the config file with (the default config file will suffice in most cases):, (*6)

php artisan vendor:publish --provider="CasperBoone\LaravelZabbixGraph\ZabbixGraphServiceProvider"

Make sure to update the config file or your .env file with the details of your Zabbix server., (*7)

Usage

Output a Zabbix graph to an HTTP endpoint (using method injection):, (*8)

<?php

namespace App\Http\Controllers;

use Carbon\Carbon;
use Illuminate\Http\Request;
use CasperBoone\ZabbixGraph\ZabbixGraph;

class GraphsController extends Controller
{
    public function show(Request $request, ZabbixGraph $zabbixGraph, $id)
    {
        $graph = $zabbixGraph->startTime(Carbon::now()->subDay())
            ->width($request->input('width', 1000))
            ->height($request->input('height', 200))
            ->find($id);

        return response($graph)
            ->header('Content-Type', 'image/png');
    }
}

You can also use the facade, if you prefer:, (*9)

<?php

namespace App\Http\Controllers;

use ZabbixGraph;
use Carbon\Carbon;
use Illuminate\Http\Request;

class GraphsController extends Controller
{
    public function show(Request $request, $id)
    {
        $graph = ZabbixGraph::startTime(Carbon::now()->subDay())
            ->width($request->input('width', 1000))
            ->height($request->input('height', 200))
            ->find($id);

        return response($graph)
            ->header('Content-Type', 'image/png');
    }
}

For all available methods and options, see casperboone/zabbix-graph., (*10)

Changelog

Please see CHANGELOG for more information what has changed recently., (*11)

Testing

$ composer test

Contributing

Please see CONTRIBUTING for details., (*12)

Security

If you discover any security related issues, please email mail@casperboone.nl instead of using the issue tracker., (*13)

Credits

License

The MIT License (MIT). Please see License File for more information., (*14)

The Versions

21/04 2017

dev-master

9999999-dev https://github.com/casperboone/laravel-zabbix-graph

Get nice looking graphs of your Zabbix devices in Laravel.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel-zabbix-graph

21/04 2017

1.0.0

1.0.0.0 https://github.com/casperboone/laravel-zabbix-graph

Get nice looking graphs of your Zabbix devices in Laravel.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel-zabbix-graph