Page MenuHomePhabricator

Create alerting for saturation on sub-rated interfaces
Closed, ResolvedPublic

Assigned To
Authored By
cmooney
Sep 12 2024, 12:40 PM
Referenced Files
F95014173: image.png
Tue, Jul 21, 8:51 AM
F57502896: image.png
Sep 12 2024, 1:02 PM
Restricted File
Sep 12 2024, 12:40 PM

Description

On several occasions (T374608, T369025, T373639) we have had incidents which result in us saturating our link from codfw to eqsin, however we have not received any alerts when the circuit was maxed out and dropping packets.

The reason for this is unlike most of our transport circuits this is a sub-rated one, i.e. the carrier has a 4Gb/sec limit on the link so we saturate long before our normal alert (utilisation/link_speed) would fire.

We need to work out a good way to do this. The sub-rated speed is represented in Netbox for the link on the z-end termination (example). So in theory we could get this value and compare the usage to it, and alert on the percentage of the actual limit that way.

Another way may just be to alert on outbound tail drops on the router port, for example in the most recent issue:

image.png (1,068×598 px, 107 KB)

These stats are coming from gnmic, but we also could use the 'discards' counter from LibreNMS for that. LibreNMS may also count discards for other reasons such as errors but I think they mostly reflect tail drops. We already have some rules in place for those, but we don't alert as we have frequent discards on our older switch models due to limited buffers.

Event Timeline

cmooney triaged this task as Medium priority.

Short term I think if you add [4Gbps] to the interface description, LibreNMS will parse it and see the max speed to 4Gbps and calculate % utilisation based on that.

Long term we should look at the full alerting strategy through Prometheus.

Short term I think if you add [4Gbps] to the interface description, LibreNMS will parse it and see the max speed to 4Gbps and calculate % utilisation based on that.

Ah I'd missed that, TIL. I checked the docs and you're right (think it needs to be 'Gbit' not 'Gbps' based on the examples). Let's see how it goes.

Long term we should look at the full alerting strategy through Prometheus.

Yeah. I made this a child task of the gnmic one now. It doesn't need to be done as part of the current work (esp if the LibreNMS one works) but may as well group them I think.

Short term I think if you add [4Gbps] to the interface description, LibreNMS will parse it and see the max speed to 4Gbps and calculate % utilisation based on that.

Ah I'd missed that, TIL. I checked the docs and you're right (think it needs to be 'Gbit' not 'Gbps' based on the examples). Let's see how it goes.

This doesn't seem to have worked for some reason, we had some saturation since but from what I can tell LibreNMS didn't alert, nor can I see anywhere in the GUI it is treating this int as 6Gb. Worth a shot though.

For the record, as mentioned on IRC, if the description parsing doesn't work, we can also set it in the UI. For example in https://librenms.wikimedia.org/device/device=159/tab=edit/section=ports/

I have set the bandwidth to '6000000000' either side manually in the UI so let's see how it goes.

We now have the CoreRouterInterfaceDropPercent alerts, which to an extent covers this scenario. It's not exactly the same, but we are in a much better position than before we had that.

However with new transport coming online from Arelion this problem overall is probably more important than it was, so we need to decide if that's enough.

ayounsi moved this task from Backlog to This quarter on the netops board.

Change #1311802 had a related patch set uploaded (by Ayounsi; author: Ayounsi):

[operations/puppet@production] gNMI: override state/high-speed for sub-rated interfaces

https://gerrit.wikimedia.org/r/1311802

As said on IRC, dunno if I'm opening some kind of pandora box by using starlark/python, but that seems like a good approach to me!

To be tested if we all agree, while keeping an eye on performances.

Change #1312476 had a related patch set uploaded (by Ayounsi; author: Ayounsi):

[operations/software/homer/deploy@master] Add subrated circuit rate to interface descriptions

https://gerrit.wikimedia.org/r/1312476

Changes for 1 devices: ['cr2-drmrs.wikimedia.org']

[edit interfaces et-0/0/0]
-   description "Transport: Arelion (IC-xxx) {#20260601}";
+   description "Transport: Arelion (IC-xxx) [20Gbps] {#20260601}";

Change #1312476 merged by Ayounsi:

[operations/software/homer/deploy@master] Add subrated circuit rate to interface descriptions

https://gerrit.wikimedia.org/r/1312476

Manually tested in ulsfo and that seems to work as expected:

image.png (1,842×738 px, 72 KB)

Change #1311802 merged by Ayounsi:

[operations/puppet@production] gNMI: override state/high-speed for sub-rated interfaces

https://gerrit.wikimedia.org/r/1311802