We use this script for interface load threshold
dci_instance = SplitString($dci->instance, ";");
node_interface_array = GetNodeInterfaces($node);
node_interface = node_interface_array[dci_instance[0]];
interface_speed = node_interface->speed;
trace(0, "DCI instance:" . dci_instance[0] .
" threshold on " . $node->name .
" : " . ($2 * interface_speed) . "<=" . $1 .
" = " . ($2 * interface_speed)<=$1);
if (($2 * interface_speed) <= $1)
return true;
return false;
some interfaces have wrong speed = 0.000000
2019.03.25 13:02:33.767 *I* DCI instance:11 threshold on 34760 : 750000000.000000<=11931472 = 0
2019.03.25 13:02:33.787 *I* DCI instance:12 threshold on 34760 : 0.000000<=366424 = 1
2019.03.25 13:02:33.807 *I* DCI instance:14 threshold on 34760 : 0.000000<=8077080 = 1
2019.03.25 13:02:33.827 *I* DCI instance:18 threshold on 34760 : 750000000.000000<=280684232 = 0
but in database and console has correct speed:
mysql> SELECT `id`, `speed` FROM interfaces WHERE `node_id` = 34760 AND `if_index` IN (12, 14);
+-------+------------+
| id | speed |
+-------+------------+
| 34772 | 1000000000 |
| 34774 | 1000000000 |
+-------+------------+
2 rows in set