定制 moesgaard/zabbix-api 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

moesgaard/zabbix-api

最新稳定版本:v1.0.0-alpha

Composer 安装命令:

composer require moesgaard/zabbix-api

包简介

A Php way to communicate with Zabbix Api, Using auto discovery of Clients to use for http calls

README 文档

README

This for communication to the zabbix API via PHP To get this to work the following Constants has to be set

ZABBIXTOKEN
ZABBIXHOST

Structure

The structure is PSR-4 based. The basic of this library is teh API call is performed via the src/Api/ZbxApi and the src/Method if for the calls. In the src/Help/ there is a HelpClass that you can use to see the parameters Zabbix takes for each function in the api.

NOTE !!! This is Work in progress!!! This the Generation of those calls can also be done in src/Method/CustomCalls.php, where you can fill out the corresponding parameters in the call.

use ZbxApi\Help;
$problem = new HelpCalls();
print_r($problem->action_get());

This will return

Array ( [method] => action.get [params] => Array ( [filter] => Array ) )

wich in json is

{"method":"action.get","params":{"filter":"Array"}}

So you can modify the Json directly or you can fill out the parameters needed in CustomCalls that has the same name but each parameter in "Params" is a parameter in the call. BUT you don have to fill out each parameter as if it is no set it wont be returned.

use ZbxApi;
$problem = new CustomCalls();
print_r($problem->action_get(array( "ids" => 1 )));

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-04-07