Re: SNMPd can register from one keepalived only

Quentin Armitage <[email protected]>
Newsgroups gmane.linux.keepalived.devel
Organization The Armitage family
Message-ID <[email protected]>
On Tue, 2016-07-19 at 08:04 +0200, Vincent Bernat wrote:

> ❦ 19 juillet 2016 00:44 CEST, Quentin Armitage <[email protected]> :
> 
> > By default, keepalived communicates with snmpd via the Unix domain
> > socket /var/agentx/master. Since the keepalived instances are already
> > in separate network namespaces, it might be simplest to specify:
> > snmp_socket udp:127.0.0.1:161
> > in the global section of the keepalived configurations 
> 
> I doubt that a master agent will listen to subagent on the main
> socket. The proper port for AgentX protocol is 705 (and should be
> enabled in snmpd.conf as well).
> 

Thanks for the correction. When I configure "snmp_socket
udp:127.0.0.1:705" in keepalived.conf, and "agentxsocket
udp:127.0.0.1:705" in snmpd.conf the initialisation seems to work fine
and there is udp traffic to/from port 705. However, if I try using
snmpwalk to get the snmp data, there is no traffic from udp port 705,
and snmpwalk reports that it times out. Is there something that
keepalived is not setting that is needed for snmpd to talk back to
keepalived?
 

> > An alternative would be to use different unix domain sockets, e.g.
> > /var/agentx/master1 and /var/agentx/master2 (specified with the -x
> > option to snmpd) and configured in keepalived with "snmp_socket
> > unix:/var/agentx/master1" etc in the global section of the keepalived
> > configs.
> >
> > A further option might be to run each instance of snmpd in a separate
> > IPC namespace, and then use nsenter to run the keepalived processes in
> > the same IPC namespaces as the snmpd processes.
> 
> I think that IPC namespaces doesn't cover unix sockets, only SysV IPC
> (semaphores, shared memory and message queue).


So at the moment probably the best solution is it have one
snmpd/keepalived pair configured to use unix:/var/agentx/master (the
default), and the other to use unix:/var/agentx/master1. I have tested
this latter configuration with one snmpd and one keepalived and it
appears to work.

Quentin Armitage

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev

_______________________________________________
Keepalived-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/keepalived-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.