added const qualifier to be available even when MonitoringServerInfo instance is const.
replaced the direct use of MonitoringServerInfo::hostName with the getHostAddress() that provides the appropriate address or name depending on the situation.