今天6.4升级7.0后Grafana内Zabbix Problems 插件报错
Invalid params. Invalid parameter "/output/2": value must be one of "proxyid", "name", "proxy_groupid", "local_address", "local_port", "operating_mode", "allowed_addresses", "address", "port", "description", "tls_connect", "tls_accept", "tls_issuer", "tls_subject", "custom_timeouts", "timeout_zabbix_agent", "timeout_simple_check", "timeout_snmp_agent", "timeout_external_check", "timeout_db_monitor", "timeout_http_agent", "timeout_ssh_agent", "timeout_telnet_agent", "timeout_script", "timeout_browser", "lastaccess", "version", "compatibility", "state".
Object
status:500
statusText:"Internal Server Error"
data:Object
error:"Internal Server Error"
message:"Invalid params. Invalid parameter \"/output/2\": value must be one of \"proxyid\", \"name\", \"proxy_groupid\", \"local_address\", \"local_port\", \"operating_mode\", \"allowed_addresses\", \"address\", \"port\", \"description\", \"tls_connect\", \"tls_accept\", \"tls_issuer\", \"tls_subject\", \"custom_timeouts\", \"timeout_zabbix_agent\", \"timeout_simple_check\", \"timeout_snmp_agent\", \"timeout_external_check\", \"timeout_db_monitor\", \"timeout_http_agent\", \"timeout_ssh_agent\", \"timeout_telnet_agent\", \"timeout_script\", \"timeout_browser\", \"lastaccess\", \"version\", \"compatibility\", \"state\"."
config:Object
url:"api/datasources/8/resources/zabbix-api"
method:"POST"
headers:Object
hideFromInspector:false
data:Object
retry:0
message:"Invalid params. Invalid parameter \"/output/2\": value must be one of \"proxyi
经过一番百度解决方法如下
1、允许Grafana加载未签名的插件 /etc/grafana/grafana.ini
修改以下参数
allow_loading_unsigned_plugins = alexanderzobnin-zabbix-app,alexanderzobnin-zabbix-datasource,alexanderzobnin-zabbix-triggers-panel
修改完如图:
2、删除grafana-zabbix插件中的数字签名
root@zabbix:# cd /var/lib/grafana/plugins/alexanderzobnin-zabbix-app/
root@zabbix:# mv /MANIFESST.txt ~ #删除数字签名
root@zabbix:/var/lib/grafana/plugins/alexanderzobnin-zabbix-app# ls #删完就剩这几个文件了
CHANGELOG.md datasource go_plugin_build_manifest gpx_zabbix-plugin_linux_amd64 img LICENSE module.js module.js.map panel-triggers plugin.json README.md styles
3、编辑grafana中的module.js文件
/var/lib/grafana/plugins/alexanderzobnin-zabbix-app/datasource/module.js #文件路径
1、{output:["proxyid","host"]}中的host修改为 name 修改完 {output:["proxyid","name"]}
2、getEventAlerts(e){const t={eventids:e,output:[“alertid”,“eventid”,“message”,“clock”,“error”],selectUsers:!0}
这部分修改为
getEventAlerts(e){const t={eventids:e,output:["alertid","eventid","message","clock","error"],selectUsers:"extend"}
#这部分注意中英文标点
修改完如图: