Probe Parameters

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2018 12:38 PM
I have a CIM Probe that runs on a non-standard port 6989 vs 5989 or 5988. I can get it to work if I add the following probe parameter schema = HTTPS. This works fine as long as the other CIM Probes use 5989. However it breaks any probes that run on port 5988 due to the schema needing to be HTTP. A possibility is to set up a probe parameter named schema and instead of using a hard coded value like HTTPS use a value script and set its value based on the port it is using. Does anyone now how to retrieve the value of the port being used for the probe within a value script? In my case if the probe was running on port 5989 or 6989 I would want to return HTTPS if running on 5988 I would want HTTP.
something possibly like the following:
var schema="";
var port = probe.getParameter('port');
if (port == '5989' || port == '6989') {
schema= 'HTTPS';
} else {
schema="HTTP";
}
answer=schema;
Thanks for any help.
- Labels:
-
Discovery
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2018 10:58 PM
Hi ,
it should be something like
probe.getParameter("httpDomainPort");
To understand the usage completely.
I would recommend you to go through the below link it will definitely give u good idea
http://www.john-james-andersen.com/blog/service-now/javascriptprobe-and-mid-server-script-includes.html
Mark my ANSWER as CORRECT and HELPFU L if it helped.