Ad Widget

Collapse

List of serial numbers in a switch stack with discovery, in one single item

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mortomanos
    Junior Member
    • Sep 2025
    • 1

    #1

    List of serial numbers in a switch stack with discovery, in one single item

    I want to have a single item with all the serial numbers of switches in a switch stack, which is discovered by a Cisco iOS template. If the switch is in a stacked configuration, the serial numbers are auto-discovered in system.hw.serialnumber[entPhysicalSerialNum.X] where X represents more or less the internal number of the switch in the stack.

    Now I wanted to use a Calculated item (in another template) with last_foreach to get an Array of all the serial numbers, and somehow concatenate those. But as I see in the documentation all foreach functions need an aggregate function (where there is no concatenation function), and the normal javascript item does not allow foreach functions which would be helpful.

    I already used some sum(last_foreach()) construct already in another item which represents e.g. the total consumed PoE power in a switch stack, that's why I tried to use this way.

    Do you have any idea how I can achieve a comma separated list of the serial numbers?

    Zabbix Server is 7.4.2
Working...