Java Server missing metrics and GC service not available
I am new to custom plugin. So I am following JMX Plugin Tutorial (http://support.hyperic.com/display/DOC/JMX+Plugin+Tutorial) to create a custom plugin for a simple Java process. I am using the plugin XML posted in the tutorial link.
The problem is that I could use command line (java -jar <Agent Directory>/pdk/lib/hq-product.jar -Dplugins.include=yourPluginName -m discover -a metric) to get all the metrics. I am attached the results from command line.
However, from HQ server (localhost:7080), only Availability, Process Cpu Usage, Process Resident Memory Size are collected. And the GC services are auto-discovered, but they are shown as unavailable. I am attaching two screen shots from HQ server.
Please help what I missed. It's very important for us to evaluate Hyperic product. Thank you very much.
Yes, this is exactly the problem for Java Server missed some metrics. I modified the collection interval for the rest of metrics. Now all of them start collecting. Please see the attached screen shot. Thank you very much.
However, the GC service is still unavailable. I am attaching the screen shot of Java GC monitoring default in the administration tab. I am thinking whether it is related to Java GC service doesn't have Availability metric.
Just to make sure that I understand, you mean that the plugin XML in the tutorial is correct or not? I think the tutorial's purpose is to demonstrate how to setup a service under server? Can GC be a separate service?
I tried to update collection interval from the administrative tab, but it doesn't help and GC is still unavailable. So if I want GC to be a separate service and be monitored, what shall I do?
I believe there's nothing wrong with the tutorial. In that example they haven't made any kind of availability to GC service.
However, if you want to have actual availability, first you need to decide how to determine if GC service is available or not. In that example the upper server where service belongs, availability is determined if process is available. I wouldn't do it.
Anyway what comes for the GC, it's kind of difficult to check if that is available or not since it java's internal service. Java won't do garbage collecting until it's necessary, since it quite heavy operation. Well not that heavy as it used to be.
Because you are monitoring jvm, just be happy if jvm itself is available. Don't look too closely on those availability values, sometimes other metrics will give more information. Basically availability will tell you that you have a problem. Usually it's better to monitor metric values and see those potential problems before things starts to escalate...
Yes, you are right. Although GC as a whole service is not available because of no Availability metric, I could still drill into it and see Collection Time and Collection Count. As you said, GC is bad example to practise service. I should use a better one. Thank you very much.