check_snmp_int for multiple interfaces (regexp)

I was using “Giga*.2[345]” as a paramter for check_snmp_int to check if interface Gi1/0/23-25 and Gi2/0/23-25 were up on a 3com 5500 stack but 1 of the cables moved from gi2/0/24 to gi2/0/28 as it changed from copper to fiber.

In the best case i want to monitor the following as a single service:
Gi1/0/12
Gi1/0/23
Gi1/0/24
Gi1/0/25

Gi2/0/12
Gi2/0/23
Gi2/0/25
Gi2/0/28

My regexp is horrid, but is there any way to do this in a single go ? Or should i make a whole lot of services for the different ports.

i’d go for a singel check for each port… or think about writing a shell script which checks all ports and returns OK if all 8 are up or whtever combination you like :slight_smile:

are the ports trunked (via LACP or whatever)? if yes you can proably check the whole trunks integrity in SNMP via a different interface name.