-
Notifications
You must be signed in to change notification settings - Fork 134
install
遇见王斌 edited this page May 4, 2019
·
9 revisions
#git clone https://github.com/meetbill/zabbix_manager.git
#cd zabbix_manager
#sh start.sh
常见问题 git clone 失败
[root@localhost ~]# git clone https://github.com/meetbill/zabbix_manager.git
Initialized empty Git repository in /root/zabbix_manager/.git/
error: while accessing https://github.com/meetbill/Vim.git/info/refs
fatal: HTTP request failed
解决方法
#git config --global http.sslVerify false
#curl -o zabbix_manager.zip https://codeload.github.com/meetbill/zabbix_manager/zip/master
#unzip zabbix_manager.zip
- /etc/zabbix_tool/zabbix_config.ini(连接 zabbix server 服务配置)
- /etc/zabbix_tool/zabbix_setting.ini(额外配置)
配置文件:/etc/zabbix_tool/zabbix_config.ini
注意,配置时将配置配置在 [zabbixserver] 字段下
[zabbixserver]---------------------- 默认连接(可通过 --profile 选择连接的 zabbix)
server = 127.0.0.1------------------zabbix server IP
port = 80---------------------------zabbix web 端口
user = admin------------------------zabbix web 管理员账号
password = zabbix-------------------zabbix web 管理员密码
#################################
# zabbix_api 可以进行管理多台 zabbix server 只需要在配置文件中增加如下配置即可,加入要对 [bendi] 的机器进行管理,在命令行后跟 --profile bendi 即可
#[bendi]
#server = 192.168.199.128
#port = 80
#user = admin
#password = zabbix
#################################
搭建 zabbix server 时使用的lnmp
(即前端使用的 nginx 时则不需要进行以下操作),前端使用的apache
时需要进行操作
配置文件:/etc/zabbix_tool/zabbix_setting.ini
修改如下
apache=True
zabbix_api hostgroup_get --table
...
w_lib.zabbix_api_lib.ZabbixAPIException: urllib2.URLError - Not Found
#curl -sL -w "%{http_code}\n" http://IP: 端口 /api_jsonrpc.php
如果返回 412 则 zabbix_setting.ini 中 apache=False
curl -sL -w "%{http_code}\n" http://IP: 端口 /zabbix/api_jsonrpc.php
如果返回 412 则 zabbix_setting.ini 中 apache=True
...
w_lib.zabbix_api_lib.ZabbixAPIException: (u'Error -32602: Invalid params., Login name or password is incorrect. while sending {"params": {"password": "XXXXXXX", "user": "admin"}, "jsonrpc": "2.0", "method": "user.login", "id": 0}', -32602)
检查用户名及密码,并修改配置文件
遇到问题可以加入 Zabbix 开源社区群进行讨论 加入微信群方法如下
- (1) 微信添加 zabbix_china(Zabbix_Z小秘)备注说明:(王斌 zabbix_manager)
- (2) 然后让
Zabbix_Z小秘
拉入Zabbix 开源社区群
即可