Dear Users,

I’m a newbie and I’m trying to start monitoring, using SNMP, 2 different 
applications (let’s say Application1 and Application2) that are running on the 
same host.

1) Following the official instructions, in order to monitor the Application1, I 
have to add these lines in /etc/snmp/snmpd.conf

master agentx
AgentXSocket /var/agent/master
AgentXPerms 777 777
AgentXSocket tcp:localhost:705
trap2sink localhost
agentXTimeout 60
agentXRetries 10
view systemview included .1.3.6.1.4.1.2.6.212
view systemview included .1.3.6.1.4.1.2.6.246

Application1 monitoring is running as expected and I can successfully execute 
snmpwalk tests.

2) Following the official instructions, in order to monitor the Application2, I 
have to add these lines in the same /etc/snmp/snmpd.conf file:

master agentx
AgentXSocket /var/agent/master
trap2sink localhost
agentXTimeout 60
agentXRetries 10
view systemview included .1.3.6.1.4.1.2.6.212
view systemview included .1.3.6.1.4.1.2.6.246

In this case, Application2 status can't be monitored using snmpwalk because, by 
default, Application2 sends traps to the trap manager only when a fail or event 
occurs.
Moreover, Application2 just uses the snmp client library to connect to the 
master agent default port. For this reason, I’m detecting this error in the 
message log file:

May 17 10:44:23 das1 net-snmp[315314]: Warning: Failed to connect to the agentx 
master agent ([NIL]):

3) In order to try to fix this issue, after some investigation on google, I 
added this line to /etc/snmp/snmp.conf file:

defaultport  705

PROBLEM: the "workaround” seems to be ok, but, if I try to restart snmpd 
service, I receive the following error: May 21 19:40:30 das2 snmpd[335178]: 
[init_smux] bind failed: Address already in use

[root@das2 snmp]# cat snmp.conf 
defaultport  705
mibdirs +/usr/share/snmp/mibs
mibs +GPFS-MIB
mibs +IBMSA-MIB

[root@das2 snmp]# service snmpd restart
Redirecting to /bin/systemctl restart snmpd.service

[root@das2 snmp]# service snmpd status
Redirecting to /bin/systemctl status snmpd.service
● snmpd.service - Simple Network Management Protocol (SNMP) Daemon.
   Loaded: loaded (/usr/lib/systemd/system/snmpd.service; enabled; vendor 
preset: disabled)
   Active: active (running) since Fri 2021-05-21 19:40:30 CEST; 3s ago
 Main PID: 335178 (snmpd)
   Memory: 5.5M
   CGroup: /system.slice/snmpd.service
           └─335178 /usr/sbin/snmpd -LS0-6d -f

May 21 19:40:30 das2 systemd[1]: Starting Simple Network Management Protocol 
(SNMP) Daemon....
May 21 19:40:30 das2 snmpd[335178]: Duplicate IPv4 address detected, some 
interfaces may not be visible in IP-MIB
May 21 19:40:30 das2 snmpd[335178]: Turning on AgentX master support.
May 21 19:40:30 das2 snmpd[335178]: [init_smux] bind failed: Address already in 
use
May 21 19:40:30 das2 snmpd[335178]: NET-SNMP version 5.7.2
May 21 19:40:30 das2 systemd[1]: Started Simple Network Management Protocol 
(SNMP) Daemon..

If I remove the “defaultport” option, snmpd service starts regularly (but I 
can’t start monitoring Application2)

[root@das2 snmp]# cat snmp.conf 
mibdirs +/usr/share/snmp/mibs
mibs +GPFS-MIB
mibs +IBMSA-MIB

[root@das2 snmp]# service snmpd restart
Redirecting to /bin/systemctl restart snmpd.service

[root@das2 snmp]# service snmpd status
Redirecting to /bin/systemctl status snmpd.service
● snmpd.service - Simple Network Management Protocol (SNMP) Daemon.
   Loaded: loaded (/usr/lib/systemd/system/snmpd.service; enabled; vendor 
preset: disabled)
   Active: active (running) since Fri 2021-05-21 19:41:21 CEST; 3s ago
 Main PID: 336469 (snmpd)
   Memory: 5.3M
   CGroup: /system.slice/snmpd.service
           └─336469 /usr/sbin/snmpd -LS0-6d -f

May 21 19:41:21 das2 systemd[1]: Starting Simple Network Management Protocol 
(SNMP) Daemon....
May 21 19:41:21 das2 snmpd[336469]: Duplicate IPv4 address detected, some 
interfaces may not be visible in IP-MIB
May 21 19:41:21 das2 snmpd[336469]: Turning on AgentX master support.
May 21 19:41:21 das2 snmpd[336469]: NET-SNMP version 5.7.2
May 21 19:41:21 das2 systemd[1]: Started Simple Network Management Protocol 
(SNMP) Daemon..


Could you please help me to solve (if it is possible) this issue?

Thank you in advance,
Mauro







_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to