Discovery Schedule Sequences
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-29-2012 09:17 AM
Specifying the timing of discovery schedules can be a lot easier if we set them up to run one after another. Here is a way to do that.
Discovery sequences are defined in a table with three columns consisting of a text name, an integer, and a reference to discovery schedule:
Name | Order | Discovery Schedule |
---|---|---|
Sequence for Datacenter A | 100 | Discover Schedule 01 |
Sequence for Datacenter A | 200 | Discover Schedule 02 |
Other parts of the enhancement are:
- Table to keep state of sequences under execution. Its columns are: Discovery Sequence (text), Order (integer), and Status (reference to discovery status)
- Scheduled job (custom script) to kick off the first schedule in a sequence, given the sequence name
- Business rules that fire when discovery schedule completes or is canceled and trigger the next schedule in the sequence
- Script include for detailed logic and shared code
- Modules in Discovery application to view and maintain the two new tables
If there is interest, I can post more info.
Note: This posting describes a solution to my earlier blog posting, How to schedule one discovery run after another discovery run?
- Labels:
-
Discovery
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-09-2012 05:57 AM
This is an excellent approach. If I was S/N, I'd buy it from you and make it part of my
next release!
Please post what you have, I'd like to give it a shot.
Thanks for sharing this haldroid!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2012 12:43 PM
Here are manual steps for setting up discovery sequences.
[*]Create tables Discovery Sequence [u_discovery_sequence] and Discovery Series [u_discovery_series] as shown in the attached screenshots. Modules (links to list view) for these tables can be placed under the Discovery application in the navigation bar when the tables are created.
[*]Create business rules "Discovery - Completed" and "Discovery - Canceled" as shown in the attached screenshots.
[*]Create script include MyDiscoSeq from the attached file MyDiscoSeq.js.
[*]Choose a name, e.g. "SEQ1", for your first discovery sequence. Create one record in the Discovery Sequence table for each discovery schedule you want to be in the sequence. Use same sequence name in each record and assign integer order values as desired. You can enter schedules for multiple sequences in this table as long as you use a unique name for each sequence.
[*]Create a scheduled job based on the screenshot "disco_seq_job.png". This is how the sequence will be initiated. You will need one scheduled job for each discovery sequence you create.
[*]The table Discovery Series is not normally modified manually. It is used to keep track of which schedule to run next in each sequence and can be viewed to follow execution of sequences in progress.
Notes:
[*]The Discovery - Succeeded business rule has a function "clearCxlJob" which is not used by discovery sequences. It clears the discovery schedule instance scheduled job after the scan has run to keep these stale records from accumulating in the Scheduled Jobs table. See Removing stale Cancel Discovery records from Scheduled Jobs.
[*]If you need to stop a running sequence, this is the one time when the Discovery Series table is modified manually. This is to keep the next schedule from running automatically when you cancel the schedule that is already running. Select the record that is currently Active for the discovery schedule to be stopped, and set its order value greater than any order value in the sequence. For example, if order values for schedules in SEQ1 are between 100 and 1500, set the order value for the active schedule in SEQ1 in the Discovery Series table to 99999. Then cancel the active discovery schedule.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2013 08:31 PM
Hi Haldroid
I tried this solution. The first discovery schedule kicks off just fine but the business rule is not getting triggered once the first discovery completes. I created the same business rule as mentioned in the screen shot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2013 04:55 AM
The "Discovery - Succeeded" rule is set to fire whenever the [discovery_status] table is updated. Without more info, I can only suggest generic debugging, such as 1) double-check the setup; and 2) add gs.log statements inside the business rule, immediately on entry, after step 1, etc.