最近项目中要使用到zabbix API对服务器数据进行监控。
1.先配置zabbixAPI的地址,使用JsonRPC协议进行通信。
在.env文件中配置好 url username,password.
2.使用composer安装zabbix扩展,具体参考下面
https://packagist.org/packages/becker/laravel-zabbix-api
composer require becker/laravel-zabbix-api
3.使用zabbix ,具体使用方法参考zabbix API文档:
https://www.zabbix.com/documentation/2.2/manual/api/reference
实例化zabbix。
调用API方法