LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-25-2017, 01:30 PM   #1
sam1990
LQ Newbie
 
Registered: Jan 2017
Posts: 1

Rep: Reputation: Disabled
Post Centos SNMPTrapd Configuration


Hi,

I'm running Centos 6.8 with NET-SNMP 5.5 and am trying to configure snmptrapd to place incoming traps into a spool directory. My snmptrapd.conf file looks like this:

logOption -Lf /pathmaster/incoming
format1 Trap from %B at %h:%j:%k %l.%m.%y %N %v\n
format2 Trap from %B at %h:%j:%k %l.%m.%y %N %v\n
authCommunity log,execute,net public
#disableAuthorization yes
traphandle default php /pathmaster/traparrive.php

However I never see the traps arrive in the /pathmaster/incoming folder. I've set the directory permissions to 777 for testing (I'm on a closed network anyway) but still no luck.

Any suggestions?

Many Thanks
 
Old 01-26-2017, 02:26 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by sam1990 View Post
Hi,
I'm running Centos 6.8 with NET-SNMP 5.5 and am trying to configure snmptrapd to place incoming traps into a spool directory. My snmptrapd.conf file looks like this:

logOption -Lf /pathmaster/incoming
format1 Trap from %B at %h:%j:%k %l.%m.%y %N %v\n
format2 Trap from %B at %h:%j:%k %l.%m.%y %N %v\n
authCommunity log,execute,net public
#disableAuthorization yes
traphandle default php /pathmaster/traparrive.php

However I never see the traps arrive in the /pathmaster/incoming folder. I've set the directory permissions to 777 for testing (I'm on a closed network anyway) but still no luck.
First thing I'd check would be your firewall. You may be blocking incoming traffic on port 162. If you want to do an unsafe test, as root, run "iptable -L" to list any firewall rules. If you see any, run "iptables -F" to remove them. This will NOT be a good thing for a server to go into production with, but for a quick test, it'll at least let you see if that's the culprit.

From there, you can check this page https://mathias-kettner.de/checkmk_mkeventd_traps.html for some simple things to try/tests. And obvious question....you've configured snmptrapd...did you start the service?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
snmptrapd is not receiving generated traps in centos 5.7 sharathpadman Linux - Newbie 1 04-23-2014 07:51 PM
SNMPTRAPD to SYSLOG-NG Linux_Kidd Linux - Software 6 04-06-2012 01:17 PM
snmptrapd not found plythgam Linux - Server 5 04-11-2011 10:16 AM
Nagios with snmptrapd nagiosnmp Linux - Networking 0 03-05-2008 09:18 AM
mynetwatchman and snmptrapd deadite66 Linux - Security 0 12-30-2004 06:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration