check_snmp using tcp instead of udp

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
francoisj
Posts: 1
Joined: Wed May 27, 2015 12:53 am

check_snmp using tcp instead of udp

Post 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
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: check_snmp using tcp instead of udp

Post 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.
Locked