Question on Guide Nagios XI – Monitoring Linux Using SNMP

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
timlee
Posts: 60
Joined: Mon Jan 12, 2015 10:01 pm

Question on Guide Nagios XI – Monitoring Linux Using SNMP

Post by timlee »

Hi, I'm trying to setup Linux monitoring using SNMP. According to this guide http://assets.nagios.com/downloads/nagi ... g_SNMP.pdf
Next, you need to create your own snmpd configuration file (snmpd.conf):
cd /etc/snmp
cp snmpd.conf snmpd.conf.bak
vi snmpd.conf
Edit the configuration file and specify a community string that can be used to issue queries. An example configuration file entry is shown
below:
rocommunity public 192.168.5.0/24
At which line should I put in the rocommunity public 192.168.5.0/24?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Question on Guide Nagios XI – Monitoring Linux Using SNM

Post by tmcdonald »

I don't believe it particularly matters.
Former Nagios employee
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Question on Guide Nagios XI – Monitoring Linux Using SNM

Post by jolson »

Adding to what tmcdonald said, it looks like my test linux boxes have the line in different places - one on line 1, one on line 3.
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
timlee
Posts: 60
Joined: Mon Jan 12, 2015 10:01 pm

Re: Question on Guide Nagios XI – Monitoring Linux Using SNM

Post by timlee »

tmcdonald wrote:I don't believe it particularly matters.
Hi Donald, this is what i have put in /etc/snmpd.conf in my remote host.
####
# First, map the community name "public" into a "security name"

# sec.name source community
com2sec notConfigUser default public
com2sec sec default netxcel

####
# Second, map the security name into a group name:

# groupName securityModel securityName
group notConfigGroup v1 notConfigUser
group notConfigGroup v2c notConfigUser
group group v2c sec

####
# Third, create a view for us to let the group have rights to:

# Make at least snmpwalk -v 1 localhost -c public system fast again.
# name incl/excl subtree mask(optional)
view systemview included .1.3.6.1.2.1.1
view systemview included .1.3.6.1.2.1.25.1.1
view all included .1

####
# Finally, grant the group read-only access to the systemview view.

# group context sec.model sec.level prefix read write notif
access notConfigGroup "" any noauth exact systemview none none
access group "" v2c noauth exact all none none
Did a the rest according to the guide...

Code: Select all

[root@remotehost snmp]# service snmpd restart
Stopping snmpd:                                            [FAILED]
Starting snmpd:                                            [  OK  ]
[root@remotehost snmp]# service snmpd restart
Stopping snmpd:                                            [  OK  ]
Starting snmpd:                                            [  OK  ]
[root@remotehost snmp]# service snmpd status
snmpd (pid  2121) is running...
[root@remotehost snmp]# iptables -I INPUT -p udp --destination-port 161 -j ACCEPT
[root@remotehost snmp]# /etc/init.d/iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[  OK  ]
I tried the command on the manual, but there is error in communication.

Code: Select all

[root@NagiosCentOS6 libexec]# ./check_snmp_storage.pl -H 192.168.168.123 -C netxcel -m "^/$" -w 2 -c 4
ERROR: Description/Type table : No response from remote host '192.168.168.123'.
However, please also refer to the picture.
Marked with a "tick" are successful monitoring using SNMP, however services status are still unknown. How do I fix this?
Secondly, SNMP trap is stuck for trap? Why?

Appreciate your help.
You do not have the required permissions to view the files attached to this post.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Question on Guide Nagios XI – Monitoring Linux Using SNM

Post by Box293 »

For the services that are not working, can you do the following:

Configure > Core Configuration Manager
Monitoring > Services
Search for the problem service
Click the Disk icon on the right
This opens the config in a text file
Paste that config here in a code block (of the services that have a problem).

SNMP traps are received from SNMP devices. Nagios does not "pull" information rather it receives traps sent by these SNMP devices.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
timlee
Posts: 60
Joined: Mon Jan 12, 2015 10:01 pm

Re: Question on Guide Nagios XI – Monitoring Linux Using SNM

Post by timlee »

Box293 wrote:For the services that are not working, can you do the following:

Configure > Core Configuration Manager
Monitoring > Services
Search for the problem service
Click the Disk icon on the right
This opens the config in a text file
Paste that config here in a code block (of the services that have a problem).

SNMP traps are received from SNMP devices. Nagios does not "pull" information rather it receives traps sent by these SNMP devices.
Hi, I'm so sorry, it appears that I did not specify the Warning and Critical levels.

A side question, Is there a guide for SNMP monitoring on Linux systems? The guide Integrating_SNMP_Traps_With_Nagios_XI.pdf is only for hardware device like switches.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Question on Guide Nagios XI – Monitoring Linux Using SNM

Post by scottwilkerson »

timlee wrote: A side question, Is there a guide for SNMP monitoring on Linux systems?
We don't have a guide, but a basic starting point is what you have done already, just use the Linux Wizard...
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked