I'm trying to run a SNMP supervisor on Debian Lenny to supervise Uninteruptible Power Systems which support SNMP. I've installed snmp and snmpd debian packages for NET-SNMP 5.4.1 et i've configured /etc/snmp file with the snmpconf perl script :
file /etc/snmp/snmp.conf
Code:
# snmp.conf
# Configuration du superviseur SNMP (snmpd)
# SECTION: Debugging output options
#dodebugging 0
#dumppacket no
#notokenwarnings yes
# SECTION: Output style options
logtimestamp yes
printnumericenums 1
printnumericoids no
dontbreakdownoids yes
escapequotes no
quickprinting yes
numerictimeticks yes
suffixprinting 1
# SECTION: Textual mib parsing
mibdirs /etc/snmp/mibs:/usr/share/snmp/mibs
#mibdirs /etc/snmp/mibs
showmiberrors no
mibwarninglevel 2
strictcommentterm 1
miballowunderline no
mibreplacewithlatest no
# SECTION: Default Authentication Options
# port UDP, version de SNMP, groupe snmp pour ecriture
defaultport 161
defversion 1
defcommunity perso
# Access Control
# sec.name source community
com2sec paranoid default public
com2sec readonly default public
com2sec readwrite default askco
# sec.model sec.name
group MyROSystem v1 paranoid
group MyROSystem v2c paranoid
group MyROSystem usm paranoid
group MyROGroup v1 readonly
group MyROGroup v2c readonly
group MyROGroup usm readonly
group MyRWGroup v1 readwrite
group MyRWGroup v2c readwrite
group MyRWGroup usm readwrite
# incl/excl subtree mask
view all included .1 80
view system included .iso.org.dod.internet.mgmt.mib-2.system
# context sec.model sec.level match read write notif
access MyROSystem "" any noauth exact system none none
access MyROGroup "" any noauth exact all none none
access MyRWGroup "" any noauth exact all all none
file /etc/snmp/snmptrapd.conf
Code:
# snmptrapd.conf:
# Gestion des messages d'alertes (trap) par le service
# de gestion des alertes (snmptrapd)
# Runtime options
#pidfile /var/run/snmptrapd.pid
# SECTION: Output formatting for traps received.
format2 %02.2l/%02.2m/%y %02.2h:%02.2j:%02.2k %W de %A\n
# SECTION: Logging options
donotlogtraps no
logoption s 2
logoption f /var/log/snmptrapd.log
outputoption S
printeventnumbers yes
# SECTION: Trap Handlers / Traitement des alertes
#traphandle " .oid" /chemin/programme "arguments"
traphandle default /usr/bin/eject
# notice : I've tried other OIDs
# SECTION: Authentication options
ignoreauthfailure no
# Access Control
# sec.name source community
com2sec paranoid default public
com2sec readonly default public
com2sec readwrite default perso
# sec.model sec.name
group MyROSystem v1 paranoid
group MyROSystem v2c paranoid
group MyROSystem usm paranoid
group MyROGroup v1 readonly
group MyROGroup v2c readonly
group MyROGroup usm readonly
group MyRWGroup v1 readwrite
group MyRWGroup v2c readwrite
group MyRWGroup usm readwrite
# incl/excl subtree mask
view all included .1 80
#view system included .iso.org.dod.internet.mgmt.mib-2
# context sec.model sec.level match read write notif
access MyROSystem "" any noauth exact none none none
access MyROGroup "" any noauth exact all none none
access MyRWGroup "" any noauth exact all all none
The /etc/snmpd.conf file is empty because I do not want a SNMP agent on the supervisor.
So the trap is well received but unfortunately the action associated to the traphandle (to open the cd tray with /bin/eject) fails I've tried other commands, the problem is with the traphandle instruction ...
On the web many people got this problem but I didn't manage to find any answer ...
Thanks in advance for your help and sorry for my bad English.
---------- Post updated 01-25-11 at 02:15 AM ---------- Previous update was 01-24-11 at 03:46 AM ----------
got the solution :
We had to add this line in the snmptrapd.conf file :
authCommunity log,execute,net public
the execute keyword permit executing external programs from the trap handling system.
I need to configure snmptrap on rhel 8 server and send trap to nimsoft for file system , memory and cpu load and network diconnection status.
please help me, if any one configured. (1 Reply)
Hi,
I tried to run snmptrapd from my customized service in centos 5.7 machine... the command used to start snmptrapd is ....
/opt/snmpdemo/bin/snmptrapd -Le -c /opt/snmpdemo/etc/snmp/snmptrapd.conf -n -C -t -m ""
And tried to trigger a trap... Trap got triggered but snmptrapd didn't... (0 Replies)
Hi,
trying to get snmp traps logged in /var/log/messages.
I put this option in snmptrapd.conf:
logOption Ls d
then restarting the snmptrad daemon I got this warning:
Unknown token: logoption.
and server is not logging traps. Starting snmptrapd manually works, traps are logged.... (0 Replies)
I have configured snmptrapd to log the traps to log file. the traps received and logged ok based on the mib file definition.
there is only one problem.
the value of one of the variables seems to be truncated due to end of line or some special char.
linux is centos 6.2
snmp software... (4 Replies)
Hello all,
Below what I saw on my solaris 10 box :
$ prstat
PID USERNAME SIZE RSS STATE PRI NICE TIME CPU
PROCESS/NLWP
683 root 4082M 91M run 10 0 41:45:39 96% snmptrapd/1
syslog gives a lot of :
snmptrapd: illegal
data attempted to be added to table nlmLogVariableTable... (0 Replies)
HI,
I want a help for Configuring snmpd.conf and snmptrapd.conf (i.e Configuring SNMP)
for receiving
TRAPS in my networks. I am using RHEL4.0 OS.
Please tell me How I can configure above two files in a proper way and at an
advanced level.
Especially I am getting... (2 Replies)
i tried this to get snmptrapd.conf bt unable...
# snmpconf
The following installed configuration files were found:
1: /etc/snmp/snmp.conf
2: /etc/snmp/snmpd.conf
3: /usr/share/snmp/snmp.conf
4: /usr/share/snmp/snmpd.conf
Would you like me to read them in? Their... (0 Replies)
hi i am able to see the snmpd service running in my machine. i would like to get activate snmptrapd deamon services in my solaris box, could any one suggest me in getting activate the snmptrapd service (0 Replies)