MBeans instrumentation doesn't work

70 views
Skip to first unread message

Roman Hrysevych

unread,
Mar 18, 2016, 12:06:03 PM3/18/16
to Zorka Users
Hi, I'm trying to build simple "HelloWorld"-like application with Zorka and Zabbix. I'm starting Zorka as agent (VM-options: -javaagent:/apps/zorka/zorka.jar=/apps/zorka).
In logs I can see this:
2016-03-18 16:38:18 DEBUG AgentConfig Starting ZORKA agent 1.0.15
2016-03-18 16:38:18 DEBUG AgentInstance Enabling Zorka SPY
2016-03-18 16:38:18 DEBUG AgentInstance Enabling ZABBIX Active Agent subsystem ...
2016-03-18 16:38:18 DEBUG ZabbixActiveAgent ZabbixActive setup...
2016-03-18 16:38:18 DEBUG ZabbixActiveAgent ZabbixActive Agent (zorka) will send Active Checks to /127.0.0.1:10051 every 120 seconds
2016-03-18 16:38:18 DEBUG ZabbixActiveAgent ZabbixActive Agent (zorka) will send up to 10 metrics every 60 seconds. Agent will persist up to 150 metrics per 120 seconds, exceeding records will be discarded.
2016-03-18 16:38:18 DEBUG ZabbixActiveAgent ZabbixActive start...
2016-03-18 16:38:18 DEBUG ZabbixActiveAgent Successfuly connected to 127.0.0.1:10051
2016-03-18 16:38:18 DEBUG ZabbixActiveAgent ZabbixActive run...
2016-03-18 16:38:18 DEBUG ZabbixActiveAgent ZabbixActive Scheduling sender task
2016-03-18 16:38:18 DEBUG ZabbixActiveAgent ZabbixActive Refreshing Active Check
2016-03-18 16:38:18 DEBUG ZabbixUtils Message: '{"port":10055,"host":"zorka","request":"active checks","host_metadata":""}'
2016-03-18 16:38:18 DEBUG ZabbixUtils Message length: 74
2016-03-18 16:38:18 DEBUG ZabbixActiveRequest Zorka send: ZBXD^AJ^@^@^@^@^@^@^@{"port":10055,"host":"zorka","request":"active checks","host_metadata":""}
2016-03-18 16:38:18 DEBUG AgentInstance Enabling ZABBIX subsystem ...
2016-03-18 16:38:18 DEBUG ZabbixAgent Zorka will listen for zabbix connections on /127.0.0.1:10055
2016-03-18 16:38:18 DEBUG ZabbixAgent Zorka will accept zabbix connections from '127.0.0.1'.
2016-03-18 16:38:18 DEBUG ZabbixActiveRequest Zorka get:{"response":"success","data":[]}
2016-03-18 16:38:18 DEBUG ZabbixAgent ZORKA-zabbix core is listening at /127.0.0.1:10055.
2016-03-18 16:38:18 DEBUG AgentInstance Enabling Syslog subsystem ....
2016-03-18 16:38:18 DEBUG AgentInstance Enabling SNMP subsystem ...
2016-03-18 16:38:18 DEBUG ZabbixActiveAgent ZabbixActive - schedule Tasks: {response=success, data=[]}
2016-03-18 16:38:18 DEBUG ZabbixActiveAgent ZabbixActive - new scheduled tasks: 0
2016-03-18 16:38:18 DEBUG ZabbixActiveAgent ZabbixActive - deleted old tasks: 0
2016-03-18 16:38:19 DEBUG SpyClassTransformer Adding QUARTZ_JOB_EXECUTE spy definition.
2016-03-18 16:38:19 DEBUG RealSpyRetransformer No classes need to be retransformed.
2016-03-18 16:38:33 DEBUG ZorkaBshAgent Processing request BSH expression: zorka.rate("java", "zorka:type=ZorkaStats,name=Quartz", "stats", "ALL", "time", "calls", "AVG5")
2016-03-18 16:38:33 DEBUG ZorkaLib MBean server named 'java' is not registered.

When I'm looking into Mbeans via JConsole I can not see 'java' Mbean too.
I've attached my archives of my Zorka folder and test project. Could anyone point me my mistake, please?
zorka.zip
test.zip

Rafal Lewczuk

unread,
Mar 20, 2016, 12:42:20 PM3/20/16
to Zorka Users
Hi,

Java mbean server isn't intercepted by default because it causes problem on some application serves (JBoss for example). Platform mbean server registration is performed by appropriate application server support script (eg. tomcat.bsh). You can force automatic interception and registration of mbean server by adding the following option to zorka.properties:

zorka.mbs.autoregister = true

Regards,
rle


Roman Hrysevych

unread,
Mar 21, 2016, 12:49:21 PM3/21/16
to Zorka Users
Thank you, it completely solved my issue!
Reply all
Reply to author
Forward
0 new messages