cheng029 发表于 2014-12-18 16:46:51

cacti监控tomcat8遇到问题

cacti---> console --> Data Input Methods ---> Tomcat Status-->Input String
执行命令填写的是:
/usr/bin/perl <path_cacti>/scripts/tomcatstats.pl <hostname>:8086 test test "http-nio-8086"

手动执行命令:
# /usr/bin/perl /home/wwwroot/default/cacti/scripts/tomcatstats.pl 192.168.0.86:8086 test test \"http-nio-8086\"
jvm_memory_free:1355911000 jvm_memory_max:22543335424 jvm_memory_total:2905604096 connector_max_time:47117 connector_error_count:35 connector_bytes_sent:28009534 connector_processing_time:360250 connector_request_count:69399 connector_bytes_received:14892 connector_current_thread_count:25 connector_min_spare_threads: connector_max_threads:2000 connector_max_spare_threads: connector_current_threads_busy:1                                       
完全没有问题。
但cacti确报错抓不到数据,日志如下:
# tailf ../log/cacti.log
12/18/2014 04:06:07 PM - CMDPHP: Poller mURLin - INFO: Reached Poller Bottom, clearing cache
12/18/2014 04:06:07 PM - POLLER: Poller Network Discover is now running
12/18/2014 04:06:07 PM - POLLER: Poller ERROR: Network Discover subnet setting is not set!
12/18/2014 04:07:03 PM - SPINE: Poller Host ERROR: Empty result : '/usr/bin/perl /home/wwwroot/default/cacti/scripts/tomcatstats.pl 192.168.0.86:8086 test test \"http-nio-8086\"'
12/18/2014 04:07:03 PM - SPINE: Poller Host ERROR: Empty result : '/usr/bin/perl /home/wwwroot/default/cacti/scripts/tomcatstats.pl 192.168.0.86:8086 test test \"http-nio-8086\"'
12/18/2014 04:07:03 PM - SPINE: Poller Host ERROR: Empty result : '/usr/bin/perl /home/wwwroot/default/cacti/scripts/tomcatstats.pl 192.168.0.86:8086 test test \"http-nio-8086\"'
12/18/2014 04:07:03 PM - SPINE: Poller Host ERROR: Empty result : '/usr/bin/perl /home/wwwroot/default/cacti/scripts/tomcatstats.pl 192.168.0.86:8086 test test \"http-nio-8086\"'
12/18/2014 04:07:06 PM - SYSTEM STATS: Time:5.5181 Method:spine Processes:1 Threads:1 Hosts:13 HostsPerProcess:13 DataSources:203 RRDsProcessed:140
12/18/2014 04:07:06 PM - SYSTEM THOLD STATS: Time:0.0040 Tholds:0 TotalHosts:12 DownHosts:0 NewDownHosts:0
12/18/2014 04:07:06 PM - CMDPHP: Poller mURLin - INFO: Reached Poller Bottom, clearing cache
^C
纠结好几天了,有没有人知道怎么回事的?附件是使用的脚本和模板,处理改成监控8086端口其他没改。
使用的是http://forums.cacti.net/download.php?id=12310 这个模板
百度云附件:tomcatstats.pl等   

cheng029 发表于 2014-12-19 17:48:26

http://forums.cacti.net/viewtopic.php?f=21&t=53978

水新星 发表于 2016-12-17 15:24:43

楼主这个问题解决了吗?
页: [1]
查看完整版本: cacti监控tomcat8遇到问题