Hi guys,
Having issues trying to configure snmptraps.
I added with the wizard snmptraps for an existing host.
I followed the pdf configuring snmptt and all.
I send a test trap like:
snmptrap -v 1 -c public 10.0.0.1 .1.3.6.1.6.3 "" 0 0 coldStart.0
I received it in the logs of my nagios xi ok
==> snmptt/snmptt.log <==
Wed Aug 12 14:45:48 2015 .1.3.6.1.6.3.1.1.5.1 Critical "Status Events" name_of_host - Device reinitialized (coldStart)
How can i see if nagios is processing or seeing this?
Thanks!
SNMP Traps testing
Re: SNMP Traps testing
In the Nagios XI GUI, go to Admin > Unconfigured Objects.
The first time a trap is sent to the XI system, this is where they are located.
Then in this screen, you need to configure the trap which sets it up to be monitored. After that, you can see the traps on the Home > Service Details screen.
The first time a trap is sent to the XI system, this is where they are located.
Then in this screen, you need to configure the trap which sets it up to be monitored. After that, you can see the traps on the Home > Service Details screen.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
agustin.roca
- Posts: 39
- Joined: Tue Apr 28, 2015 10:28 am
Re: SNMP Traps testing
Hi tgriep!
Already checked and there are no unconfigured Objects. Perhaps someone cleaned it up? If it was cleaned, how can i generate it again?
Already checked and there are no unconfigured Objects. Perhaps someone cleaned it up? If it was cleaned, how can i generate it again?
Re: SNMP Traps testing
This is most likely related to the default snmptt entries (they get set when it gets installed) not being setup for Nagios.
Remove the coldStart, warmStart, and authenticationFailure traps from your /etc/snmp/snmptt.conf.
Then run this command (this will process the mibs and make them work with Nagios):
Then restart snmptt and try again:
Remove the coldStart, warmStart, and authenticationFailure traps from your /etc/snmp/snmptt.conf.
Then run this command (this will process the mibs and make them work with Nagios):
Code: Select all
addmib /usr/share/snmp/mibs/SNMPv2-MIB.txtCode: Select all
service snmptt restart-
agustin.roca
- Posts: 39
- Joined: Tue Apr 28, 2015 10:28 am
Re: SNMP Traps testing
Great!
I can see it now! thanks! Now i see that the hostname from the snmptra sent is different as the one i am monitoring. the one sent is short and the host created is the FQDN.
I see it now in the Unconfigured objects. WIll try to see how to send the fqdn nome in the test trap now! but i can see it working and the logs in nagios show it!
Thanks!
I can see it now! thanks! Now i see that the hostname from the snmptra sent is different as the one i am monitoring. the one sent is short and the host created is the FQDN.
I see it now in the Unconfigured objects. WIll try to see how to send the fqdn nome in the test trap now! but i can see it working and the logs in nagios show it!
Thanks!
Re: SNMP Traps testing
You might want to check to see if these setting in your /etc/snmp/snmptt.ini can be useful to you:
Code: Select all
# SNMPTRAPD passes the IP address of device sending the trap, and the IP address of the
# actual SNMP agent. These addresses could differ if the trap was sent on behalf of another
# device (relay, proxy etc).
# If DNS is enabled, the agent IP address is converted to a host name using a DNS lookup
# (which includes the local hosts file, depending on how the OS is configured). This name
# will be used for: NODES entry matches, hostname field in logged traps (file / database),
# and the $A variable. Host names on the NODES line will be resolved and the IP address
# will then be used for comparing.
# Set to 0 to disable DNS resolution
# Set to 1 to enable DNS resolution
dns_enable = 1
# Set to 0 to enable the use of FQDN (Fully Qualified Domain Names). If a host name is
# passed to SNMPTT that contains a domain name, it will not be altered in any way by
# SNMPTT. This also affects resolve_value_ip_addresses.
# Set to 1 to have SNMPTT strip the domain name from the host name passed to it. For
# example, server01.domain.com would be changed to server01
# Set to 2 to have SNMPTT strip the domain name from the host name passed to it
# based on the list of domains in strip_domain_list
strip_domain = 1-
agustin.roca
- Posts: 39
- Joined: Tue Apr 28, 2015 10:28 am
Re: SNMP Traps testing
Great! Thanks. That did it!
Re: SNMP Traps testing
Great, I'm glad that's working for you, is it ok if we mark this as resolved and lock the topic?