Java simple server monitoring
I'm trying to find a solution that allows me to monitor the resource consumption of the server Best of all, the metrics I want to get are network utilization, IO, and possible CPU usage / load averages and disk IO
My only other requirement is that this information can be obtained through Java, so it can be operated, at least on Linux (Fedora)
I've heard of several monitoring tools, but I don't know the best way I might want to collect information every 30 seconds
thank you
Update: just for re iteration, I mean system wide monitoring, not Java specific monitoring I just want to use java to access these metrics
Solution
You can choose to delegate monitoring to special tools such as cacti, centreon or zenoss, but this may be a bit excessive for a single application
JMX may indeed be a better solution for a simple solution As a starting point, I recommend reading the following articles: monitoring local and remote applications using JMX 1.2 and jconsole Then, take a look at using jconsole to monitor applications, a very detailed article showing how to use jconsole to access multiple core monitoring and management functions provided by the Java platform, including:
However, AFAIK and JMX will not allow you to access network IO, so you may need a combination of these tools Fortunately, many tools (such as cacti and smokeping) use RDD format, and you can easily operate them using java APIs (such as jrobin or rdd4j)