check_snmp basic problem

Hi all,

I have a problem with nagios check_snmp plugin. I’m probing a cisco switch for port status. The command:

returns SNMP OK - 2 | RFC1213-MIB::ifOperStatus.10101=2
when i understand that it should not match the result “2” with the regex “1” (-r 1).
Whatever regex i put, the same happens. Ex:

returns

What am i doing wrong? What i want is the service check to become ‘Green’ when the port is up and ‘Red’ on any other status.

Thanx
Spiros

Nagios Core Version 3.2.3