Need some help with an Snmp Entry.

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
skyerjoe
Posts: 56
Joined: Thu Mar 22, 2012 2:57 am

Re: Need some help with an Snmp Entry.

Post by skyerjoe »

Could someone post the an snmpd.conf File for comparing

thanks

reagards john
Nagios Core 3.5.1

Checkmk 1.2.4p5
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Need some help with an Snmp Entry.

Post by mcapra »

If you're referring to a clean snmpd.conf file, here's one from my CentOS 7 box that is being monitored via SNMP by Nagios with an awfully insecure community string:

Code: Select all

# Map 'idv90we3rnov90wer' community to the 'ConfigUser'
# Map '209ijvfwer0df92jd' community to the 'AllUser'
#       sec.name        source          community
com2sec ConfigUser      default         welcome1
com2sec AllUser         default         welcome2
# Map 'ConfigUser' to 'ConfigGroup' for SNMP Version 2c
# Map 'AllUser' to 'AllGroup' for SNMP Version 2c
#                       sec.model       sec.name
group   ConfigGroup     v2c             ConfigUser
group   AllGroup        v2c             AllUser
# Define 'SystemView', which includes everything under .1.3.6.1.2.1.1 (or .1.3.6.1.2.1.25.1)
# Define 'AllView', which includes everything under .1
#                       incl/excl       subtree
view    SystemView      included        .1.3.6.1.2.1.1
view    SystemView      included        .1.3.6.1.2.1.25.1.1
view    AllView         included        .1
# Give 'ConfigGroup' read access to objects in the view 'SystemView'
# Give 'AllGroup' read access to objects in the view 'AllView'
#                       context model   level   prefix  read            write   notify
access  ConfigGroup     ""      any     noauth  exact   SystemView      none    none
access  AllGroup        ""      any     noauth  exact   AllView         none    none
Former Nagios employee
https://www.mcapra.com/
skyerjoe
Posts: 56
Joined: Thu Mar 22, 2012 2:57 am

Re: Need some help with an Snmp Entry.

Post by skyerjoe »

Thanks for the template

: ) ....ok it looks a little bit better than mine .. but i don't think that's the problem for this issue .. at least i don't see any value which has some relation to this issue ... i just use my standard one from my old version before the update processed

Where does snmp stores the smpd.conf file normally ?

i have 2 locations ( ubuntu LTS):

/etc/default/snmpd
/etc/snmp/snmpd.conf.dpkg-dist

I know that the 2cnd is from the update but there is no further file version in the directoy /etc/snmpd ....

so which file does net-snmp choose ?

regards john
Nagios Core 3.5.1

Checkmk 1.2.4p5
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Need some help with an Snmp Entry.

Post by tgriep »

The ubuntu man page for the snmpd.conf file shows it to be here by default.

Code: Select all

/etc/snmp/snmpd.conf
http://manpages.ubuntu.com/manpages/wil ... onf.5.html
Be sure to check out our Knowledgebase for helpful articles and solutions!
skyerjoe
Posts: 56
Joined: Thu Mar 22, 2012 2:57 am

Re: Need some help with an Snmp Entry.

Post by skyerjoe »

Hello trgiep

On this point there is no file.

But I'm not sure if this could be related to my problem cause as we had see before any testing snmps worked fine so far.

so i guess ...i don't think so .. but neverthless it's a littble bit strange that the file is not on the place where it should be..

regards john
Nagios Core 3.5.1

Checkmk 1.2.4p5
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Need some help with an Snmp Entry.

Post by tgriep »

Can you login as root to your Nagios server, run the following commands and post the output?

Code: Select all

ls -l /etc/snmp
ps -ef --cols=300
Is the issue you were having receiving the SNMP Traps on the Nagios server resolved?
Be sure to check out our Knowledgebase for helpful articles and solutions!
skyerjoe
Posts: 56
Joined: Thu Mar 22, 2012 2:57 am

Re: Need some help with an Snmp Entry.

Post by skyerjoe »

Hello tgriep yes sure:

here it is:

ls -l /etc/snmp:

Code: Select all

root@srv61:/usr/local/nagios/etc/mysite# ls -l /etc/snmp
total 120
-rwxrwxrwx 1 root root     0 Aug  6  2012 log.txt
-rw-r--r-- 1 root root   211 Jun  6  2013 snmp.conf
-rw------- 1 root root  6993 Feb 19  2016 snmpd.conf.dpkg-dist
-rw-r--r-- 1 root root   789 Jun 17  2013 snmptrapd.conf
-rw-r--r-- 1 root root  2303 Mai 12  2010 snmptt.conf
-rw-r--r-- 1 root root  2303 Mär 24  2003 snmptt.conf.generic
-rw-r--r-- 1 root root  1515 Jul 10  2012 snmptt.conf.nagios
-rw-r--r-- 1 root root  2645 Aug  6  2012 snmptt.conf.owserver
-rw-r--r-- 1 root root   526 Mär 14  2013 snmptt.conf.owserverair.copy
-rw-r--r-- 1 root root   559 Aug 31  2012 snmptt.conf.owservertemp
-rw-r--r-- 1 root root  1355 Apr  5  2016 snmptt.conf.owserverwater
-rw-r--r-- 1 root root  1829 Aug 25 13:52 snmptt.conf.owserverwatertest1line
-rw-r--r-- 1 root root  1829 Aug 25 13:52 snmptt.conf.owserverwatertest1line-copy
-rw-r--r-- 1 root root   435 Sep 16 09:07 snmptt.conf.owserverwatertest-1rule
-rw-r--r-- 1 root root   442 Mär 23  2016 snmptt.conf.test
-rw-r--r-- 1 root root   282 Aug 18 16:00 snmptt.conf.testeds
-rwxrwxrwx 1 root root 26071 Sep 16 10:13 snmptt.ini
-rwxrwxrwx 1 root root 26300 Nov  7  2013 snmptt.ini.dpkg-dist

ps -ef --cols=300:

Code: Select all

UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 Sep23 ?        00:14:45 /sbin/init
root         2     0  0 Sep23 ?        00:00:00 [kthreadd]
root         3     2  2 Sep23 ?        07:38:10 [ksoftirqd/0]
root         5     2  0 Sep23 ?        00:09:06 [kworker/u:0]
root         6     2  0 Sep23 ?        00:00:00 [migration/0]
root         7     2  0 Sep23 ?        00:04:33 [watchdog/0]
root         8     2  0 Sep23 ?        00:00:00 [cpuset]
root         9     2  0 Sep23 ?        00:00:00 [khelper]
root        10     2  0 Sep23 ?        00:00:00 [kdevtmpfs]
root        11     2  0 Sep23 ?        00:00:00 [netns]
root        12     2  0 Sep23 ?        00:00:55 [sync_supers]
root        13     2  0 Sep23 ?        00:00:03 [bdi-default]
root        14     2  0 Sep23 ?        00:00:00 [kintegrityd]
root        15     2  0 Sep23 ?        00:00:00 [kblockd]
root        16     2  0 Sep23 ?        00:00:00 [ata_sff]
root        17     2  0 Sep23 ?        00:00:00 [khubd]
root        18     2  0 Sep23 ?        00:00:00 [md]
root        20     2  0 Sep23 ?        00:00:05 [khungtaskd]
root        21     2  0 Sep23 ?        03:02:06 [kswapd0]
root        22     2  0 Sep23 ?        00:00:00 [vmstat]
root        23     2  0 Sep23 ?        00:00:00 [ksmd]
root        24     2  0 Sep23 ?        00:00:00 [khugepaged]
root        25     2  0 Sep23 ?        00:00:00 [fsnotify_mark]
root        26     2  0 Sep23 ?        00:00:00 [ecryptfs-kthrea]
root        27     2  0 Sep23 ?        00:00:00 [crypto]
root        35     2  0 Sep23 ?        00:00:00 [kthrotld]
root        37     2  0 Sep23 ?        00:00:00 [scsi_eh_0]
root        38     2  0 Sep23 ?        00:00:00 [scsi_eh_1]
root        39     2  0 Sep23 ?        00:00:00 [kworker/u:2]
root        60     2  0 Sep23 ?        00:00:00 [devfreq_wq]
root       208     2  0 Sep23 ?        00:00:00 [mpt_poll_0]
root       209     2  0 Sep23 ?        00:00:00 [mpt/0]
root       210     2  0 Sep23 ?        00:00:00 [scsi_eh_2]
root       212     2  0 Sep23 ?        00:00:00 [ttm_swap]
root       267     2  0 Sep23 ?        00:05:18 [flush-8:0]
root       268     2  0 Sep23 ?        00:36:59 [kjournald]
root       348     1  0 Okt05 ?        00:00:03 /usr/sbin/apache2 -k start
www-data   351   348  0 Okt05 ?        00:00:00 /usr/sbin/apache2 -k start
www-data   352   348  0 Okt05 ?        00:00:00 /usr/sbin/apache2 -k start
www-data   353   348  0 Okt05 ?        00:00:00 /usr/sbin/apache2 -k start
www-data   354   348  0 Okt05 ?        00:00:00 /usr/sbin/apache2 -k start
www-data   355   348  0 Okt05 ?        00:00:00 /usr/sbin/apache2 -k start
root       404     1  0 Sep23 ?        00:00:00 upstart-udev-bridge --daemon
root       415     1  0 Okt05 ?        00:00:50 /usr/bin/python /usr/bin/mkeventd --syslog --syslog-fd 3 -C /etc/check_mk --statedir /var/lib/mkeventd --logdir /var/lib/mkeventd -P /usr/local/nagios/var/rw/mkeventd/events -E /usr/local/nagios/var/rw/mkeventd/eventsocket -S /usr/local/nagios/var/rw/m
root       416     1  0 Sep23 ?        00:00:01 /lib/systemd/systemd-udevd --daemon
root       484     1  0 Sep23 ?        00:00:00 upstart-file-bridge --daemon
message+   496     1  0 Sep23 ?        00:00:05 dbus-daemon --system --fork
root       508     2  0 Sep23 ?        00:00:00 [kpsmoused]
root       521     1  0 Sep23 ?        00:00:01 /lib/systemd/systemd-logind
syslog     538     1  0 Sep23 ?        00:27:41 rsyslogd
root       601     1  0 Sep23 ?        00:00:00 upstart-socket-bridge --daemon
root       942     2  0 Sep23 ?        00:00:00 [kauditd]
root       944     1  0 Sep23 ?        00:00:15 /usr/sbin/console-kit-daemon --no-daemon
root      1009     1  0 Sep23 ?        00:00:03 /usr/lib/policykit-1/polkitd --no-debug
root      1168     1  0 Sep23 tty4     00:00:00 /sbin/getty -8 38400 tty4
root      1171     1  0 Sep23 tty5     00:00:00 /sbin/getty -8 38400 tty5
root      1177     1  0 Sep23 tty2     00:00:00 /sbin/getty -8 38400 tty2
root      1178     1  0 Sep23 tty3     00:00:00 /sbin/getty -8 38400 tty3
root      1181     1  0 Sep23 tty6     00:00:00 /sbin/getty -8 38400 tty6
daemon    1208     1  0 Sep23 ?        00:00:04 atd
root      1209     1  0 Sep23 ?        00:09:07 cron
root      1211     1  0 Sep23 ?        00:01:40 /usr/sbin/sshd -D
mail      1313     1  0 Sep23 ?        00:11:23 /usr/sbin/nullmailer-send -s
root      1513     1  0 Sep23 tty1     00:00:00 /sbin/getty -8 38400 tty1
root      2833     1  0 Sep26 ?        00:06:14 /usr/sbin/snmptrapd -n -On -t -Lsd -p /var/run/snmptrapd.pid
root      3029     1  0 Sep26 ?        00:02:28 /usr/bin/perl /usr/sbin/snmptt --daemon
nagios    3030  3029  3 Sep26 ?        08:03:37 /usr/bin/perl /usr/sbin/snmptt --daemon
root      5913  7709  0 08:27 ?        00:00:00 /bin/sh -c run-parts --report /etc/cron.weekly
root      5914  5913  0 08:27 ?        00:00:00 run-parts --report /etc/cron.weekly
root      5919  5914  0 08:27 ?        00:00:00 /bin/sh /etc/cron.weekly/apt-xapian-index
root      5925  5919  0 08:27 ?        00:00:22 /usr/bin/python /usr/sbin/update-apt-xapian-index --quiet
root      7365     2  0 13:31 ?        00:00:00 [kworker/0:0]
root      7709     1  0 07:30 ?        00:00:00 anacron -s
root      9995  1211  0 13:36 ?        00:00:00 sshd: sba [priv]
sba      10072  9995  0 13:36 ?        00:00:00 sshd: sba@pts/0
sba      10073 10072  0 13:36 pts/0    00:00:00 -bash
root     10091 10073  0 13:37 pts/0    00:00:00 sudo -s
root     10097 10091  0 13:37 pts/0    00:00:00 /bin/bash
nagios   10892     1  6 13:38 ?        00:01:39 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
root     16890     2  0 12:48 ?        00:00:05 [kworker/0:2]
nagios   17868     1  0 Okt03 ?        00:00:00 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios   24695     1  0 05:03 ?        00:00:00 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios   24706 24695  0 05:03 ?        00:00:00 [sh] <defunct>
nagios   25021 10892  0 14:03 ?        00:00:00 [nagios] <defunct>
nagios   25630 10892  0 14:03 ?        00:00:00 [nagios] <defunct>
nagios   25639 10892  0 14:03 ?        00:00:00 [nagios] <defunct>
nagios   25642 10892  0 14:03 ?        00:00:00 [nagios] <defunct>
nagios   25646 10892  0 14:03 ?        00:00:00 [nagios] <defunct>
nagios   25648 10892  0 14:03 ?        00:00:00 [nagios] <defunct>
nagios   25654 10892  0 14:03 ?        00:00:00 [nagios] <defunct>
nagios   25657 10892  0 14:03 ?        00:00:00 [nagios] <defunct>
nagios   25658 10892  0 14:03 ?        00:00:00 [nagios] <defunct>
nagios   25665 10892  0 14:03 ?        00:00:00 [nagios] <defunct>
mail     25681  1313  0 14:04 ?        00:00:00 /usr/lib/nullmailer/smtp -s srv72.sbah.local
root     25682 10097  0 14:04 pts/0    00:00:00 ps -ef --cols=300
root     31787     2  0 13:17 ?        00:00:03 [kworker/0:1]
regards john
Nagios Core 3.5.1

Checkmk 1.2.4p5
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Need some help with an Snmp Entry.

Post by tgriep »

Is the issue you were having receiving the SNMP Traps on the Nagios server resolved?

The missing snmpd.conf file will not affect the Nagios server from receiving SNMP Traps from remote hosts.
Be sure to check out our Knowledgebase for helpful articles and solutions!
skyerjoe
Posts: 56
Joined: Thu Mar 22, 2012 2:57 am

Re: Need some help with an Snmp Entry.

Post by skyerjoe »

Hello tgriep

No not really by the way , i tried to setup a new nagios monitoring system but if i can find out whats going wrong i would love to know

regards john
Nagios Core 3.5.1

Checkmk 1.2.4p5
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Need some help with an Snmp Entry.

Post by dwhitfield »

@skyerjoe,

I want to clarify a few things.

You said you tried to set up a new Nagios. You also mention rebuilding Nagios. Are you building from source? I see in your signature you are running 3.5.1. If that is accurate, is there a reason you are building 3.5.1 instead of something newer?

You also mentioned upgrading your OS. On what OS are you currently running? You mention Ubuntu LTS, but there are currently three supported LTS versions.

Lastly, you say the issue remains. Do you mean that it remains on the new build or simply that you would like to figure out why it was not working before?

Thanks!
Last edited by dwhitfield on Mon Oct 10, 2016 4:07 pm, edited 1 time in total.
Reason: clarity around Ubuntu
Locked