evil_evo
Contributor
Contributor

Monitor multiple tomcat instances using Hyperic 4.2

Hi There, can anyone here please tell me how to Monitor multiple tomcat instances using Hyperic 4.2? I have tried Hyperic 4.5 same issue.

I am guessing I will have to change the ptql setting but no matter what I do it doesnt work it showed the availability 0.0%, since I have have three tomcat instances if I shutdown 2 out of 3 it does pick up one tomcat instance.

Please let me I really need this working.

Thanks
0 Kudos
9 Replies
excowboy
Virtuoso
Virtuoso

Hi,

you will have to add the tomcat servers manually and yes you will have to change the PTQL setting for every single on. Also, You will have to modify the JMX URL for every single one. Please make sure you have different JMX ports set up for every Tomcat instance.

Hope this helps,
Mirko
0 Kudos
evil_evo
Contributor
Contributor

Thank you for you reply, I have different JMS ports, I have modified the JMX URL as follows:

service:jmx:rmi:///jndi/rmi://localhost:17999/jmxrmi - app 1

service:jmx:rmi:///jndi/rmi://localhost:17099/jmxrmi - app2

however I dont understand (lack of knowledge) what to put in for ptql currently I have tried the following :

State.Name.eq=java,Args.*.ct=catalina.home,Args.*.eq=

State.Name.eq=java,Args.*.ct=Dcom.sun.management.jmxremote

again they works when I have 1 apps running but not when 2 apps running....

I have also set service_name (each apps have their own windows service name)...

Thanks again please let me know what else should I be doing ....

Can I do something like this ?


State.Name.eq=java,Args.*.ct=Dcom.sun.management.jmxremote.port=17999 (i'm sure the syntax is wrong)

Message was edited by: evil_evo
0 Kudos
excowboy
Virtuoso
Virtuoso

Please check the following link

http://support.hyperic.com/display/SIGAR/PTQL

There is a section "Identifying a Unique Java Process" which should give you all required information.
Please let me know how you get on.

Cheers,
Mirko
0 Kudos
evil_evo
Contributor
Contributor

Thank again... I ran the sigar.jar and found the following :

13144 SYSTEM 10:49 348M 69M - R 2:14 java:org.tanukisoftware.wrapper.WrapperStartStopApp
2220 evil_evo 12:16 467M 22M - R 0:0 java:org.hyperic.sigar.cmd.Runner
16576 SYSTEM 12:19 861M 227M - R 0:20 java:org.tanukisoftware.wrapper.WrapperStartStopApp
18444 SYSTEM 12:19 860M 225M - R 0:20 java:org.tanukisoftware.wrapper.WrapperStartStopApp
9224 SYSTEM 12:19 873M 223M - R 0:20 java:org.tanukisoftware.wrapper.WrapperStartStopApp

So from above I can see there are 4 java process running excluding hyperic agent java process ... so how can use this info to construct PTQL ?? Please help ... im quite lost ...


Will it be something like this :

State.Name.eq=java,Args.*.ct=org.tanukisoftware.wrapper.WrapperStartStopApp

Message was edited by: evil_evo
0 Kudos
evil_evo
Contributor
Contributor

Ok i got working I think I looked at there : https://jira.hyperic.com/browse/HHQ-4577?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-...

Where it mentioned that ptql=Pid.Service.eq=%service_name% ... so my service name had space in between so 1st I tried the following :

ptql=Pid.Service.eq="service name" - didnt work but when I change service name to have no space i.e. ptql=Pid.Service.eq=servicename - it picked up both the tomcat instances however availability still not going up ... do you know why ?

I do have the green ticket instead of red ! mark as before ... any suggestion ?
0 Kudos
excowboy
Virtuoso
Virtuoso

Well, it could be the issue you are referring to.

What version of HQ are you running ? Are you using the Open Source Edition ?Try to grab the latest build of the tomcat plugin and deploy it on your server and Agents.
http://hudson.hyperic.com/view/hq/job/hq-plugins-trunk/lastSuccessfulBuild/artifact/trunk/build/plug...

You will probably have to delete the existing Tomcat server resources and restart the Agents. A server restart is probably not required.

Cheers,
Mirko
0 Kudos
evil_evo
Contributor
Contributor

I am using 4.2 .. as 4.5 was has few bugs makes it really hard to use... yes I am using hte one source one

Can I still use the jar that you attached here with 4.2 ? Thanks
0 Kudos
excowboy
Virtuoso
Virtuoso

Looks like the bug was introduced with HQ 4.5, so it does not make sense to deploy that plugin.

I am not quite sure what the issue is. Do you see anything interesting in the log file ?

Cheers,
Mirko
evil_evo
Contributor
Contributor

Thanks I have restarted the server and agent, that resolved the issue..

Is there anyway you can help me with setting up email notification ? I have already setup application alerts, condition is if an app is unavailable for less then 5% it should fire up an email alert but it doesnt ... I have check the settings under Administration > HQ Server Settings that seems to be ok ... but it doesnt fire up any email ...

Thanks

Message was edited by: evil_evo
0 Kudos