Librenms autodiscovery currently does not work because of a logic error.
$ip will be an IP address if $dst_host is a valid hostname, but if discovery_by_ip is false then we exit without running discovery (even with a valid hostname in dst_host).
Fix librenms auto-discovery
Auto-Deploy finished, Test PR at http://2457.ci.librenms.org or https://2457.ci.librenms.org
We fixed this in another way last night (someone tested the patch) but it's not merged. Here is what we did:
What does everyone think of the best way to resolve this?
That should work, as long as the result from gethostbyname is still being checked somewhere. According to http://php.net/manual/en/function.gethostbyname.php , gethostbyname will return the input string in the case of a failure.
Thanks @ekoyle. We will go with yours.
Happy to accept this fix, for future PRs can you sign the contributors agreement though: http://docs.librenms.org/General/Contributing/