Page 1 of 1

Question on Guide Nagios XI – Monitoring Linux Using SNMP

Posted: Thu Apr 09, 2015 4:33 am
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?

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

Posted: Thu Apr 09, 2015 9:45 am
by tmcdonald
I don't believe it particularly matters.

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

Posted: Thu Apr 09, 2015 9:47 am
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.

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

Posted: Thu Apr 09, 2015 9:11 pm
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.

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

Posted: Fri Apr 10, 2015 2:15 am
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.

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

Posted: Fri Apr 10, 2015 4:38 am
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.

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

Posted: Fri Apr 10, 2015 12:12 pm
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...