Wrong interface speed in DCI threshold script
-
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 = 0but 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

-
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login