Alert When Cisco Stack member goes down

Hello,

We have C3650 and C9300 switch some are in stack.
I already do a ping poll too the stack so that we can see if the hole stack goes down.
But i want also see when a member of the stack goes down.
I think that it’s possible, because if i look to a switch in LibreNMS i see: Stack State - Switch# 1, 2, 3, etc.
But how can put this sensor in a Alert rule to see when a device goes down?

Kind regards,

Jorg

You can setup syslog and then set up an alert for that stack member syslog message.

I looked at this a few months ago when we lost a member out of a 2960X stack then got pulled away to other jobs. Looking at the data I took then there are a few sensor values LibreNMS polls in which can be used; the relevant values can all be found in /opt/librenms/includes/discovery/sensors/state/cisco.inc.php

I haven’t tested yet due to COVID working-from-home, but this would work for the values seen on my 2960X stack during and after stack member failure:

macros.device_up = 1 AND sensors.sensor_type = "cswSwitchState" AND sensors.sensor_prev = 4 AND sensors.sensor_current = 11

You can also compare current and previous values for sensor_types:

  • cswRingRedundant (1 = true, 2 = false)
  • cswSwitchRole (1 - master, 2 = member, 3 = notMember)

The above all needs refined - I’ll update when I’ve done more work on this.

1 Like

Hello,

Thank you both for your reply.
@alanbboyd i will test your rule in my lab today or tomorrow. After testing i let you now what the output is.

Kind regards, Jorg

1 Like

Hello,

Sorry for the waiting but i fix this problem as follow.

macros.devices_up = yes
sensors.sensor_type = cswSwitchState
sensors.sensor_prev = 4
sensors.sensor_current = 0

With this your stack device will give a alert if one of the switches in stack goes down.

Kind regards

Jorg

This topic was automatically closed 186 days after the last reply. New replies are no longer allowed.