Quote from: sperlm on June 07, 2013, 01:49:48 PM
Thanks for the reply, filters work exactly as I need now.
Few clarifications:
a)
In my previous question 4) I was referring to the wiki information under Templates section "Macros in template items"QuoteYou can use various macros in name, description, and instance fields of template DCI.namely: script:name - String returned by script name. Script should be stored in script library (accessible via Configuration -> Script Library). Inside the script, you can access current node's properties via $node variable.
To put the question short - where exactly it can be used?
(as the wiki information does not make sense to me - DCI form has no "name", macro {instance} can be used in the Parameter on the other hand)
Macros in templates expands when template being applied to node. It is useful when you want to put some node-specific information during template apply (node IP address for example) into parameter name or description. "name" was the old universal name for what you now see as "Parameter" for agent DCI, "OID" for SNMP DCI, etc. It is still used in some places.
Quote from: sperlm on June 07, 2013, 01:49:48 PM
b)
Performance tab - a little insight on this would be appreciated.
(did not find any on wiki or forums and this looks like it can solve my problem with viewing the collected data, namely the automated ones)
Performance tab shows line charts with last hour data for all DCIs marked to be shown on performance tab. You can enable DCI for performance tab in DCI properties, on "Performance Tab" page.
Quote from: sperlm on June 07, 2013, 01:49:48 PM
b)
If dci and node parameters are global, does it mean we can use class reference attributes like $node->snmpOID anywhere?
I am already filtering nodes for templates with this functionality so I assume it is possible.
Yes, all scripts related to nodes have $node variable set, and all scripts related to DCIs have $dci variable set.
Quote from: sperlm on June 07, 2013, 01:49:48 PM
c)
I also tried to use the same script functions from instance discovery in automatic apply rules for templates but could get results only with direct scripts, when I try to do the same thing with use/script it does nothing (or I was not able to test it properly).
There are no difference between automatic apply rule script an any other script regarding library use. Most likely you've make some mistake. Please post your scripts here.
Best regards,
Victor