VMware Cloud Community
syco_hyperic
Contributor
Contributor

XML plugin upgrade

Hi all,
I have created a SUN JVM 1.5 service plugin for the collection of my service mbeans.
I started to collect my service metrics but now I wanted to add a fex metrics to my Java service and I did not find a way to do it.

I have my service configured with the metrics of the first plugin version but I am not presented nor proposed with the new metrics in the GUI.

I followed standard plugin deployements:
- test plugin
- restart agent
- deploy on live server, I got exception: org.hyperic.hq.product.PluginExistsException

I thus tried to upgrade my plugin with a restart of Hyperic server.
==> this time I did not get any error message but the new metrics are still unavailable, even with new service creation.

And now I am a bit lost, is there no possibility to update existing plugins?

Thanks for your help
BR, Syco
0 Kudos
26 Replies
richtereric
Enthusiast
Enthusiast

When you execute this query:

select id, template from eam_measurement_templ where plugin = '<pluginname>'

Do you see the right values in the template field?
0 Kudos
admin
Immortal
Immortal

HI,

Did you name your service "Sun JVM 1.5" if so then you duplicated the existing service name which is why you received the PluginExistsException.
0 Kudos
syco_hyperic
Contributor
Contributor

Hi,
thanks for your answer.

No, my service is named "MyService" and is plugged on a SUN JVM server:

<service name="MyService"
server="Sun JVM" version="1.5">


btw I worked around the issue with duplicating the plugin file, changing the service name in the new one and instanciating this new service. But it is quite frustrating to have to change my whole dashboard and have to track on two services for a while where service extension seemed so simple.

BR, Syco
0 Kudos
admin
Immortal
Immortal

Hi,

Could you share the server.log so I can see the full plugin already exists exception?
0 Kudos
syco_hyperic
Contributor
Contributor

Here it is.
0 Kudos
syco_hyperic
Contributor
Contributor

server.log as attachment
0 Kudos
admin
Immortal
Immortal

Hi,

I don't see any exceptions in that server.log related to plugins already existing. Where were you seeing this exception?
0 Kudos
syco_hyperic
Contributor
Contributor

line 32, you do not see it?

"
2010-07-12 12:43:25,465 ERROR [ScannerThread] [org.hyperic.hq.product.ProductPluginManager@704] createPlugin=Sun JVM 1.5 MyService
org.hyperic.hq.product.PluginExistsException: Plugin name=Sun JVM 1.5 MyService Linux already exists
"

BR, Syco
0 Kudos
admin
Immortal
Immortal

Hi,

Sorry I was looking at the wrong server.log. Could you attach a complete server.log? I want to see what other plugins it's loading. If possible showing the full startup of the HQ Server.

Message was edited by: wschlichter
0 Kudos
syco_hyperic
Contributor
Contributor

Sorry I cannot, the file is quite big and I'd need to remove any sensitive info from it...

The other plugin it loads are two other 'SUN JVM 1.5 server" services (with different names of course). Otherwise this is the default install of HQ 4.3 package on Solaris 10.

Thanks for your help
BR, Syco

Message was edited by: syco
0 Kudos
admin
Immortal
Immortal

Hi,

I'm interested in all the lines in the server.log that would look like:

INFO [main] [org.hyperic.hq.product.server.mbean.ProductPluginDeployer@654] HQ plugin db2jdbc deployed


is there a way you could just provided that part? It will be during startup.

Message was edited by: wschlichter
0 Kudos
admin
Immortal
Immortal

Hi,

Sorry that was the wrong line. Could you only show me lines with the following in them:

org.hyperic.hq.product.server.mbean.ProductPluginDeployer

Message was edited by: wschlichter

Message was edited by: wschlichter
0 Kudos
admin
Immortal
Immortal

Hi,

I've been playing around with a basic xml plugin similar to what you've reported. I made a change and restarted and I didn't experience the same results as you.

Would you be able to share both versions of your XML plugin?

If you don't want to post them publicly I can give you my vmware.com email address and you can send them to me directly.
0 Kudos
syco_hyperic
Contributor
Contributor

Now you try to add 2 metrics for your plugin to collect (two jmx beans). Don't you catch any deployment error?

Find as attachment the plugins deployed with my server.

Note: I tried again some change with my new plugin as I forgot to mark one of my metrics as 'trendsup' same issue with this simple change and no possibility to define a new metric for it...

I remember I did something like that once with HQ 4.2, but now it seems more difficult.

Thanks for your help
BR, Syco
0 Kudos
admin
Immortal
Immortal

Hi,

What are the differences between my-prod-1.1 and my-prod plugins?

One of the most common causes for the plugin already exists is when a change is made to a plugin and before making the change a backup was created and left in the same directory. HQ will read every file in the hq-plugins directory regardless of extension and load any valid plugins.

So if you have my-prod-plugin.xml.BAK (or similar named file) it will still be read and deployed as a plugin even if there is a my-prod-plugin.xml there also.
0 Kudos
syco_hyperic
Contributor
Contributor

I checked, there is no such issue, vi does not do backup file.

As I explained, I was forced to define a new plugin defining "MyNewService" to be able to collect my java beans, this new plugin is myProd-1.1-plugin.xml.

Syco
0 Kudos
admin
Immortal
Immortal

Hi,

Could you attach the xml plugins both the first version and the changed version?

or if you don't want to post them publicly you can send them to my forum username @vmware.com (don't want to post it to avoid spam)
0 Kudos
admin
Immortal
Immortal

Hi,

I reviewed your plugins. I deployed the first plugin to a 4.3.0 server. It started up and deployed the server. I then copied the 1.1 version of the plugin over the original file and edited the service name to match that of the original. I restarted my hq server. It deployed the updated version of the plugin. This does go back to my previous question where I was seeing both plugin versions being deployed.

Could you describe the steps you took to update the plugin? Did you create a new filename for the plugin?
0 Kudos
syco_hyperic
Contributor
Contributor

Hi Wes,
thanks for spending your time on this issue.
I did try with same filename first then with a different one and neither approach worked for me.
The difference perhaps relies in the fact that the service was actually used and collecting data already when I restarted the server (?)

BR, Syco
0 Kudos