Page 1 of 1

check_snmp using tcp instead of udp

Posted: Wed May 27, 2015 1:24 am
by francoisj
My knowledge on Nagios is not yet what it should be, but I have a question that you may be able to assist.

By default snmp connects to hosts using the UDP protocol. It is however possible to use TCP by issuing the command:
snmpget tcp:hostname:port some_oid

We are required to use the TCP protocol only.

The check_snmp plugin seem to throw the tcp preamble away, although check_snmp uses snmpget to execute the command.

Is this correct? And is there a way to convince check_snmp to use tcp?

Thanks,

Francois

Re: check_snmp using tcp instead of udp

Posted: Wed May 27, 2015 9:56 am
by jdalrymple
francoisj wrote:We are required to use the TCP protocol only.
This seems a strange requirement to me. I'm unable to find documentation about how to even enable SNMP over TCP on my Cisco switch (what I use for SNMP testing) so I can even test this for you. With that said my quick answer is that it doesn't support it and probably never will unless you customize it yourself since I'm not seeing any other requests for it.

My other thought would be that for large environments you'd be at least halfing your performance since each TCP transmission would be larger and require an ack whereas the statelessness of UDP is small and simple.

If you direct me at information about how to enable SNMP over TCP on one of my Cisco devices I'll be happy to do more testing though.