This now does a dns lookup on hostnames only for an IP. It stores it as a varbinary(16) which is the correct way to store ipv4/ipv6 by all accounts. At present no mysql functions are used as they only exist in 5.6 and above so this is all done in php.
Added the lookup of IP if device hostname is a hostname
Added check for hostname
Dislike the modification to the devices-table's schema, it has always caused some problems. Isn't there a way around with using the devices_attribs? If not, never mind my comment
The biggest issue with devices_attribs is the column type, as we already know for the IP address tables having them as just varchars means we lose a lot of functionality in converting and searching so we really should be using the correct column type to store this information.
Updated for Scrut fix
Ok, I can live with devices then. Thanks for clarifying :)
Auto-Deploy finished, Test PR at http://2798.ci.librenms.org or https://2798.ci.librenms.org
heh needs another rebase. CI worked out well though! :)
Rebased (sql schema conflict)
Rebased again :)