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
Nagios core SNMP issue
Re: Nagios core SNMP issue
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.
I'd have a look at how snmptrapd is set up and it's logging config.
-
- Posts: 6
- Joined: Thu Jul 15, 2021 1:31 pm
Re: Nagios core SNMP issue
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
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
Re: Nagios core SNMP issue
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
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
-
- Posts: 6
- Joined: Thu Jul 15, 2021 1:31 pm
Re: Nagios core SNMP issue
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.
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.
-
- Posts: 6
- Joined: Thu Jul 15, 2021 1:31 pm
Re: Nagios core SNMP issue
Dear All,
Appreciate your support to check my issue in Nagios core system.
Thank you
Mahesh
Appreciate your support to check my issue in Nagios core system.
Thank you
Mahesh