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?
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: