六、触发器显示Agent is unavailable或者SNMP图标为红色 七、Zabbix监控界面里Latest data界面报http error 500错误 一、Web界面上显示Zabbix server is not running 环境说明:centos 7.3.1611 + zabbix 4.0.2 问题定位: 1.找到zabbix-server.log日志所在位置: find / -name zabbix_server.log 2.查看日志最后10行...
#定义通过HTTP方式访问API地址的函数,后面每次请求API的各个方法都会调用这个函数 def requestJson(url,values): data = json.dumps(values) data=bytes(data,'utf8') req = urllib.request.Request(url, data, {'Content-Type': 'application/json-rpc'}) response = urllib.request.urlopen(req, data) outpu...
{"jsonrpc":"2.0","error":{"code":1,"message":"Error connecting to database [No such file or directory]"},"id":0} while the API documentation (https://www.zabbix.com/documentation/2.4/manual/api) states that: "If an error occurred, instead of the result property, the response objec...
zabbix请求API接口报错 报错信息 {"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params.","data":"Invalid parameter \"/\": unexpected parameter \"user\"."},"id":1} 请求参数 代码语言:json 复制 {"jsonrpc":"2.0","method":"user.login","params":{"user":"Admin","passwor...
@Data @Slf4jpublicclassZabbixConfig {privateString url;privateString username;privateString password;privatevolatileZabbixApi zabbixApi;/** * 獲取API * @return*/publicZabbixApi getZabbixApi() {if(null==zabbixApi) { synchronized (ZabbixConfig.class) {if(null==zabbixApi) { ...
req= request.Request(url=self.url, data=value, headers=self.header) # 验证并获取Auth ID try: # 打开包装过的url result=request.urlopen(req) except Exception as e: print("Auth Failed, Please Check Your Name And Password:", e)else: ...
mysql> grant all privileges on zabbix.* to zabbix@127.0.0.1; mysql> set global log_bin_trust_function_creators = 1; mysql> quit; 导入SQL # cd zabbix-7.0.3/database/mysql # mysql -u root -p111111 zabbix < schema.sql # mysql -u root -p111111 zabbix < images.sql ...
The-ExecutionPolicy bypassparameter allows you to run a PowerShell script without changing the PowerShell execution policy settings. Restart the Zabbix Agent service: Get-Service 'Zabbix Agent 2'| Restart-Service -force Make sure that the Zabbix agent can receive the data from the new parameter. ...
url = 'http://x.x.x.x(IP)/api_jsonrpc.php' post_headers = {'Content-Type': 'application/json'} post_data = { "jsonrpc": "2.0", "method": "user.login", "params": { "user": "Admin", "password": "zabbix", }, "id": 0, ...
当使用查询操作(get方法)时,可以使用更多的参数,查询操作支持的参数如表13-2所示。 Zabbix API代码入口文件路径 Zabbix API代码入口文件路径如下: /usr/share/zabbix/api_jsonrpc.php API调用时的URL是http://x.x.x.x/zabbix/api_jsonrpc.php。