Nagios core SNMP issue

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

Nagios core SNMP issue

Postby janaka_00930 » Sat Jul 17, 2021 11:31 pm

Hi all,

I configured new Nagios core system with version 4.4.6 & SNMP alarms is not pop up. This is a RHEL 8 server & following service are correctly running.
nagios.service
snmptt.service
snmptrapd.service

As per trace, SNMP trap received to Nagios system & not captured any logs.
Please assist to clear this issue.

Thank you,
Mahesh
janaka_00930
 
Posts: 4
Joined: Thu Jul 15, 2021 1:31 pm

Re: Nagios core SNMP issue

Postby gormank » Tue Jul 20, 2021 10:36 am

Assuming trap processing in core is the same as in NXI, snmptrapd listens for and receives traps, then hands them off to snmptt, which then gives them to Nagios. If Nagios doesn't find the host the trap should go to it puts it in the unconfigured objects.
I'd have a look at how snmptrapd is set up and it's logging config.
gormank
 
Posts: 882
Joined: Tue Dec 02, 2014 12:00 pm

Re: Nagios core SNMP issue

Postby janaka_00930 » Thu Jul 22, 2021 3:34 am

Hi,

Thank you for the feedback.

Below is the configuration which i applied to the system. Could you please check & let me know if it has any issues.

>>> snmptrapd configurations.

[root@nagios-live]# cat /etc/snmp/snmptrapd.conf
traphandle default /usr/sbin/snmptt
disableAuthorization yes
[root@nagios-live]#

>>> Log configurations

[root@nagios-live logrotate.d]# pwd
/etc/logrotate.d
[root@nagios-live logrotate.d]# cat snmptt
/var/log/snmptt/snmptt*.log /var/log/snmptt/snmptthandler.debug {
weekly
notifempty
missingok
}
/var/log/snmptt/snmptt.debug {
weekly
notifempty
missingok
postrotate
/etc/init.d/snmptt reload >/dev/null 2>/dev/null || true
endscript
}
[root@nagios-live-new logrotate.d]#

>>>Log files

[root@nagios-live snmptt]# pwd
/var/log/snmptt
[root@nagios-live snmptt]# ll
total 0
-rwxrwxrwx. 1 root root 0 Jun 19 23:25 snmptt.debug
-rwxrwxrwx. 1 root root 0 Jun 19 23:25 snmptt.log
[root@nagios-live-new snmptt]#

Thank you
janaka_00930
 
Posts: 4
Joined: Thu Jul 15, 2021 1:31 pm

Re: Nagios core SNMP issue

Postby gormank » Thu Jul 22, 2021 4:16 pm

I'm on RHEL 7 and using Nagios XI, so your config might be different...

I'd start with checking /var/log/snmptrapd.log.
Next look at /etc/sysconfig/snmptrapd
Here's one of mine:
# cat /etc/sysconfig/snmptrapd
# snmptrapd command line options
# '-f' is implicitly added by snmptrapd systemd unit file
# OPTIONS="-Lsd"
OPTIONS="-a -A -Lf /var/log/snmptrapd.log -p /var/run/snmptrapd.pid udp:162 udp6:162"

Once snmptrapd and snmptt are set up and running by default, you need to add MIBs, probably in /usr/share/snmp/mibs/ and add the MIB info to snmptt.conf. This can be done with addmib.

Have a look at /etc/snmp/snmptt.ini and /etc/snmp/snmptt.conf

Here are some KB articles for checking the SNMP setup
https://support.nagios.com/kb/article.php?id=88
gormank
 
Posts: 882
Joined: Tue Dec 02, 2014 12:00 pm

Re: Nagios core SNMP issue

Postby janaka_00930 » Tue Jul 27, 2021 11:47 am

I checked the configurations with your guidance & but issue is still their.
I need to know one more thing. I installed the MIB files in /usr/share/snmp/mibs/ after compiling original MIB file. Is it correct?
Also i didn't keep original MIB file in the server. Is it correct?
Also I run internally snmptraphandeling.py script from Nagios server, alarm is correctly generated in Nagios GUI.
janaka_00930
 
Posts: 4
Joined: Thu Jul 15, 2021 1:31 pm

Re: Nagios core SNMP issue

Postby janaka_00930 » Thu Jul 29, 2021 11:28 am

Dear All,
Appreciate your support to check my issue in Nagios core system.

Thank you
Mahesh
janaka_00930
 
Posts: 4
Joined: Thu Jul 15, 2021 1:31 pm


Return to Community Support

Who is online

Users browsing this forum: Google [Bot] and 28 guests