Git Product home page Git Product logo

zabbix_manager's Issues

报错?centos7,python2.7

报错?centos7,python2.7
[root@localhost zabbix_manager]# zabbix_api hostgroup_get --table
zabbix_manager:[1.4.01]
Traceback (most recent call last):
File "/usr/bin/zabbix_api", line 2530, in
zabbix=zabbix_api(terminal_table,debug,output_sort=output_sort,sort_reverse=sort_reverse,profile = profile)
File "/usr/bin/zabbix_api", line 81, in init
self.zapi.login(self.user,self.password)
File "/opt/ZabbixTool/lib_zabbix/w_lib/zabbix_api_lib.py", line 209, in login
result = self.do_request(obj)
File "/opt/ZabbixTool/lib_zabbix/w_lib/zabbix_api_lib.py", line 260, in do_request
return self.do_request(json_obj,num_retries-1)
File "/opt/ZabbixTool/lib_zabbix/w_lib/zabbix_api_lib.py", line 260, in do_request
return self.do_request(json_obj,num_retries-1)
File "/opt/ZabbixTool/lib_zabbix/w_lib/zabbix_api_lib.py", line 260, in do_request
return self.do_request(json_obj,num_retries-1)
File "/opt/ZabbixTool/lib_zabbix/w_lib/zabbix_api_lib.py", line 265, in do_request
raise ZabbixAPIException("urllib2.URLError - %s" % e)
w_lib.zabbix_api_lib.ZabbixAPIException: urllib2.URLError - Not Found

ImportError: No module named w_lib.zabbix_api_lib

zabbix_api user_get --table
Traceback (most recent call last):
File "/bin/zabbix_api", line 16, in
from w_lib.zabbix_api_lib import ZabbixAPI
ImportError: No module named w_lib.zabbix_api_lib
一直都找不到这个模块,不知道什么原因?请教大神,求回复,谢谢,

导出可行性报表时所得数据与zabbix不符

使用如下命令导出
zabbix_api --report_available2 "2019-05-26 00:00:00" "2019-06-02 00:00:00" --table --item_key /root/item_list --hostgroupid "Gateway"
image
image
image
感谢大佬的程序,期待大佬的回复

关于zabbix_api 的ssl配置问题

zabbix_server="https://%s:%s"%(self.server,self.port)
修改完之后报错
w_lib.zabbix_api_lib.ZabbixAPIException: urllib2.URLError - [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:618)

python

请问使用的python版本是多少,我用的3.4.3执行main.sh报错File "./lib_zabbix/zabbix_api.py", line 37
print "\033[41;37m[Error]: %s \033[0m"%msg
^
SyntaxError: Missing parentheses in call to 'print'

url error

当Zabbix路径为 http://xxx.xxx.xxx.xxx/zabbix 出现下列错误:
如果我在Apache上修改地址改为 http://xxx.xxx.xxx.xxx,就可以正常获取到信息。

[root@Zabbix01 zabbix_manager]# zabbix_api host_get --table
zabbix_manager:[1.4.01]
Traceback (most recent call last):
File "/usr/bin/zabbix_api", line 2530, in
zabbix=zabbix_api(terminal_table,debug,output_sort=output_sort,sort_reverse=sort_reverse,profile = profile)
File "/usr/bin/zabbix_api", line 81, in init
self.zapi.login(self.user,self.password)
File "/opt/ZabbixTool/lib_zabbix/w_lib/zabbix_api_lib.py", line 209, in login
result = self.do_request(obj)
File "/opt/ZabbixTool/lib_zabbix/w_lib/zabbix_api_lib.py", line 260, in do_request
return self.do_request(json_obj,num_retries-1)
File "/opt/ZabbixTool/lib_zabbix/w_lib/zabbix_api_lib.py", line 260, in do_request
return self.do_request(json_obj,num_retries-1)
File "/opt/ZabbixTool/lib_zabbix/w_lib/zabbix_api_lib.py", line 260, in do_request
return self.do_request(json_obj,num_retries-1)
File "/opt/ZabbixTool/lib_zabbix/w_lib/zabbix_api_lib.py", line 265, in do_request
raise ZabbixAPIException("urllib2.URLError - %s" % e)
w_lib.zabbix_api_lib.ZabbixAPIException: urllib2.URLError - Not Found

根据key导出报表时报错了,zabbix版本是3.4,db用的是oracle。

zabbix_api --report_key "system.cpu.util[,idle]" "2018-11-07 01:00:00" "2018-11-07 02:00:00" --table --hostgroupid 45

zabbix_manager:[1.4.04]
:OC-NS

   Traceback (most recent call last):

File "/usr/bin/zabbix_api", line 2610, in
zabbix._report_key(args.report_key[0],args.report_key[1],args.report_key[2],export_xls,select_condition)
File "/usr/bin/zabbix_api", line 1050, in _report_key
itemid_all_list = self.__item_get2(host_info[0],item_key)
File "/usr/bin/zabbix_api", line 658, in __item_get2
"monitored":True,
File "/opt/ZabbixTool/lib_zabbix/w_lib/zabbix_api_lib.py", line 333, in method
return self.universal("%s.%s" % (self.data["prefix"], name), opts[0])
File "/opt/ZabbixTool/lib_zabbix/w_lib/zabbix_api_lib.py", line 81, in wrapper
return self.do_request(self.json_obj(method, opts))['result']
File "/opt/ZabbixTool/lib_zabbix/w_lib/zabbix_api_lib.py", line 340, in do_request
return self.parent.do_request(req)
File "/opt/ZabbixTool/lib_zabbix/w_lib/zabbix_api_lib.py", line 257, in do_request
raise APITimeout("HTTP read timeout",)
w_lib.zabbix_api_lib.APITimeout: HTTP read timeout

PS:直接zabbix_api --report的不报错,但是获取的数据都是0.

how to config zabbix_manager

start.sh 安装完成以后, 在哪儿配置zabbix 服务器信息? 才可以用 zabbix_api 执行相关命令?

zabbix5.2新版本失效否?

我现在在用zabbix5.2
在服务器也配置了zabbix_manager,测试也正常,也没有报错,但是输出任何条目比如CPU时,结果都是0.00

我看了下日志,都是提示not have trend_data,zabbix上都是有值的

这是新版本失效了吗?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.