We have had great success in making custom device templates that add only the sensors, and exact configurations we're looking for. I find this automation excellent as it avoids the possibility of miss-configuration.
However, I am thus far unable to set the Primary Channel via a node in <createdata>. In this case, I am trying to setup a custom template for Dell EqualLogics, and we hope to add threshold notifications via Library (which can only apply to the Primary Channel -- hence my desire). As suggested by https://helpdesk.paessler.com/en/support/solutions/articles/70882-can-i-use-a-generic-meta-scan-for-any-sensor-type I have found the parameter primarychannel via source of an existing sensor, but unfortunately no variation of possible values I have tried seems to have the desired outcome.
To illustrate, here is a snippet of my template:
<create id="equallogicmember" kind="snmpdellequallogicmemberhealth" meta="snmpdellequallogicmemberhealthscan" requires="equallogic">
<createdata>
<tags>
test_tag
</tags>
<primarychannel>5|Storage Free % (%)|</primarychannel>
</createdata>
</create>
The value 5|Storage Free % (%)| is from the source of a working sensor, and I have tried variations of 5|Storage Free % (%)|,5, and Storage Free % (%) without success. Note that the test_tag is created in this example, so at least part of the createdata node does appear to be working as intended.
Is it possible to set the Primary Channel via template, and if so, what is the syntax?
Many thanks in advance!
Article Comments
Hello Kevin, we appreciate your contact and inquiry.
I'm pleased to hear about your positive experience with device templates. About what you want to achieve, the primary channel is set a little bit below, under <create> within the <channeldata>:
[...]
<check id="snmp" meta="snmp" requires="ping"/>
<check id="equallogic" meta="snmp" requires="snmp">
<metadata>
<oid>
1.3.6.1.4.1.12740.1.1.1.1.2.1
</oid>
</metadata>
</check>
<create id="equallogicmember" kind="snmpdellequallogicmemberhealth" meta="snmpdellequallogicmemberhealthscan" requires="equallogic">
<channeldata primary="14" modulo="0" fix="-1" sum="-1" v="1">
<downchannel id="-4">
<list>
<channel id="1">
[...]
<channel id="22">
</list>
</channeldata>
<triggerdata/>
</create>
</devicetemplate>
Right below the <create> you'll locate this line:
<channeldata primary="14" modulo="0" fix="-1" sum="-1" v="1"> |
This is used to set the primary channel in the device template, and should fit your needs. There is however one downside:
While this may work for "Storage Free %" it may not work for other channels. From the 10th channel onward the sensor uses dynamic data, so the numbering of channels will vary accordingly to the number of relevant properties (Temperature Control, FANs, etc) entries. But agani, for "Storage Free %" this shouldn't be an issue.
The primary channel will be set when you create a device template for this sensor type using the "Create Device Template" option in the web-interface.
Also, since you're interested in templates, the following may interest you:
Best Regards,
Luciano Lingnau [Paessler Support]
May, 2017 - Permalink
Hello Kevin, we appreciate your contact and inquiry.
I'm pleased to hear about your positive experience with device templates. About what you want to achieve, the primary channel is set a little bit below, under <create> within the <channeldata>:
Right below the <create> you'll locate this line:
This is used to set the primary channel in the device template, and should fit your needs. There is however one downside:
While this may work for "Storage Free %" it may not work for other channels. From the 10th channel onward the sensor uses dynamic data, so the numbering of channels will vary accordingly to the number of relevant properties (Temperature Control, FANs, etc) entries. But agani, for "Storage Free %" this shouldn't be an issue.
The primary channel will be set when you create a device template for this sensor type using the "Create Device Template" option in the web-interface.
Also, since you're interested in templates, the following may interest you:
Best Regards,
Luciano Lingnau [Paessler Support]
May, 2017 - Permalink