0

I use Java Visual VM to monitor my App Server (JBoss) via JMX. The problem is that i can see only real-time data.

I want to capture the information permanently, so that i can see history anytime. Even when Java Visual VM has been restarted.

Questions: Is there a way to make Java Visual VM log the statistics periodically. Is there any other tool that can log JMX stats?

I tried some things like Zabbix, but its too complex for this need.

Jasper
  • 8,440
  • 31
  • 92
  • 133
  • VisualVM can persist monitored data. See section 'Application Snapshot' in http://visualvm.java.net/snapshots.html – Tomas Hurka May 08 '12 at 05:01
  • But VisualVM application snapshots have to be taken manually. I need something automated... – Jasper May 08 '12 at 10:13
  • I see. You did not mentioned that it should be automated. – Tomas Hurka May 09 '12 at 06:47
  • One of the https://github.com/jmxtrans projects can be used to log JMX datapoints to a file, which then can be historized with your favourite log processing tool. – gliptak Oct 19 '16 at 19:44

2 Answers2

3

It seems to me that JavaMelody fits for what you need.
The data is persisted. There are graphics over time (used memory, cpu, http sessions, active threads...).
It is easy to install (no agent to install on servers). And after the installation it is automated.

gliptak
  • 3,592
  • 2
  • 29
  • 61
evernat
  • 1,713
  • 13
  • 18
1

There is a pretty cool tool called RHQ for complete JBoss-monitoring: http://rhq-project.org/display/RHQ/Home

  • Thanks for the RHQ link. But this requires me to install Agents on server machines i want to monitor. I cannot do that. I only have JMX enabled on servers.. and have to work with them. – Jasper May 08 '12 at 17:17
  • OK, I see, another option is using twiddle (https://community.jboss.org/wiki/Twiddle). Twiddle is a simple command line tool that allows for interaction with a remote JMX server instance. With Twiddle you can get performance information from the remote instance and pipe them in a file. It is no problem to start Twiddle periodically using cron. Example: ./twiddle.sh -s 127.0.0.1:1099 -u admin -p admin get jboss.system:type=ServerInfo FreeMemory MaxMemory TotalMemory ActiveThreadCount FreeMemory=1117465208 MaxMemory=1358626816 TotalMemory=1358626816 ActiveThreadCount=57 – Sascha Möllering May 09 '12 at 07:34