Hello!
Recently I was trying to create and implement my custom device template. The problem is that I need to create sensor with multiple channels in it. Some of this channels must recieve Integer as result of SNMP_Query and some of them recieve String.
Is there some method to define SNMP_Custom_String_Lookup in a device template? Or there is another method to combine in one sensor channels with different type of result value?
I just tryed to modify a custom CheckPoint DeviceTemplate, cause in a sensor HA State there is no information about State of this node(Active or Standby), unfortunately CheckPoint make this value as String.
Thanx in advance)
Article Comments
Attention: This article is a record of a conversation with the Paessler support team. The information in this conversation is not updated to preserve the historical record. As a result, some of the information or recommendations in this conversation might be out of date.
Thanks Benjamin.
Is it possible to define SNMP_String_Lookup just as a new sensor in device template at least? I`ve already tryed this, but it partially worked for me.
When I`m applying a DeviceTemplate with SNMP_String_Lookup, the PRTG create additional value channel(with regular snmp behavior when it wait an integer value in response), but it create a right channel simultaniously.
Is it bug, or just impossible to define SNMP_String_Lookup in DeviceTemplate at all?
Thanx in advance
Apr, 2018 - Permalink
It's not impossible.
Can you open a support ticket and send me the device template?
Apr, 2018 - Permalink
So, I found somw workaround for DeviceTemplate witn SNMP_String_Lookup in it. We just have to define name of the channel as default("Value")
We lost ability to set custom channel name, but we can define SNMP_String_Lookup in device_template now.
<?xml version="1.0" encoding="UTF-8"?>
<devicetemplate id="custom" name="HAMODE_FW22" priority="1">
<check id="ping" meta="ping"/>
<check id="snmp" meta="snmp" requires="ping"/>
<check id="HA_Mode" meta="snmp" requires="snmp">
<metadata>
<oid>
1.3.6.1.4.1.2620.1.5.6.0
</oid>
</metadata>
</check>
<create id="_snmp_HA_Mode" kind="snmpcustomlookup" requires="HA_Mode" displayname="HA: Mode">
<createdata>
<tags>
snmpcustomsensor
</tags>
<priority>
3
</priority>
<comments/>
<primarychannel>
2
</primarychannel>
<position>
10
</position>
<inherittriggers>
<flags>
<inherited/>
</flags>
<cell>
1
</cell>
</inherittriggers>
<stack>
0
</stack>
<usesingleget/>
<oid>
1.3.6.1.4.1.2620.1.5.6.0
</oid>
<lookups>
<cell col="0">
prtg.customlookups.checkpoint.hastate
</cell>
<cell col="1">
prtg.customlookups.checkpoint.hastate
</cell>
</lookups>
</createdata>
<channeldata primary="2" modulo="0" fix="-1" sum="-1" v="1">
<downchannel id="-4">
<data>
<axismode>
0
</axismode>
<colmode>
0
</colmode>
<decimaldigits>
2
</decimaldigits>
<decimalmode>
0
</decimalmode>
<kind>
Percent
</kind>
<limitmode>
0
</limitmode>
<linewidth>
1
</linewidth>
<mode>
Absolute
</mode>
<name>
Downtime
</name>
<namereadonly>
0
</namereadonly>
<nostack>
0
</nostack>
<percent>
0
</percent>
<show>
1
</show>
<showchart>
1
</showchart>
<speedsize>
None
</speedsize>
<speedtime>
None
</speedtime>
<spikemode>
0
</spikemode>
<volumesize>
None
</volumesize>
</data>
</downchannel>
<list>
<channel id="2">
<data>
<avgmode>
0
</avgmode>
<axismode>
0
</axismode>
<colmode>
0
</colmode>
<decimaldigits>
2
</decimaldigits>
<decimalmode>
0
</decimalmode>
<desiredlookupvalue>
0
</desiredlookupvalue>
<id>
2
</id>
<kind>
Custom
</kind>
<limitmode>
0
</limitmode>
<linewidth>
1
</linewidth>
<lookupcrc>
2851415454
</lookupcrc>
<mode>
Absolute
</mode>
<name>
Value
</name>
<namereadonly>
1
</namereadonly>
<nostack>
0
</nostack>
<percent>
0
</percent>
<show>
1
</show>
<showchart>
1
</showchart>
<speedsize>
None
</speedsize>
<speedtime>
None
</speedtime>
<spikemode>
0
</spikemode>
<valuelookup>
prtg.customlookups.checkpoint.hastate
</valuelookup>
<volumesize>
None
</volumesize>
</data>
</channel>
</list>
</channeldata>
<triggerdata/>
</create>
</devicetemplate>
Apr, 2018 - Permalink
Unfortunately we can't work with string values like that. We have an SNMP Custom String sensor, but it will take one string as a return value. This is all we can do with string values at this time.
Mar, 2018 - Permalink