This support forum board is for support questions relating to
Nagios XI , our flagship commercial network monitoring solution.
nevillestyles
Posts: 19 Joined: Thu Aug 05, 2021 2:37 pm
Post
by nevillestyles » Thu Sep 23, 2021 10:58 am
Good afternoon,
We have enabled the Auto Configure settings for Unconfigured Objects:
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:
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
Post
by ssax » Fri Sep 24, 2021 11:44 am
It should do it by default, check this setting in
/etc/snmp/snmptt.ini :
Does nslookup work from the XI system that?
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
Post
by nevillestyles » Mon Sep 27, 2021 5:38 am
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
Post
by ssax » Mon Sep 27, 2021 4:41 pm
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:
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
Post
by nevillestyles » Tue Sep 28, 2021 10:08 am
Thank you very much, that worked perfectly. I'm not sure how I missed that!