Discovery schedule using the wrong mid servers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-11-2022 01:35 PM
I have a schedule for on prem servers that is canceling because it has gone past the max run time. In looking at the Discovery Status, Discovery is trying to use two mid servers that are not part of the cluster the schedule is pointing then to use, and those two servers are in a down state because they are in our Test instance. Why is Discovery not using the cluster and using other mids to complete the schedule?
- Labels:
-
Discovery
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-11-2022 02:22 PM
- On your discovery schedule, what is your MID Server selection method?
- Are your mid servers configured to support the Discovery application?
- Are they configured to support the IP addresses in question?
Here's a background script to experiment with the load balancer and see how the system views your MID configuration:
var host = 'hostname@example.com';
var application = 'Discovery';
var capability = 'ssh';
var midSel = new SNC.MidSelector();
var midIDs = midSel.select(application, [host], [{'capability':capability}]);
var mids = [];
for (var i = 0; i < midIDs.length; i++) {
var midGR = new GlideRecord('ecc_agent');
midGR.get(midIDs[i]);
mids.push(midGR.name);
}
mids.sort();
gs.print(mids.length + ' mids found:\n' + mids.join('\n'));
Tweak the first 3 lines to match your needs.
(IIRC, Discovery will ignore the capability, so you could probably pass null instead of that array, but it's not a bad idea to setup the capabilities properly anyway.)
Hope this helps,
- Tim.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-13-2022 11:20 AM
The schedule is configured to use a mid server cluster where both servers are up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-13-2022 12:20 PM
Ok, so, cluster.
This logic is implemented in Script Include, "ShazzamLaunch." Search for "midSelectSpecificCluster" and you'll find it.
A few things to try:
- Replicate fragments of this script in a background script and putter with it until it makes sense.
- Duplicate this script and edit it to reproduce the condition and add log messages to see what's going on. Consider modifying my debug script to use the same MIDSelector call you fine.
- Modify the original with log messages and revert back to the original when you're done.
This should give you a good idea what the logic is doing, and from there you can figure out what input is causing the problems.
Hope it helps. I can't take more time to look into it now, but I can help with what you find as you experiment.
- Tim.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-11-2022 08:34 PM
I am assuming schedules were exported and imported from lower to higher environment?
In schedule why do not you set one mid server and try running this.