SIGHUP causes duplicate trigger name

"Loic Domaigne" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hello Everybody,

I have noticed a small issue when SIGHUP is sent to the SNMP Agent version 5.3.1. If triggers are defined, it causes a 'duplicate trigger name' error. Using for instance the configuration file given after the signature, I got:  

NET-SNMP version 5.3.0.1 restarted
error on subcontainer '' insert (-1)
error on subcontainer '' insert (-1)
/etc/snmp/snmpd.conf: line 10: Error: duplicate trigger name
error on subcontainer '' insert (-1)
error on subcontainer '' insert (-1)
/etc/snmp/snmpd.conf: line 11: Error: duplicate trigger name
error on subcontainer '' insert (-1)
error on subcontainer '' insert (-1)
/etc/snmp/snmpd.conf: line 12: Error: duplicate trigger name
error on subcontainer '' insert (-1)
error on subcontainer '' insert (-1)
/etc/snmp/snmpd.conf: line 13: Error: duplicate trigger name
net-snmp: 4 error(s) in config file(s)
error on subcontainer '' insert (-1)
error on subcontainer '' insert (-1)
error on subcontainer '' insert (-1)
error on subcontainer '' insert (-1)
error on subcontainer '' insert (-1)
error on subcontainer '' insert (-1)
error on subcontainer '' insert (-1)
error on subcontainer '' insert (-1)
error on subcontainer '' insert (-1)
error on subcontainer '' insert (-1)
error on subcontainer '' insert (-1)
error on subcontainer '' insert (-1)
error on subcontainer '' insert (-1)


I think that the problem is due to the fact that the mteTriggerTable isn't deleted upon Agent's restart. Hence, this causes a 'duplicate trigger name' when the configuration file is re-read. 

Unfortunately, I am not familiar enough with the Net-SNMP code to be able to create the corresponding patch. If some of you could point me where to look to code that delete function, I could perhaps produce some code... 

I will fill a BUG report. 

Hope this helps,
Loic. 
--

# simple snmpd.conf to illustrate the problem
# 
# start the agent, and sent a SIGHUP. 
# 
rocommunity debugro
rwcommunity debugrw

trapsess -c debug -Ci -t 10 -r 18 -v 2c localhost:1162

rouser       internal 
agentSecName internal

# you may change to any partition of your convenience
# 
disk /boot 80%
monitor -i -r 10 -o dskPath.1 -o dskErrorMsg.1 "disk1WS" dskPercent.1 >= 20
monitor -i -r 10 -o dskPath.1 -o dskErrorMsg.1 "disk1AS" dskPercent.1 >= 25
monitor -i -r 10 -o dskPath.1 -o dskErrorMsg.1 "disk1AC" dskPercent.1 < 25 
monitor -i -r 10 -o dskPath.1 -o dskErrorMsg.1 "disk1WC" dskPercent.1 < 20

-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
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.