qiueer / zabbix

zabbix功能扩展,主要监控tomcat,mysql,redis,mongodb,memcached,nginx等中间件
444 stars 262 forks source link

tomcat监控无法读取数据 #49

Open firehalt opened 5 years ago

firehalt commented 5 years ago

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 commented 5 years ago

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

tonny1983 commented 5 years ago

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

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

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 commented 5 years ago

Thank you for your checkpoints,very well 在2019年07月21日 16:07,tonny1983 写道:

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:. 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.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.