Coder Social home page Coder Social logo

Comments (4)

qiueer avatar qiueer commented on July 28, 2024 1
权限问题,用root用户手动执行命令,日志及缓存文件都是以root的权限写入,但是zabbix进程用zabbix用户运行。解决方法,调整/tmp目录下对应的缓存文件、日志文件的权限。

from zabbix.

lpf190 avatar lpf190 commented on July 28, 2024

[root@bogon tmp]# python /usr/local/zabbix/etc/scripts/tomcat.py --list
{
"data":[
{
"{#BIZPORT}":8080,
"{#CTLN_HOME}":"/usr/local/tomcat",
"{#DIRNAME}":"tomcat",
"{#JVMPORT}":12345,
"{#PID}":28791,
"{#RUNUSER}":"root"
}
]
}

[root@bogon ~]# /usr/local/zabbix/bin/zabbix_get -s 192.168.56.5 -k jmx.tomcat.discovery
{
"data":[
{
"{#CTLN_HOME}":"/usr/local/tomcat",
"{#DIRNAME}":"tomcat",
"{#JVMPORT}":12345,
"{#PID}":28791,
"{#RUNUSER}":"root"
}
]
}

from zabbix.

RyanZhang2015 avatar RyanZhang2015 commented on July 28, 2024

你好, 我在执行python tomcat.py --list报如下错误。
Traceback (most recent call last):
File "tomcat.py", line 251, in main
print zbx_ex_obj.get_port_list()
File "tomcat.py", line 112, in get_port_list
parser.parse(server_xml)
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 110, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 213, in feed
self._parser.Parse(data, isFinal)
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 317, in start_element
self._cont_handler.startElement(name, AttributesImpl(attrs))
File "tomcat.py", line 34, in startElement
protocal = attributes["protocol"]
File "/usr/lib/python2.7/xml/sax/xmlreader.py", line 316, in getitem
return self._attrs[name]
KeyError: 'protocol'

但是运行python tomcat.py -b "Catalina:type=ThreadPool,name=http-bio-8090" -k currentThreadCount -p 12345可以拿到值。
这大概是什么问题呢。最关键问题是Qiueer-LLD-JMX-Tomcat自动发现没工作,在Info那有红色感叹号提示“Value should be a JSON object ”.
image

from zabbix.

qiueer avatar qiueer commented on July 28, 2024
已修复

from zabbix.

Related Issues (20)

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.