LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-21-2016, 01:25 AM   #1
harmony12
LQ Newbie
 
Registered: Jul 2016
Posts: 5

Rep: Reputation: Disabled
whole process and commands regarding install, enable and generate snmp trap by snmptrap command and run its basic operation.


I am trying to generate SNMP traps in linux. But I didn't get how to generate snmptrap as i am not able to run snmptrap command.
 
Old 07-21-2016, 01:34 AM   #2
ardvark71
LQ Veteran
 
Registered: Feb 2015
Location: USA
Distribution: Lubuntu 14.04, 22.04, Windows 8.1 and 10
Posts: 6,282
Blog Entries: 4

Rep: Reputation: 842Reputation: 842Reputation: 842Reputation: 842Reputation: 842Reputation: 842Reputation: 842
Hello and welcome to the forum

Just as a suggestion, you might want to change your username using the instructions at the top of the page here, lest your email inbox ends up with a boatload of SPAM in the very near future.

Regards...
 
Old 07-21-2016, 01:44 AM   #3
harmony12
LQ Newbie
 
Registered: Jul 2016
Posts: 5

Original Poster
Rep: Reputation: Disabled
SNMP Traps.

Quote:
Originally Posted by ardvark71 View Post
Hello and welcome to the forum

Just as a suggestion, you might want to change your username using the instructions at the top of the page here, lest your email inbox ends up with a boatload of SPAM in the very near future.

Regards...

I want to only know about snmp traps.
 
Old 07-21-2016, 07:46 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,520

Rep: Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944
Quote:
Originally Posted by saumyad123@gmail.com View Post
I am trying to generate SNMP traps in linux. But I didn't get how to generate snmptrap as i am not able to run snmptrap command.
Read the "Question Guidelines" link in my posting signature. Unless you provide details (like version/distro of Linux, etc.), there's not a lot we can do to help you. You say you're unable to run snmptrap...WHY? What happens when you try it? Unless you tell us what's going on, there's not a lot we can tell you about how to fix it.
 
Old 07-21-2016, 07:47 AM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,520

Rep: Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944
Quote:
Originally Posted by ardvark71 View Post
Hello and welcome to the forum

Just as a suggestion, you might want to change your username using the instructions at the top of the page here, lest your email inbox ends up with a boatload of SPAM in the very near future.

Regards...
Ardvark71...seriously? You removed the OP's post from the zero-reply list, making it LESS VISIBLE, and LESS LIKELY for him to get help, and then gave them no assistance whatsoever? You're not doing the OP any favors here, and you do it quite frequently with other threads too...you're hindering people from getting help when you're the first-reply and offer up this.
 
Old 07-21-2016, 08:07 AM   #6
harmony12
LQ Newbie
 
Registered: Jul 2016
Posts: 5

Original Poster
Rep: Reputation: Disabled
SNMP Trap Guidance

Quote:
Originally Posted by TB0ne View Post
Ardvark71...seriously? You removed the OP's post from the zero-reply list, making it LESS VISIBLE, and LESS LIKELY for him to get help, and then gave them no assistance whatsoever? You're not doing the OP any favors here, and you do it quite frequently with other threads too...you're hindering people from getting help when you're the first-reply and offer up this.
Hello All,

I am using Xshell. When i have run the commands for snmpwalk like snmpwalk -v 1 -c public 127.0.0.1 system working fine and gives the information about system as i am able to start snmp service by command service snmp start at port 161. But i am not able to start snmptrap service at port 162. I didn't understand what's the problem either i need to install snmptrap or other thing. When i am running the command like
root@netstorm-ProLiant-ML10:/home/netstorm/controller_saumya# service snmptrapd start
it gives ouput as : snmptrapd: unrecognized service

Please guide me to install, configure and run the snmptrap command.

Last edited by harmony12; 07-21-2016 at 08:13 AM. Reason: to give more discription
 
Old 07-21-2016, 08:28 AM   #7
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,520

Rep: Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944
Quote:
Originally Posted by saumyad123@gmail.com View Post
Hello All,

I am using Xshell.
Xshells is NOT the version/distro of Linux you're using...it's a terminal emulator. You're still not telling us anything about your system.
Quote:
When i have run the commands for snmpwalk like snmpwalk -v 1 -c public 127.0.0.1 system working fine and gives the information about system as i am able to start snmp service by command service snmp start at port 161. But i am not able to start snmptrap service at port 162. I didn't understand what's the problem either i need to install snmptrap or other thing. When i am running the command like
root@netstorm-ProLiant-ML10:/home/netstorm/controller_saumya# service snmptrapd start
it gives ouput as : snmptrapd: unrecognized service

Please guide me to install, configure and run the snmptrap command.
So you're NOT asking about the snmptrap COMMAND, but the snmptrapD service...the two are VERY different. Again, you need to provide details about your system (which you haven't), because we can't tell you how to install/configure things without knowing that. Also, again, read the "Question Guidelines" link...we are happy to help you with SPECIFIC questions, but asking us to look up how-to guides for you isn't a good thing. Putting "how to configure snmptrapd" into Google pulls up, as the FIRST TWO HITS:
http://net-snmp.sourceforge.net/docs...rapd.conf.html
http://net-snmp.sourceforge.net/wiki...ring_snmptrapd

....a complete example of the configuration file for that service, as well as a guide with tutorials. These only apply AFTER you get snmptrapd installed...again, we can't tell you how to do this (aside from compiling from source, which typically isn't the best thing to do), since you don't say what kind of system you're using.
 
Old 07-21-2016, 08:58 AM   #8
harmony12
LQ Newbie
 
Registered: Jul 2016
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TB0ne View Post
Xshells is NOT the version/distro of Linux you're using...it's a terminal emulator. You're still not telling us anything about your system.

So you're NOT asking about the snmptrap COMMAND, but the snmptrapD service...the two are VERY different. Again, you need to provide details about your system (which you haven't), because we can't tell you how to install/configure things without knowing that. Also, again, read the "Question Guidelines" link...we are happy to help you with SPECIFIC questions, but asking us to look up how-to guides for you isn't a good thing. Putting "how to configure snmptrapd" into Google pulls up, as the FIRST TWO HITS:
http://net-snmp.sourceforge.net/docs...rapd.conf.html
http://net-snmp.sourceforge.net/wiki...ring_snmptrapd

....a complete example of the configuration file for that service, as well as a guide with tutorials. These only apply AFTER you get snmptrapd installed...again, we can't tell you how to do this (aside from compiling from source, which typically isn't the best thing to do), since you don't say what kind of system you're using.
I am sending the screenshot of my xshell terminal which gives you detail about my terminal. I am using windows 8 .Which you have suggested i tried previously but there is not any fine result by these links.
Attached Thumbnails
Click image for larger version

Name:	xshellinfo.png
Views:	15
Size:	36.0 KB
ID:	22528  
 
Old 07-21-2016, 01:15 PM   #9
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,520

Rep: Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944
Quote:
Originally Posted by saumyad123@gmail.com View Post
I am sending the screenshot of my xshell terminal which gives you detail about my terminal. I am using windows 8 .Which you have suggested i tried previously but there is not any fine result by these links.
AGAIN...we do NOT NEED information about your terminal emulator...we are asking about YOUR LINUX SYSTEM. This would be something like Ubuntu 14.04, Mint 17, CentOS7, etc. Repeating what you've already said tells us nothing new.

NO ONE here suggested you use Windows 8...where are you even seeing that? The version of Windows you're running your terminal emulator on makes no difference either. If you're not going to answer the questions asked, there is little point in posting.

Last edited by TB0ne; 07-21-2016 at 01:16 PM.
 
Old 07-22-2016, 12:21 AM   #10
harmony12
LQ Newbie
 
Registered: Jul 2016
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TB0ne View Post
AGAIN...we do NOT NEED information about your terminal emulator...we are asking about YOUR LINUX SYSTEM. This would be something like Ubuntu 14.04, Mint 17, CentOS7, etc. Repeating what you've already said tells us nothing new.

NO ONE here suggested you use Windows 8...where are you even seeing that? The version of Windows you're running your terminal emulator on makes no difference either. If you're not going to answer the questions asked, there is little point in posting.
My linux version is Ubuntu 12.04.5.
 
Old 07-22-2016, 09:10 AM   #11
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,520

Rep: Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944
Quote:
Originally Posted by saumyad123@gmail.com View Post
My linux version is Ubuntu 12.04.5.
Great...so to go back to my first reply, have you read the Question Guidelines???? Because part of that is that you need to show some effort of YOUR OWN. PUtting "install snmptrapd on ubuntu 12.04" into Google yields LOTS:
http://www.cyberciti.biz/faq/debain-...-snmpd-server/
http://manpages.ubuntu.com/manpages/...mptrapd.8.html

Again, read the man page on snmptrapd, and configure it accordingly. Unless you INSTALL the snmp-tools, you won't have anything to work with.
 
Old 05-28-2018, 05:35 AM   #12
ranafaisal
LQ Newbie
 
Registered: May 2018
Posts: 13

Rep: Reputation: Disabled
I am using centos 7 and can't seem to get around it. I followed
Run the following commands in the terminal:
Update all packages: sudo yum check-update
Install SNMP: yum -y install net-snmp
Next we need to configure multiple entries in the snmpd.conf, there is a manual page located here (link to http://net-snmp.sourceforge.net/docs...nmpd.conf.html) which contains information for additional configuration options.
(Optional) Install Nano: sudo yum -y install nano
Edit snmpd.conf with text editor of your choice, we will be using nano: sudo nano /etc/snmp/snmpd.conf
Configure com2sec: com2sec ESUser 127.0.0.1 public
-Change “public” to your community name
com2sec ESUser 0.0.0.0/0 public
-Change “public” to your community name
-Change the IP to your server or network...here I enfter my network address
Configure group: group ESGroup v1 ESUser
group ESGroup v2c ESUser
Configure view: view all included .1
Configure access: access ESGroup “” any noauth exact all none none
Restart the SNMPD service: sudo systemctl restart snmpd
Configure SNMPD to start on boot: chkconfig snmpd on

for snmpd.conf
and for snmptrapd.conf
I just uncommented authcommunity log,execute,net public
but this does not seem to work. in the log file the version of snmp appears in one line and that's it. nothing else.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to install SNMP trap Reciever mula Linux - Newbie 3 05-18-2013 10:11 PM
generate snmp trap to check High CPU Usage...... dashang.trivedi Linux - Networking 2 03-17-2011 02:51 AM
generate snmp trap dashang.trivedi Linux - Networking 1 03-11-2011 07:10 AM
how to send snmp trap & recieve trap in C program minil Programming 3 07-10-2010 09:22 AM
How to generate snmp trap using the ucLinux /user/snmpd API jonathan_wu Programming 3 08-27-2008 09:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:20 AM.

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