Auto Cloud discovery schedule for Open stack<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Overview When discovering OpenStack private clouds, there are can be many OpenStack projects. OpenStack projects are equivalent of Service Accounts in ServiceNow discovery. While it can be done but sometimes there can be a huge number of projects and one can use auto-scheduler to set up discovery schedules for each of all projects discovered. This article describes how to set up schedules using auto-scheduler for OpenStack and parameters that can be used to customize schedules. Scheduling Service Account Discovery Service Accounts in ServiceNow represents projects in OpenStack. Service Accounts can be discovery by setting up a Serverless discovery schedule using the OpenStack - Discover Service Accounts pattern. Create a Serverless schedule and set up a corresponding Serverless Excution Pattern record as shown below. Serverless Schedule Example: 1. Create a Serverless schedule, 2. Add a corresponding Serverless Execution Patterns record with Use Extended Parameters checked and select the OpenStack - Discover Service Accounts pattern as Pattern. 3. Open the resulting record and add a manual entry needed by discovery. Make sure to use appropriate ids and the url for your own environment, the following example uses randomly generated id for demonstration purposes. { "tables": {}, "globalVariables": {}, "localVariables": { "cloud_account_id": "ce2d85f0-3534-4fe9-90a7-cabde85e0240", "cloud_cred_id": "0b6e32ed-5ca7-4d2b-8094-b74976efdcc2", "cloud_domain_id": "a8e66dfb-6fbc-43a4-942e-3614e81efe7c", "datacenter_url": "https://openstack.acme.com:13000", "cloud_datacenter_type": "cmdb_ci_openstack_datacenter" }} Once the schedule is run successfully, you will find the auto-generated Discovery schedules in the following format as their names. Auto - OpenStack - <Account name> - <Account id> Scheduling Parameters: The following system properties can be used to customize auto-scheduling of discovered OpenStack Service Accounts. *Mid Server selection parameters Property Name Type Default Value sn_itom_pattern.auto_openstack_create_schedule_enabled (To decide auto cloud discovery schedule create or not) Options: true and false Boolean true sn_itom_pattern.auto_openstack_schedule_batch_count (how many schedules to run in one batch) Example : 10 Integer 5 sn_itom_pattern.auto_openstack_schedule_batch_delay (keeps tracks of the time difference between two batches value contains in sec) Example : 600 (in seconds) Integer 300 *sn_itom_pattern.auto_openstack_mid_select_method_for_cloud Options are - auto_select, specific_cluster, specific_mid auto_select : select any active mid which capable of open stack discovery specific_cluster: use specified mid cluster specific_mid : use specified mid server example- specific_mid String auto_select *sn_itom_pattern.auto_openstack_mid_server_for_cloud (Name of the mid server to use for cloud discovery) Example: midserver1 (valid mid server name) String *sn_itom_pattern.auto_openstack_mid_cluster_for_cloud (Name of the mid cluster to use for cloud discovery) Example: midcluster1 (valid mid cluster name) String sn_itom_pattern.auto_openstack_max_runtime (Max run time of the schedule. Value is in hours) Example: 10 (Created discovery status should be cancelled after 10 hours if it has not yet completed) Integer 24 sn_itom_pattern.auto_openstack_runtype (Run type of schedule) options are: daily, weekly, monthly example : weekly String daily sn_itom_pattern.auto_openstack_runtime If this property is set then we can use the same or we can use our dynamic timing, which will be 5min after the system current timing. Values contains in HH:MM:SS format. Example - 10:11:12 (HH:MM:SS ) String sn_itom_pattern.auto_openstack_weekly_runon (week of the day of for schedule should be configured) Options are : 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday' and 'sunday' Example: sunday String monday sn_itom_pattern.auto_openstack_monthly_runon (day of the month schedule should be configured) Options are: Number between 1 and 31. Includes 1 and 31 value Example : 12 Integer 1