Comments (4)
权限问题,用root用户手动执行命令,日志及缓存文件都是以root的权限写入,但是zabbix进程用zabbix用户运行。解决方法,调整/tmp目录下对应的缓存文件、日志文件的权限。
from zabbix.
[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.
你好, 我在执行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 ”.
from zabbix.
已修复
from zabbix.
Related Issues (20)
- 您好,请问这个key是不是没有呢? HOT 4
- NGINX监控无返回值:python nginx.py -p 80 -k accepts HOT 3
- python nginx.py -p 80 -k accepts无法获取值 HOT 1
- 手动取值没问题,网页前端显示Timeout while executing a shell script HOT 3
- memcache.py中的slog在哪?
- redis连接逻辑问题 HOT 1
- tomcatde 不用自动发现 HOT 6
- nginx监控关于配置文件 HOT 1
- tomcat监控无法读取数据 HOT 3
- zabbix 监控mysql的python脚本。 都有问题,都没法执行。 你到底有没有测试这些脚本??? HOT 4
- Can not get the item of "Tomcat version"
- zabbix服务端与agentld 端都安装好了,前端页面显示不正常 HOT 1
- 咨询下tomcat问题 HOT 6
- 4.x版本导入模板失败
- jvm可以自动发现但是key获取不到值,手动再agent执行py有结果
- 你好大神!请教个问题
- zabbix服务器端获取不了数据,请帮忙看看,谢谢。
- Cannot accurately apply filter: no value received for macro "{#BIZPORT}".
- mongodb副本集监控在json.loads()出错
- jvm模板导入没有监控项
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zabbix.