Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tomcat监控无法读取数据 #49

Open
firehalt opened this issue Mar 7, 2019 · 3 comments
Open

tomcat监控无法读取数据 #49

firehalt opened this issue Mar 7, 2019 · 3 comments

Comments

@firehalt
Copy link

firehalt commented Mar 7, 2019

1.上传All In One/src/里面么的jvm.py,tomcat.py,cmdline-jmxclient-0.10.3.jar至服务器/etc/zabbix/script目录

image

2.上传All In One/confs/里面的tomcat.conf,jvm.conf至/etc/zabbix/zabbix_agentd.d
image

3.配置tomcat,我这边是多实例tomcat
image
image

4.重启zabbix-agent.service ,并在加入模板,但是没有数据

image
image

5.日志信息
image
image
image
image

能否帮我看下是那里配置错误

@qiueer
Copy link
Owner

qiueer commented Mar 26, 2019

没看明白是啥问题,jvm使用zabbix的自动发现功能,按照操作指引操作后,通常只需将主机关联到对应的模板就会自动采集监控数据了

@tonny1983
Copy link

I faced the same issue and I can provide some checkpoints to fix it.

  • [can zabbix agent read the config files]
  • [be JMX enabled or not]
  • [can JMX port be accessed locally or not]
  • [be connector type correct or not]
  • [are you waiting enough time...]

There are also tools/steps which can help you to check.

  • zabbix_get
    You can try zabbix_get -s 127.0.0.1 -k jmx.tomcat.discovery to see whether you will get correct response about your tomcat server or not, where you can get the info. of listening port, JMX port, pid and son on.
  • cmdline-jmxclient-0.10.3.jar
    You can get all supported MBean info with java -jar cmdline-jmxclient-0.10.3.jar - 127.0.0.1:<JMX port>. And from these info, you can also check whether you has used the right template or not. For example, if there are outputs say something as"Catalina:name="http-apr-8080"", you should use "With IO-APR" template; and if it says "Catalina:name="http-bio-8080""`, you should use "With IO-BIO" template. Furthermore, Tomcat 8.5 and 9.0 have completely dropped the BIO connector, so I guess you linked a wrong tomcat template.

Besides, with this solution, you should not config JMX interface in Zabbix any more. It does nothing with zabbix-jmv-gateway but just using zabbix-agent.

@qiueer
Copy link
Owner

qiueer commented Jul 22, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants