mkuzmich/zabbixlaravel

This package provides a Zabbix API library for Laravel

v1.0.1 2020-04-22 18:06 UTC

This package is auto-updated.

Last update: 2024-09-23 03:47:47 UTC


README

Installation

You can install the package via composer:

composer require mkuzmych/zabbixlaravel

Configuration

Laravel Zabbix requires connection configuration. To get started, you'll need to publish all vendor assets:

$ php artisan vendor:publish --provider="Mkuzmych\Zabbixlaravel\ZabbixlaravelServiceProvider"

This will create a config/zabbix.php file in your app that you can modify to set your configuration. Also, make sure you check for changes to the original config file in this package between releases.

You are free to change the configuration file as needed. In envorement you can set:

ZABBIX_APIURL="http://company.com/api_jsonrpc.php"
ZABBIX_USER="user"
ZABBIX_PASSWORD="password"
ZABBIX_HTTPUSER="httpuser"
ZABBIX_HTTPPASSWORD="httppassword"
ZABBIX_AUTHTOKEN=

Usage

Use the library as Facade in Laravel.

\Zabbixlaravel::request('host.get', array(
				'with_items' => true,
				'selectItems' => true
			));

\Zabbixlaravel::getAuthToken();

Documentation

There are other classes in this package that are not documented here. This is because the package is a Laravel wrapper of the Zabbix PHP package.

Changelog

Please see CHANGELOG for more information what has changed recently.

Troubleshooting

If you have any questions or problems, create a ticket.

License

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