description = "Monitored port is down (state={{$value}})",
}
That will alert if a port is in configured for link status traps any state is other than up[0]. Note that I put the ifOperStatus first, as the left most metric value is passed as $value to the template.
[0]:
ifOperStatus OBJECT-TYPE
SYNTAX INTEGER {
up(1), -- ready to pass packets
down(2),
testing(3), -- in some test mode
unknown(4), -- status can not be determined
-- for some reason.
dormant(5),
notPresent(6), -- some component is missing
lowerLayerDown(7) -- down due to state or
-- lower-layer interface(s)
}