Hi!!
I would like to know what is the criteria for assigning the traps configured in Nagios XI to the host, I have read the documentation but I do not understand well if the IP address or the host name is used.
For example:
In the non-configured objects I receive the following Traps
10.206.10.12 SNMP Traps (see attached)
When using the Wizard, the Snmp Traps service is created in Host = 10.203.0.12 and IP = 10.203.0.12. What happens if I change the name of the Host to "Server_1" but I keep the IP address? Will the Traps continue arriving at the same Host?
Thanks
How are Traps assigned to hosts in Nagios?
How are Traps assigned to hosts in Nagios?
You do not have the required permissions to view the files attached to this post.
Re: How are Traps assigned to hosts in Nagios?
If the settings are default for the snmptt daemon, it should resolve the host name if the IP address is setup in DNS.
But, the default command that sends the trap to Nagios XI, it only passes the IP address.
To pass the Host Name to XI, you would have to edit the /etc/snmp/snmptt.conf file and change all of the EXEC lines from
to
Mainly change the $r to $A so it will pass the hostname and not the IP.
That will make the server receive names and not addresses.
And to answer your question, the trap will continue to come in as an IP address so renaming the host probably will not work.
But, the default command that sends the trap to Nagios XI, it only passes the IP address.
To pass the Host Name to XI, you would have to edit the /etc/snmp/snmptt.conf file and change all of the EXEC lines from
Code: Select all
EXEC /usr/local/bin/snmptraphandling.py "$r" "SNMP Traps" "$s" "$@" "$-*" "Link down on interface $1. Admin state: $2. Operational state: $3"Code: Select all
EXEC /usr/local/bin/snmptraphandling.py "$A" "SNMP Traps" "$s" "$@" "$-*" "Link down on interface $1. Admin state: $2. Operational state: $3"That will make the server receive names and not addresses.
And to answer your question, the trap will continue to come in as an IP address so renaming the host probably will not work.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: How are Traps assigned to hosts in Nagios?
thanks for your answer, it is clear to me
-
kyang
Re: How are Traps assigned to hosts in Nagios?
@evisus Great! Did you have any more questions or are we okay to close this thread?
Re: How are Traps assigned to hosts in Nagios?
I'm fine, thank you, you can close this thread
-
kyang
Re: How are Traps assigned to hosts in Nagios?
Sounds good! I'll be closing this thread!
If you have any more questions, feel free to create another thread.
Thanks for using the Nagios Support Forum!
If you have any more questions, feel free to create another thread.
Thanks for using the Nagios Support Forum!