Hi Amit, On Tue, Dec 29, 2009 at 07:24:46PM +0530, Amit Gupta wrote: > On Tue, Dec 29, 2009 at 3:31 PM, Amit Gupta <[email protected]> wrote: > > On Mon, Dec 21, 2009 at 11:59 PM, Florian Forster <[email protected]>wrote: > >> Where: > >> > >> * The argumetn to "XPath" is an xpath which returns a base block in > >> which to look further. > >> * The arguments to "Instance" and "Values" are xpath expressions, too. > > > > Just a clarification, "Instance" here will be type_instance(s) and thus can > > be anything (not just xpath), right? > > I guess I understood why "Instance" has to be a xpath expression if "table" > is true. Instance xpath would return list of values which will be used as > type_instances for multiple type values returned by evaluating xpaths in > "Values". Is my understanding correct?.
Yep, that's right. If "Table" is false, a simple string would be sufficient as well, but changing the semantics of "Instance" depending on "Table" would be confusing -- also, people might still want to fetch the instance from the XML file. Other plugins (e.g., postgresql) handle that by introducing an option called "InstancePrefix" which expects a string as argument. That string is prepended to the type_instance. If "Table" is false, "Instance" would be optional, thus making it possible to specify a constant string as type_instance using "Instance- Prefix". Cheers, Sebastian -- Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/ Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin
signature.asc
Description: Digital signature
_______________________________________________ collectd mailing list [email protected] http://mailman.verplant.org/listinfo/collectd
