Giter VIP home page Giter VIP logo

zabbix-es's People

Contributors

wasim37 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

zabbix-es's Issues

图片失效

您好.创建键值对映射的图片失效了,可以麻烦修正一下吗

关于节点状态返回值

   你好,我使用这个python监控脚本的时候,无论节点是否运行,ESzabbix[service,status]这个监控项的返回值始终为1。
   在您的监控脚本的79~85行是这样写的:
79 elif sys.argv[1] == 'service':
80     if sys.argv[2] == 'status':
81         try:
82             conn.ping()
83             returnval = 1
84         except Exception, e:
85             returnval = 0

我在/usr/lib/python2.6/site-packages/elasticsearch/client/init.py里面看到ping方法是这样定义的:
a
根据注释,返回True即为服务up,返回False即为服务down,
那么现在假设节点挂掉,conn.ping()会返回False,但是并不会捕捉异常,try里面的内容仍会执行,returnval仍然等于1,换句话说,不管节点挂没挂掉,returnval始终等于1,这样肯定不对吧?

  另外,我经过查找,找到ping()会调用/usr/lib/python2.6/site-packages/elasticsearch/transport.py里面的Transport类的perform_request方法,它在尝试连接第4次连不上的时候会抛出异常,是在327到337执行,我这里最后打印了一下异常:
ConnectionError(<urllib3.connection.HTTPConnection object at 0xfc0ad0>: Failed to establish a new connection: [Errno 111] nection object at 0xfc0ad0>: Failed to establish a new connection: [Errno 111] Connection refused)
ConnectionError(<urllib3.connection.HTTPConnection object at 0xfc0b10>: Failed to establish a new connection: [Errno 111] nection object at 0xfc0b10>: Failed to establish a new connection: [Errno 111] Connection refused)
ConnectionError(<urllib3.connection.HTTPConnection object at 0xfc0a90>: Failed to establish a new connection: [Errno 111] nection object at 0xfc0a90>: Failed to establish a new connection: [Errno 111] Connection refused)
ConnectionError(<urllib3.connection.HTTPConnection object at 0xfc0ad0>: Failed to establish a new connection: [Errno 111] nection object at 0xfc0ad0>: Failed to establish a new connection: [Errno 111] Connection refused)

此时我的节点还处于运行状态,但是就像前面说的那样,perform_request方法最终会抛出异常,异常再在ping()方法中抛出,最后conn.ping还是返回False,returnval=1,不知道这里是什么原因。

您如果有时间的话能看下这个问题吗,感激不尽!

文中部分目录未找到

/etc/zabbix/zabbix_externalscripts/ESzabbix.py
/etc/zabbix/agent_include/ESzabbix.userparm

zabbix_externalscripts和zabbix_include这两个目录没有看到呢?

是不是安装版本或者安装方式上有特殊要求?

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.