- Had found 1 issue in probes.
<?xml version="1.0" ?>
<dude version="3.6">
<Probe>
<sys-type>13</sys-type>
<sys-id>20437</sys-id>
<sys-name>If_7_out_rate</sys-name>
<typeID>8</typeID>
<functionAvailable>If_7_out_rate() > -1</functionAvailable>
<functionError>if(If_7_out_rate() = -1,"SNMP Read Error",if(If_7_out_rate() > 1000000,"",concatenate("Warning Low inbound traffic rate on interface 7 the current rate = ",If_7_out_rate()," Bits per second")))</functionError>
<functionValue>If_7_out_rate()</functionValue>
<functionUnit>Bits/s</functionUnit>
</Probe>
</dude>
Need to change description in function error from inbound to outbound (copy/paste issue)
must be
<?xml version="1.0" ?>
<dude version="3.6">
<Probe>
<sys-type>13</sys-type>
<sys-id>20437</sys-id>
<sys-name>If_7_out_rate</sys-name>
<typeID>8</typeID>
<functionAvailable>If_7_out_rate() > -1</functionAvailable>
<functionError>if(If_7_out_rate() = -1,"SNMP Read Error",if(If_7_out_rate() > 1000000,"",concatenate("Warning Low outbound traffic rate on interface 7 the current rate = ",If_7_out_rate()," Bits per second")))</functionError>
<functionValue>If_7_out_rate()</functionValue>
<functionUnit>Bits/s</functionUnit>
</Probe>
</dude>
- lebowski
good
if(oid(“1.3.6.1.2.1.2.2.1.10.7”),round(rate(oid(“1.3.6.1.2.1.2.2.1.10.7”)*8)),0)
is not rely good, when traffic is very low the system may say “SNMP error” instead of Low traffic rate = 0. And, also rate function returns 0 while establishing baseline, so probe will return SNMP error instead 0.
- When using Dude 4.0 you must change functions in order it to work because rate function had changed it’s behavior.
<?xml version="1.0" ?>
<dude version="4.0beta2">
<Function>
<sys-type>57</sys-type>
<sys-id>7765875</sys-id>
<sys-name>If_7_in_rate</sys-name>
<code>if(oid("1.3.6.1.2.1.2.2.1.10.7"),round(rate(diff32(oid("1.3.6.1.2.1.2.2.1.10.7"))*8)),-1)</code>
<descr>**** The inbound rate on interface number 7</descr>
</Function>
</dude>
<?xml version="1.0" ?>
<dude version="4.0beta2">
<Function>
<sys-type>57</sys-type>
<sys-id>7765878</sys-id>
<sys-name>If_7_out_rate</sys-name>
<code>if(oid("1.3.6.1.2.1.2.2.1.16.7"),round(rate(diff32(oid("1.3.6.1.2.1.2.2.1.16.7"))*8)),-1)</code>
<descr>**** The outbound rate on interface number 7</descr>
</Function>
</dude>
NOTE: we use diff32 function because 1.3.6.1.2.1.2.2.1.10.7 is 32 bit counter, we should use diff64 when working with 64 bit counters.