On 29 April 2012 12:10, pandit jignesh <[email protected]> wrote:
> (1).i need logging option for both snmpd and snmptrapd to a different
> location
See the section 'LOGGING OPTIONS' in the snmpcmd(1) man page
> (2). when i mention agentaddress udp:161 or udp:127.0.0.1:161 in
> snmpd.conf file i got error opening specified endpoint 161 and
> snmpd can not start, if i do not mention above token it is working.
What is the exact command you are using to start the agent?
Are you running this as root, or some other user?
What happens if you specify a different port number, other than 161?
What version of the agent are you working with?
> (3). what token should be provide for traphandler in snmptrapd.conf file ?
Either the OID of the trap that you wish to pass to this particular script,
or the token "default" to handle all incoming traps
> traphandle default /usr/local/bin/Mytrapfile.pl
What is the first line of the file Mytrapfile.pl?
What are the permissions on it?
What happens if you invoke
/usr/local/bin/Mytrapfile.pl
from the command line?
> i can not restart snmptrapd service after i stop it(on boot up no problem). i
> got following err.
> * Restarting network management services:
>
> Unknown logging option passed to -L: ".
> Unknown logging option passed to -L: ".
> Unknown output option passed to -O: -
What are the options being used to invoke snmptrapd?
How exactly are you restarting this services?
> sh: /usr/local/bin/Mytrapfile.pl: Permission denied
> sh: /usr/local/bin/Mytrapfile.pl: Permission denied
That definitely looks like issues with the permissions on the script.
> this is log option in snmptrapd.conf file
>
> logoption "-Lf FILE"
That looks like a template entry, where you are expected to
replace 'FILE' with the name of the file that you wish to log to
Try deleting this (or commenting it out)
> logoption "-Lf /var/log/snmptrapd.log"
> snmpd.conf file has following trap destinations value
> trapsink 127.0.0.1 public
> trap2sink 127.0.0.1 public
> informsink 127.0.0.1 public
Why are you sending three copies of every trap?
Choose *one* of these entries, and delete the other two.
dave
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
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