I have been working with trying to assign an interface to an Item via Templates. Would anyone have examples? When I use the <interface_ref> in a Host entry, it fails to assign properly. I have tried to build an index first using <interfaces><interface>, then referencing the <interface_ref> in the <item> without success. Imports will work fine, but the default interface is the one always selected. I have been beating my head on this for awhile and figured it might be best to just ask and see. I have found that I can import a template, then do a mass update to properly select the port. But would prefer to import a template and have the port assigned at import. Apologize if this is a redundant query, I have poked about and find that the above mentioned manual step seems commonly quoted.
Ad Widget
Collapse
Assigning Interface to JMX items
Collapse
X
-
Tags: None
-
More information. I thought I might assign values to the interface_ref based on the port, after all, it should just be a charval. But, on import, the following stanza:
<interface>
<default>0</default>
<type>4</type>
<useip>1</useip>
<ip>10.2.17.77</ip>
<dns>mygh-dca-qa02.ghc.org</dns>
<port>11555</port>
<interface_ref>if11</interface_ref>
</interface>
Becomes:
<interface>
<default>0</default>
<type>4</type>
<useip>1</useip>
<ip>10.2.17.77</ip>
<dns>mygh-dca-qa02.ghc.org</dns>
<port>11555</port>
<interface_ref>if3</interface_ref>
</interface>
This clearly shows that the interface_ref is assembled at save, and not parsed from the XML.
Comment