Coder Social home page Coder Social logo

Comments (3)

zhu-lingjie avatar zhu-lingjie commented on September 2, 2024

zabbix parsing 好像有问题, 不知道怎么解决。
以下是tomcat.conf:
UserParameter=jmx.tomcat.discovery,python /etc/zabbix/zabbix_agent_extend/scripts/tomcat.py --list 2>/dev/null
UserParameter=jmx.tomcat.item[*],python /etc/zabbix/zabbix_agent_extend/scripts/tomcat.py -d -b "$1" -k "$2" -p $3

手动取的时候没有问题,用zabbix-agent就有。
root@zabbix-client scripts]# sudo -u zabbix python tomcat.py -d -p 10001 -b "Catalina:type=GlobalRequestProcessor,name=http-nio-8080" -k requestCount
[2018-10-18 17:37:20] INFO
beanstr: Catalina:type=GlobalRequestProcessor,name=http-nio-8080
lst_beanstr: Catalina:type=GlobalRequestProcessor,name="http-nio-8080"
key: requestCount
cmdstr: /bin/java -jar /etc/zabbix/zabbix_agent_extend/scripts/cmdline-jmxclient-0.10.3.jar - localhost:10001 'Catalina:type=GlobalRequestProcessor,name="http-nio-8080"' 'requestCount'
stdo:
stde: 10/18/2018 17:37:19 +0800 org.archive.jmx.Client requestCount: 46
retcode: 0

46

[root@zabbix-server classes]# zabbix_get -s 10.0.7.168 -k jmx.tomcat.item["Catalina:type=ThreadPool,name=http-nio-8080","currentThreadCount",10001]
Usage: tomcat.py [options]
Get Tomcat Stat

tomcat.py: error: option -p: invalid integer value: 'currentThreadCount'

from zabbix.

qiueer avatar qiueer commented on September 2, 2024

tomat监控,手动执行脚本会有点问题,最好是通过zabbix自动执行,然后看日志确定问题

from zabbix.

zhu-lingjie avatar zhu-lingjie commented on September 2, 2024

谢谢回复,zabbix自动执行有问题才来看的手动执行的呢,手动执行脚本没问题~

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.