Hi Rahul,
You can query it from the options or get the instance name also
logInfo("http://"+instance.hostname);
logInfo(getOption("NmsServer_URL"));
Here are other options available;
- NmsServer_IntranetURL
- NmsServer_MirrorPageUrl
- NmsTracking_SecureServerUrl
- NmsTracking_ServerUrlList
i.e.