VMware Cloud Community
janylj
Contributor
Contributor
Jump to solution

Java Server missing metrics and GC service not available

Hello,

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.
0 Kudos
1 Solution

Accepted Solutions
jvalkeal_hyperi
Jump to solution

It seems that metric collecting is not enable for rest of the metrics.

Check monitoring defaults under administration tab. And there every resource collecting setting can be defined by editing metric templates. I hope it was simple as this...

Naturally all metrics are not enabled by default.

View solution in original post

0 Kudos
6 Replies
jvalkeal_hyperi
Jump to solution

It seems that metric collecting is not enable for rest of the metrics.

Check monitoring defaults under administration tab. And there every resource collecting setting can be defined by editing metric templates. I hope it was simple as this...

Naturally all metrics are not enabled by default.
0 Kudos
janylj
Contributor
Contributor
Jump to solution

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.

<service name="Java GC">
<plugin type="autoinventory"/>
<property name="OBJECT_NAME" value="java.lang:type=GarbageCollector,name=*"/>
<metrics include="Garbage Collector"/>
</service>
</server>
0 Kudos
jvalkeal_hyperi
Jump to solution

Well if you followed instruction from that JMX Plugin tutorial, there seems not to be availability metric for GC. In that example, they have just separated java's GC to separate service.

You don't need to have availability values if you are just interested in other metric values. Like in this case how many times garbage is collected.
0 Kudos
janylj
Contributor
Contributor
Jump to solution

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?

Thanks again for prompt reply.
0 Kudos
jvalkeal_hyperi
Jump to solution

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...
janylj
Contributor
Contributor
Jump to solution

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.
0 Kudos