Correct the IP check logic to check the right node

I had it checking the Nagios server's attributes before when I wanted
the search discovered node