On Mon, Dec 21, 2009 at 11:59 PM, Florian Forster <span dir="ltr"><<a href="mailto:octo@verplant.org">octo@verplant.org</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Amit,<br>
<div><br>
On Mon, Dec 21, 2009 at 02:11:01PM +0530, Amit Gupta wrote: <br></div></blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
> > > I have been working on curl_xml plugin. The idea of this plugin is<br>
> > > to query the xml data using the curl library and parse it<br>
> > > according to the user's configuration using libxml2. I have worked<br>
> > > on the top of curl-json plugin code and got this plugin to work.<br>
<br>
</div>Sounds interesting :) What do you plan to use this plugin for?<br></blockquote><div><br>Sun Java System Web Server 7.0. This server exposes monitoring data in xml format via a URL and thus, the need of this plugin.<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
> > > I am proposing the following configuration for curl_xml:<br>
> > ><br>
> > > <Plugin curl_xml><br>
> > > <URL "[some url]"><br>
> > > Instance "<instance-name>"<br>
> > > <xpath "<xpath1>"><br>
> > > Instance "<instance-name>" (Optional)<br>
> > > Type "<type>"<br>
> > > </xpath><br>
> > > <xpath "<xpath2>"><br>
> > > Instance "<instance-name>" (Optional)<br>
> > > Type "<type>"<br>
> > > </xpath><br>
> > > </URL><br>
> > > <URL .....><br>
> > > ......<br>
> > > </URL><br>
> > > </Plugin><br>
<br>
</div>Looks okay to me. However, I'd expect XML to contain a lot of tabular<br>
data in general. Wouldn't it make sense to make it possible to configure<br>
columns for instance name and values. Something like:<br>
<br>
<XPath "/path/to/table[class=magic]"> # I don't know the XPath<br>
Instance "tr/th[class=type_of_magic]" # syntax, so I'm making<br>
Values "tr/td[class=magic_level]" # something up here.<br>
Type "magic_level"<br>
Table true<br>
</XPath><br></blockquote><div> </div><div>Looks good to me. I will try to implement this configuration and re-post the updated plugin.<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Where:<br>
<br>
* The argumetn to "XPath" is an xpath which returns a base block in<br>
which to look further.<br>
* The arguments to "Instance" and "Values" are xpath expressions, too.<br></blockquote><div> </div><div>Just a clarification, "Instance" here will be type_instance(s) and thus can be anything (not just xpath), right? <br>
<br>Regards<br>Amit<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Regards,<br>
-octo<br>
<br>
[0] <<a href="http://collectd.org/wiki/index.php/Roadmap#cURL-XML_plugin" target="_blank">http://collectd.org/wiki/index.php/Roadmap#cURL-XML_plugin</a>><br>
<font color="#888888">--<br>
Florian octo Forster<br>
Hacker in training<br>
GnuPG: 0x91523C3D<br>
<a href="http://verplant.org/" target="_blank">http://verplant.org/</a><br>
</font><br>-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.6 (GNU/Linux)<br>
<br>
iD8DBQFLL753Hdggu3Q05IYRApOzAJ9M/xrz7O71WzaGjXLaxcGW+yEcNQCeLTho<br>
STt3An3XvyTdiRy3mduVrDg=<br>
=C15x<br>
-----END PGP SIGNATURE-----<br>
<br></blockquote></div><br>