returns multiple interfaces

I’m using the check command with some Cisco switches and I stumble across a weird issue… If I check for instance a interface with the name “TwentyFiveGigE2/0/2” I get all the interfaces 2/0/2x returned also… So the plugin returns for instance “TwentyFiveGigE2/0/20” and “TwentyFiveGigE2/0/21”.
Which in result get critical because those are down/not used.

I use this commandline:
/usr/lib/nagios/plugins/' '--64bits' '-2' '-B' '-C' 'xxxx' '-H' '' '-M' '-Y' '-c' '0,600' '-d' '300' '-e' '-f' '-k' '-n' 'TwentyFiveGigE2/0/2' '-t' '5' '-w' '300,400'

Does anyone else get this? I haven’t seen it on Gigabit Eth ports. So maybe I have something wrong in the arguments ?

According to, this is a regex so try ^TwentyFiveGigE2/0/2$$.

-n, --name=NAME
   Name in description OID (eth0, ppp0 ...).
   This is treated as a regexp : -n eth will match eth0,eth1,...
   Test it before, because there are known bugs (ex : trailling /)

BTW the $$ is needed as a literal $ needs to be escaped in the Icinga2 DSL.

1 Like

Aha… And why I see it now is that due to the fact that it’s a regex it actually returns more interfaces…
It works now… Thanks!!!

1 Like