{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":30145,"path":"it-operations-management/discovery-and-service-mapping-patterns/openstack-discovery.md","title":"OpenStack resource discovery","bundle":null,"doc_type":null,"release":"australia","body":"\n# OpenStack resource discovery\n\nThe ServiceNow Discovery application uses OpenStack resource discovery patterns to find OpenStack resources through REST API calls. Discovering some of these resources might require updating to the latest version of the Discovery and Service Mapping Patterns application from the ServiceNow Store.\n\nDiscovery uses OpenStack resource discovery patterns to run horizontal discovery.\n\nStarting with the Discovery and Service Mapping Patterns August 2024 store release, OpenStack resource discovery patterns support both private and public cloud discovery.\n\n## Request apps on the Store\n\nVisit the [ServiceNow Store](https://store.servicenow.com/sn_appstore_store.do#!/store/home) to view all the available apps, and for information about submitting requests to the store. For cumulative release notes information for all released apps, see the [ServiceNow Store version history release notes](https://www.servicenow.com/docs/r/store-release-notes/sn-store-release-notes.html).\n\n## Prerequisites\n\n-   **OpenStack requirements**\n    -   In the OpenStack Identity service catalog, find the access URL that is used as the OpenStack identity service endpoint. For example: https://&lt;openstack dns&gt;:&lt;port&gt;.\n    -   Configure an OpenStack user with permissions to generate a project scope token. Setting Domain ID, User Name, Project Name, and Password values is required for generating a token.\n-   **MID Server requirements**\n\n    Deploy and connect a dedicated MID Server for cloud discovery.\n\n    The dedicated MID Server must have access to OpenStack and an open port for each OpenStack service to be discovered.\n\n-   **Credentials**\n\n    On the ServiceNow AI Platform, create OpenStack credentials for the ServiceNow cloud service account. Enter the Domain ID, User Name, Project Name, and Password values you've configured in OpenStack requirements. For more information, see [Create and test your credentials](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-security/t_CreateCredential.md).\n\n-   **Service account**\n\n    On the ServiceNow AI Platform, configure a ServiceNow cloud service account using the created OpenStack credentials and the OpenStack datacenter details. In the **Account Id** field, provide the Project ID of the OpenStack Project to be discovered.\n\n-   **Create a discovery schedule**\n\n    For more information, see [Create an OpenStack Discovery schedule in Discovery Admin Workspace](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-operations-management/discovery/create-openstack-schedule-DAW.md).\n\n-   **Create an automatic discovery schedule for OpenStack service accounts—for private cloud only**\n\n    Create an automatic serverless discovery schedule for OpenStack service accounts using the OpenStack - Discover Service Accounts pattern. For more information, see the [Auto Cloud discovery schedule for Open stack \\[KB1638685\\]](https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1638685) article in the Now Support Knowledge Base.\n\n-   **\\(Optional\\) Populate Service Account and Logical Datacenter fields in cloud CIs**\n\n    Starting with Discovery and Service Mapping Patterns version 1.30.2, you can improve query performance by populating Service Account and Logical Datacenter fields directly in cloud CIs. For more information, see [Improved query performance with direct field population in CI tables]().\n\n\n## Data collected by Discovery during horizontal discovery\n\nDiscovery populates the data in the CMDB when running the OpenStack resource discovery patterns.\n\n<table id=\"table_bph_wsf_ccc\"><thead><tr><th>\n\nField\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nObject ID \\[object\\_id\\]\n\n</td><td>\n\nServer UUID.\n\n</td></tr><tr><td>\n\nName \\[name\\]\n\n</td><td>\n\nServer name.\n\n</td></tr><tr><td>\n\nStatus \\[status\\]\n\n</td><td>\n\nServer status.\n\n</td></tr><tr><td>\n\nDescription \\[short\\_description\\]\n\n</td><td>\n\n\\(Optional\\) Server description.\n\n</td></tr><tr><td>\n\nCPUs \\[cpus\\]\n\n</td><td>\n\nNumber of virtual CPUs \\(vCPUs\\) from the Flavor that the VM instance is provisioned with.\n\n</td></tr><tr><td>\n\nDisks \\[disks\\]\n\n</td><td>\n\nNumber of all managed volumes by Cinder that are returned from the VM instance.\n\n</td></tr><tr><td>\n\nDisks size \\(GB\\) \\[disk\\_size\\]\n\n</td><td>\n\nTotal amount of all managed volumes by Cinder that are used by the VM instance measured in gigabytes \\(GB\\).\n\n</td></tr><tr><td>\n\nMemory \\(MB\\) \\[memory\\]\n\n</td><td>\n\nThe **ram** value from the Flavor that the VM instance is provisioned with, measured in megabytes \\(MB\\).\n\n</td></tr><tr><td>\n\nNetwork adapters \\[nics\\]\n\n</td><td>\n\nNumber of unique interfaces configured in the VM instance.\n\n</td></tr><tr><td>\n\nState \\[state\\]\n\n</td><td>\n\nMapped status value returned for the VM instance. The OpenStack Server statuses and their related ServiceNow **State** values are:\n\n-   ACTIVE: on\n-   RESCUED: on\n-   PAUSED: paused\n-   SUSPENDED: off\n-   STOPPED: off\n-   SOFT\\_DELETED: terminated\n-   HARD\\_DELETED: terminated\n-   RESIZED: off\n-   ERROR: error\n-   INITIALIZED: starting\n\nFor any **status** value not listed, the default value is off.\n\n</td></tr></tbody>\n</table>|Field|Description|\n|-----|-----------|\n|Object ID \\[object\\_id\\]|Keypair UUID.|\n|Name \\[name\\]|Keypair name that is used to reference it.|\n|Finger print \\[finger\\_print\\]|Keypair fingerprint.|\n\n|Field|Description|\n|-----|-----------|\n|Object ID \\[object\\_id\\]|Load balancer ID.|\n|Name \\[name\\]|Human-readable resource name.|\n|Description \\[short\\_description\\]|\\(Optional\\) Human-readable resource description.|\n|Install Status \\[install\\_status\\]|Resource provisioning status.|\n|Operational Status \\[operational\\_status\\]|Resource operational status.|\n\n|Field|Description|\n|-----|-----------|\n|Object ID \\[object\\_id\\]|Listener ID.|\n|Name \\[name\\]|Human-readable name of the resource.|\n|Install Status \\[install\\_status\\]|Provisioning status of the resource.|\n|Listener Protocol \\[listener\\_protocol\\]|Protocol for the resource. One of HTTP, HTTPS, TCP, TERMINATED\\_HTTPS, or UDP.|\n|Listener Port \\[listener\\_port\\]|Protocol port number for the resource.|\n|Operational status \\[operational\\_status\\]|Resource operational status.|\n|Description \\[short\\_description\\]|\\(Optional\\) Human-readable resource description.|\n\n|Field|Description|\n|-----|-----------|\n|Object ID \\[object\\_id\\]|Pool ID.|\n|Name \\[name\\]|Human-readable resource name.|\n|Install Status \\[install\\_status\\]|Resource provisioning status.|\n|Operational Status \\[operational\\_status\\]|Resource operational status.|\n|Description \\[short\\_description\\]|\\(Optional\\) Human-readable resource description.|\n|Load Balancing Method \\[load\\_balancing\\_method\\]|Load balancing algorithm for the pool. One of these values: LEAST\\_CONNECTIONS, ROUND\\_ROBIN, SOURCE\\_IP, or SOURCE\\_IP\\_PORT.|\n\n|Field|Description|\n|-----|-----------|\n|Object ID \\[object\\_id\\]|Pool member ID.|\n|Name \\[name\\]|Human-readable resource name.|\n|Install Status \\[install\\_status\\]|Resource provisioning status.|\n|IP address \\[ip\\_address\\]|Back-end member server IP address.|\n\n|Field|Description|\n|-----|-----------|\n|Object ID \\[object\\_id\\]|Volume UUID.|\n|Name \\[name\\]|Volume name.|\n|Status \\[status\\]|Volume status.|\n|Description \\[short\\_description\\]|\\(Optional\\) Human-readable description.|\n|Storage type \\[storage\\_type\\]|Associated volume type.|\n\n|Field|Description|\n|-----|-----------|\n|Object ID \\[object\\_id\\]|Volume UUID.|\n|Name \\[name\\]|Volume name.|\n|Status \\[status\\]|Volume status.|\n|Description \\[short\\_description\\]|\\(Optional\\) Human-readable description.|\n\n|Field|Description|\n|-----|-----------|\n|Object ID \\[object\\_id\\]|User-defined image UUID.|\n|Name \\[name\\]|Image name. The value can be null \\(the JSON Null data type\\).|\n|Status \\[status\\]|Image status.|\n\n|Field|Description|\n|-----|-----------|\n|Object ID \\[object\\_id\\]|Network ID.|\n|Name \\[name\\]|Human-readable network name.|\n|Operational Status \\[operational\\_status\\]|Network status. Possible values: ACTIVE, DOWN, BUILD, or ERROR.|\n|Description \\[short\\_description\\]|\\(Optional\\) Human-readable description.|\n\n|Field|Description|\n|-----|-----------|\n|Object ID \\[object\\_id\\]|Subnet ID.|\n|Name \\[name\\]|Human-readable resource name.|\n|DHCP enabled \\[is\\_dhcp\\_enabled\\]|Whether DHCP is enabled or disabled for the subnet.|\n|Description \\[short\\_description\\]|\\(Optional\\) Human-readable description.|\n\n|Field|Description|\n|-----|-----------|\n|Object ID \\[object\\_id\\]|Security group ID.|\n|Name \\[name\\]|Human-readable resource name.|\n|Description \\[short\\_description\\]|\\(Optional\\) Human-readable description.|\n\n<table id=\"table_rrs_xsf_ccc\"><thead><tr><th>\n\nField\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nName \\[name\\]\n\n</td><td>\n\nThis field has the same value as the object\\_id field.\n\n</td></tr><tr><td>\n\nObject ID \\[object\\_id\\]\n\n</td><td>\n\nSecurity group rule ID.\n\n</td></tr><tr><td>\n\nDescription \\[short\\_description\\]\n\n</td><td>\n\n\\(Optional\\) Human-readable description.\n\n</td></tr><tr><td>\n\nEthertype \\[ethertype\\]\n\n</td><td>\n\nEthertype. Must be IPv4 or IPv6. Addresses represented in CIDR must match the ingress or egress rules.\n\n</td></tr><tr><td>\n\nPort range max \\[port\\_range\\_max\\]\n\n</td><td>\n\nThe last port of the range to which the rule applies. This value is the maximum port number in the range that is matched by the security group rule. -   If the protocol is TCP, UDP, DCCP, SCTP or UDP-Lite, this value must be greater than or equal to the port\\_range\\_min attribute value.\n-   If the protocol is ICMP, this value must be an ICMP code.\n\n</td></tr><tr><td>\n\nPort range min \\[port\\_range\\_min\\]\n\n</td><td>\n\nThe first port of the range to which the rule applies. This value is the minimum port number in the range that is matched by the security group rule.-   If the protocol is TCP, UDP, DCCP, SCTP or UDP-Lite, this value must be less than or equal to the port\\_range\\_max attribute value.\n-   If the protocol is ICMP, this value must be an ICMP type.\n\n</td></tr></tbody>\n</table><table id=\"table_i5t_xsf_ccc\"><thead><tr><th>\n\nField\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nObject ID \\[object\\_id\\]\n\n</td><td>\n\nDomain ID.\n\n</td></tr><tr><td>\n\nName \\[name\\]\n\n</td><td>\n\nDomain name.\n\n</td></tr><tr><td>\n\nDescription \\[short\\_description\\]\n\n</td><td>\n\n\\(Optional\\) Human-readable description.\n\n</td></tr><tr><td>\n\nEnabled \\[enabled\\]\n\n</td><td>\n\nDefines whether the domain is enabled or disabled.-   True - The domain is enabled.\n-   False - The domain is disabled.\n\n</td></tr></tbody>\n</table><table id=\"table_nv5_xsf_ccc\"><thead><tr><th>\n\nField\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nObject ID \\[object\\_id\\]\n\n</td><td>\n\nService ID.\n\n</td></tr><tr><td>\n\nName \\[name\\]\n\n</td><td>\n\nService name.\n\n</td></tr><tr><td>\n\nDescription \\[short\\_description\\]\n\n</td><td>\n\n\\(Optional\\) Human-readable description.\n\n</td></tr><tr><td>\n\nType \\[type\\]\n\n</td><td>\n\nService type. Describes the API implemented by the service. Possible values: Compute, ec2, identity, image, network, or volume.\n\n</td></tr><tr><td>\n\nCatalog enabled \\[enabled\\]\n\n</td><td>\n\nDefines whether the service and its endpoints appear in the service catalog.-   True - The service and its endpoints appear in the service catalog.\n-   False - The service and its endpoints do not appear in the service catalog.\n\n</td></tr></tbody>\n</table><table id=\"table_jzv_xsf_ccc\"><thead><tr><th>\n\nField\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nObject ID \\[object\\_id\\]\n\n</td><td>\n\nEndpoint ID.\n\n</td></tr><tr><td>\n\nName \\[name\\]\n\n</td><td>\n\nService name.\n\n</td></tr><tr><td>\n\nInterface \\[interface\\]\n\n</td><td>\n\nInterface type that describes the visibility of the endpoint. Possible values:-   Public - Visible by end users on a publicly available network interface.\n-   Internal - Visible by end users on an unmetered internal network interface.\n-   Admin - Visible by administrative users on a secure network interface.\n\n</td></tr><tr><td>\n\nCatalog enabled \\[enabled\\]\n\n</td><td>\n\nDefines whether the service and its endpoints appear in the service catalog.-   True - The service and its endpoints appear in the service catalog.\n-   False - The service and its endpoints do not appear in the service catalog.\n\n</td></tr></tbody>\n</table>|Field|Description|\n|-----|-----------|\n|Name \\[name\\]|The **name** field of OpenStack Flavor.|\n|Object ID \\[object\\_id\\]|The **id** field of OpenStack Flavor.|\n|vCPUs \\[vcpus\\]|The **vcpus** field of OpenStack Flavor.|\n|Memory MB \\[memory\\_mb\\]|The **ram** field of OpenStack Flavor.|\n|Local Storage GB \\[local\\_storage\\_gb\\]|The **disk** field of OpenStack Flavor.|\n\nThe discovered data includes the OpenStack Hypervisor View \\[cmdb\\_ci\\_openstack\\_hypervisor\\_view\\] table and its fields for private cloud only.\n\n|Field|Description|\n|-----|-----------|\n|Name \\[name\\]|Concatenated value of **hypervisor\\_type** and **hypervisor\\_hostname** fields. For example: QEMU@host.acmecorp.com.|\n|IP Address \\[ip\\_address\\]|The value of **host\\_ip** field.|\n|Hypervisor technology \\[hypervisor\\_technology\\]|The value of **hypervisor\\_type** field.|\n|Object ID \\[object\\_id\\]|The value of **id** field.|\n|State \\[state\\]|The value of **state** field.|\n|Version \\[version\\]|The value of **hypervisor\\_version** field.|\n\nThe Dependency Views map shows all discovered OpenStack resources in your organization that are available through REST API calls and the relationships between them.\n\n\\[Omitted image \"openstack-network-dependency.PNG\"\\] Alt text: CIs and connections on a Dependency Views map\n\n\\[Omitted image \"openstack-VM-dependency.PNG\"\\] Alt text: CIs and connections on a Dependency Views map\n\n## CI relationships\n\nThe relationships listed in the following table are created to support OpenStack resource discovery.\n\n|CI|Relationship|CI|\n|---|------------|---|\n|cmdb\\_ci\\_openstack\\_datacenter|Hosted on::Hosts|cmdb\\_ci\\_cloud\\_service\\_account|\n|cmdb\\_ci\\_cloud\\_openstack\\_service|Hosted on::Hosts|cmdb\\_ci\\_cloud\\_service\\_account|\n|cmdb\\_ci\\_cloud\\_openstack\\_endpoint|Use endpoint to::Use endpoint from|cmdb\\_ci\\_cloud\\_openstack\\_service|\n|cmdb\\_ci\\_cloud\\_openstack\\_endpoint|Hosted on::Hosts|cmdb\\_ci\\_openstack\\_datacenter|\n|cmdb\\_ci\\_cloud\\_openstack\\_domain|Owns::Owned by|cmdb\\_ci\\_cloud\\_service\\_account|\n|cmdb\\_ci\\_network|Hosted on::Hosts|cmdb\\_ci\\_openstack\\_datacenter|\n|cmdb\\_ci\\_network|Contains::Contained by|cmdb\\_ci\\_cloud\\_subnet|\n|cmdb\\_ci\\_compute\\_security\\_group|Hosted on::Hosts|cmdb\\_ci\\_openstack\\_datacenter|\n|cmdb\\_ci\\_compute\\_security\\_group|Contains::Contained by|cmdb\\_ci\\_compute\\_security\\_group\\_rule|\n|cmdb\\_ci\\_cloud\\_load\\_balancer|Hosted on::Hosts|cmdb\\_ci\\_openstack\\_datacenter|\n|cmdb\\_ci\\_cloud\\_load\\_balancer|Contains::Contained by|cmdb\\_ci\\_lb\\_listener|\n|cmdb\\_ci\\_lb\\_pool|Hosted on::Hosts|cmdb\\_ci\\_cloud\\_load\\_balancer|\n|cmdb\\_ci\\_lb\\_pool|Owns::Owned by|cmdb\\_ci\\_lb\\_pool\\_member|\n|cmdb\\_ci\\_storage\\_volume|Hosted on::Hosts|cmdb\\_ci\\_openstack\\_datacenter|\n|cmdb\\_ci\\_vm\\_instance|Uses::Used by|cmdb\\_ci\\_storage\\_volume|\n|cmdb\\_ci\\_storage\\_vol\\_snapshot|Hosted on::Hosts|cmdb\\_ci\\_openstack\\_datacenter|\n|cmdb\\_ci\\_storage\\_vol\\_snapshot|Provisioned from::Provisioned|cmdb\\_ci\\_storage\\_volume|\n|cmdb\\_ci\\_vm\\_instance|Hosted on::Hosts|cmdb\\_ci\\_openstack\\_datacenter|\n|cmdb\\_ci\\_cloud\\_key\\_pair|Hosted on::Hosts|cmdb\\_ci\\_openstack\\_datacenter|\n|cmdb\\_ci\\_os\\_template|Hosted on::Hosts|cmdb\\_ci\\_openstack\\_datacenter|\n|cmdb\\_ci\\_vm\\_instance|Provisioned from::Provisioned|cmdb\\_ci\\_os\\_template|\n|cmdb\\_ci\\_vm\\_instance|Virtualized by::Virtualizes|cmdb\\_ci\\_server|\n\nThe relationships listed in the following table are created to support OpenStack resource discovery in private cloud only.\n\n|CI|Relationship|CI|\n|---|------------|---|\n|cmdb\\_ci\\_vm\\_instance|Registered on::Has registered|cmdb\\_ci\\_openstack\\_hypervisor\\_view|\n|cmdb\\_ci\\_openstack\\_hypervisor\\_view|Hosted on::Hosts|cmdb\\_ci\\_openstack\\_datacenter|\n|cmdb\\_ci\\_openstack\\_hypervisor\\_view|Uses::Hosts Used by|cmdb\\_ci\\_server|\n\n**Parent Topic:**[Available cloud discovery patterns](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-operations-management/discovery-and-service-mapping-patterns/available-patterns-cloud.md)\n\n"}}