PHPackages                             casperboone/zabbix-graph - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. casperboone/zabbix-graph

ActiveLibrary

casperboone/zabbix-graph
========================

Get nice looking graphs of your Zabbix devices.

1.0.0(9y ago)34.7k3MITPHPPHP ^7.0

Since Apr 1Pushed 9y ago1 watchersCompare

[ Source](https://github.com/casperboone/zabbix-graph)[ Packagist](https://packagist.org/packages/casperboone/zabbix-graph)[ Docs](https://github.com/casperboone/zabbix-graph)[ RSS](/packages/casperboone-zabbix-graph/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

📈 PHP Zabbix Graph
==================

[](#-php-zabbix-graph)

[![Latest Version on Packagist](https://camo.githubusercontent.com/dd5d82c7749619764511f0e5bd83979d7f4123e1e3b2f07ac1658e24c7b73afb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636173706572626f6f6e652f7a61626269782d67726170682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/casperboone/zabbix-graph)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![StyleCI](https://camo.githubusercontent.com/b9c6a0b5d57870e0f2c0480e70349d5919d0b154b73232f615df2dc9db1c1a43/68747470733a2f2f7374796c6563692e696f2f7265706f732f38363836353538322f736869656c64)](https://styleci.io/repos/86865582)[![Build Status](https://camo.githubusercontent.com/781b3be14802faeb8fe98c7fe6ed60e7011ed5baed4dcb4a3e7b934b7781bdcd/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f636173706572626f6f6e652f7a61626269782d67726170682f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/casperboone/zabbix-graph)[![SensioLabsInsight](https://camo.githubusercontent.com/0223f06e16082f5960beb4f1e974a5b985174001d3f9f7f26892fb55af849cc2/68747470733a2f2f696d672e736869656c64732e696f2f73656e73696f6c6162732f692f30393232383039362d353664382d343631382d393361302d3932626163633836613063392e7376673f7374796c653d666c61742d737175617265)](https://insight.sensiolabs.com/projects/09228096-56d8-4618-93a0-92bacc86a0c9)[![Quality Score](https://camo.githubusercontent.com/4b7c4a9d981dfe3672fb4cd56ebf750fa0bf7d0cabe9eaa370372483e149c7d8/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f636173706572626f6f6e652f7a61626269782d67726170682e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/casperboone/zabbix-graph)[![Code Coverage](https://camo.githubusercontent.com/9445e47fc1d33289ad22f50bef4e6564c1c92ee239fa5c2ca946335260378988/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f636173706572626f6f6e652f7a61626269782d67726170682f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/casperboone/zabbix-graph/?branch=master)

Get a graph from Zabbix to display on a webpage or save to a file. If you are using Laravel, then please check out [this repository](https://github.com/casperboone/laravel-zabbix-graph).

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require casperboone/zabbix-graph
```

Require Composer's autoload (probably already done):

```
require __DIR__.'/../vendor/autoload.php';
```

Usage
-----

[](#usage)

### Basic Usage

[](#basic-usage)

You can create an instance of `CasperBoone\ZabbixGraph` and pass the full URL to your Zabbix installation, the username and the password through the constructor. On this instance you can get a graph from Zabbix by calling `->find($graphId)`. Graph IDs can be found in the URL of the Zabbix UI of a certain graph.

Example:

```
$zabbixGraph = new CasperBoone\ZabbixGraph('http://my-zabbix.com', 'username', 'passsword');

$zabbixGraph->width(500)
    ->height(300)
    ->find(54);
```

The output of find is a binary image that can be saved to a file or converted to an HTTP response.

### Available Methods

[](#available-methods)

The following methods are available to adjust the parameters of the graph:

MethodDescription`->width(int $width)`The width of the graph in pixels\*`->height(int $width)`The height of the graph in pixels\*`->startTime(DateTime $start)`The start date and time of the data displayed in the graph`->endTime(DateTime $end)`The end date and time of the data displayed in the graph*\* The graph that Zabbix returns is usually slightly bigger because of added legends or labels*

### Old Zabbix versions

[](#old-zabbix-versions)

If you're using Zabbix 1.8 or older, then you need to set the last parameter of the constructor to `true`.

Example:

```
$zabbixGraph = new CasperBoone\ZabbixGraph('http://my-zabbix.com', 'username', 'passsword', true);
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

One of the integration tests requires a non public Zabbix installation. In order to execute this test, you have to create a `.env` file in the project root and copy the contents of `.env.example` into it. Complete the `.env` file with the host, a username/password and an available graph ID.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Casper Boone](https://github.com/casperboone)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3325d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c56719b13eb57ae4d3e7f27320c7f0d7ebfd91ecde8995a37e424310473067ff?d=identicon)[casperboone](/maintainers/casperboone)

---

Top Contributors

[![casperboone](https://avatars.githubusercontent.com/u/15815208?v=4)](https://github.com/casperboone "casperboone (12 commits)")

---

Tags

Zabbix Graph

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/casperboone-zabbix-graph/health.svg)

```
[![Health](https://phpackages.com/badges/casperboone-zabbix-graph/health.svg)](https://phpackages.com/packages/casperboone-zabbix-graph)
```

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k20](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
