VMware Cloud Community
deeboh
Enthusiast
Enthusiast

example plugin problems

Hey folks, there is an example plugin i'm trying to modify for my environment, but as a test I simply used the existing content. http://support.hyperic.com/confluence/display/DOCSHQ30/Protocol+Monitor+Plugin

Assume i've read all the documentation and I understood it
Assume i've placed the files in the right direcoties
Assume i've properly deployed the plugin.xml file in my agent

why would I be getting this error below which repeats
2007-04-19 11:11:40,604 ERROR [ScheduleThread] Invalid Metric requested: Incorrect response from monitored server

the agent starts normally but I don't see any indication that the values are being tracked.
I don't even know how to display the plugin information if it did deploy properly...

Assuming I read all the documentation:)...

Thanks in advance,

Deeboh
0 Kudos
3 Replies
deeboh
Enthusiast
Enthusiast

I figured out the steps to get the example plugin deployed (I finally read the instructions), howver I have a quesiton about URL Paths within the Metric Tag.

I have a bunch of statements like this in the example plugin i modified and the samem for port 80.
template="HTTP:hostname=10.10.55.2/docs/root/watchout.htm?examplecode=2,port=443,ssl=true:Availability"

Judging by the errors i'm getting from the log file the agent doesn't like the notation i'm providing (which includes the path - see the trace below).
2007-04-27 08:59:04,883 ERROR [Collector] Error running HTTP collector: java.lang.NullPointerException
java.lang.NullPointerException
at org.hyperic.hq.plugin.netservices.NetServicesCollector.getHostAddress(NetServicesCollector.java:256)
at org.hyperic.hq.plugin.netservices.NetServicesCollector.netstat(NetServicesCollector.java:91)
at org.hyperic.hq.plugin.netservices.HTTPCollector.collect(HTTPCollector.java:356)
at org.hyperic.hq.product.Collector.run(Collector.java:477)
at org.hyperic.hq.product.Collector.check(Collector.java:575)
at org.hyperic.hq.product.Collector.check(Collector.java:609)
at org.hyperic.hq.product.CollectorThread.run(CollectorThread.java:89)
at java.lang.Thread.run(Unknown Source)


so my question is, how do I enter a path for a host in the plugin?

this is what I have...

<metric name="Basic SSL"
template="HTTP:hostname=10.10.55.2/docs/root/watchout.htm?examplecode=2,port=443,ssl=true:Availability"
units="percentage"/>

or should the syntax be...

<metric name="Basic SSL"
template="HTTP:hostname=10.10.55.2,port=443,ssl=true:Availability"
path="/docs/root/watchout.htm?examplecode=2"
units="percentage"/>

Thanks,

Deeboh
0 Kudos
deeboh
Enthusiast
Enthusiast

Oh this is getting better. I've noticed in the built-in http url protocol monitor there is a checkbox which allows the agent to follow a redirect. Is there some notation for the XML Plugin which triggers the same thing?

this would be of great help, since most of my URL's have javascript redirects buildin.

thanks,

Deeboh
0 Kudos
dougm_hyperic
VMware Employee
VMware Employee


All of the properties you see in the UI have a property name (e.g. 'follow') and a description (e.g. "Follow Redirects").  The property names are used in the metric template, so for  this you'd just add follow=true.
You can also see how the templates look in the log/agent.log if you turn on logLevel=DEBUG in agent.properties.  Or just run the following from the agent directory to see what the template format looks like:

java -jar pdk/lib/hq-product.jar -Dplugins.include=netservices -t HTTP -m metric -a translate

It's also much easier to test your plugin from the command line to verify it's working as expected before setting up within HQ:

On Apr 27, 2007, at 3:48 PM, deeboh wrote:

Oh this is getting better. I've noticed in the built-in http url protocol monitor there is a checkbox which allows the agent to follow a redirect. Is there some notation for the XML Plugin which triggers the same thing?

this would be of great help, since most of my URL's have javascript redirects buildin.

thanks,

Deeboh