Page 1 of 1

Naming of auto configured Unconfigured Objects

Posted: Thu Sep 23, 2021 10:58 am
by nevillestyles
Good afternoon,

We have enabled the Auto Configure settings for Unconfigured Objects:

Image

We've done this so that new services are created should we receive SNMP traps from a new device, or if we receive an SNMP trap with a new service name (see https://support.nagios.com/forum/viewto ... 16&t=63240)

When a new service is created using this method, the name of the host it is associated with is set to its IP address:

Image

Is there a way to change the auto configuration of the Unconfigured Objects so that new hosts are created with their DNS names (or names resolved from the local hosts file)?

Regards,
Neville

Re: Naming of auto configured Unconfigured Objects

Posted: Fri Sep 24, 2021 11:44 am
by ssax
It should do it by default, check this setting in /etc/snmp/snmptt.ini:

Code: Select all

dns_enable = 1
Does nslookup work from the XI system that?

Code: Select all

nslookup 10.29.74.76
Please run this command as root and attach (or PM) the resulting /tmp/SNMPFILES.tar.gz file:

Code: Select all

tar czvf /tmp/SNMPFILES.tar.gz /etc/snmp

Re: Naming of auto configured Unconfigured Objects

Posted: Mon Sep 27, 2021 5:38 am
by nevillestyles
Thanks for the response.

I can confirm dns_enable is set to 1.

nslookup returns a result, plus the host is in /etc/hosts:

Code: Select all

$ nslookup 10.29.74.76
76.74.29.10.in-addr.arpa        name = pcen-td-01.<redacted>.

$ grep 10.29.74.76 /etc/hosts
10.29.74.76     pcen-TD-01
I'll PM you the file requested in the next few minutes.

Many thanks,
Neville

Re: Naming of auto configured Unconfigured Objects

Posted: Mon Sep 27, 2021 4:41 pm
by ssax
Looking at your traps defined in Admin > SNMP Trap Interface > Defined Traps I see most are using the Host Name settings of $aR which is:

Code: Select all

$aR, $ar - IP address
Edit one of the traps and change it to use $r for the Host Name settings, then send a test trap and see if it shows up in Admin > Unconfigured Objects with the DNS name now.

Taken from here:

http://www.snmptt.org/docs/snmptt.shtml ... ONF-FORMAT

Re: Naming of auto configured Unconfigured Objects

Posted: Tue Sep 28, 2021 10:08 am
by nevillestyles
Thank you very much, that worked perfectly. I'm not sure how I missed that!