Naming of auto configured Unconfigured Objects

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
nevillestyles
Posts: 19
Joined: Thu Aug 05, 2021 2:37 pm

Naming of auto configured Unconfigured Objects

Post 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
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Naming of auto configured Unconfigured Objects

Post 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
nevillestyles
Posts: 19
Joined: Thu Aug 05, 2021 2:37 pm

Re: Naming of auto configured Unconfigured Objects

Post 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
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Naming of auto configured Unconfigured Objects

Post 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
nevillestyles
Posts: 19
Joined: Thu Aug 05, 2021 2:37 pm

Re: Naming of auto configured Unconfigured Objects

Post by nevillestyles »

Thank you very much, that worked perfectly. I'm not sure how I missed that!
Locked