This documentation supports releases of BMC Helix Continuous Optimization up to December 31, 2021. To view the latest version, select the version from the Product version menu.

Moviri - ServiceNow Extractor

“Moviri Integrator for BMC Helix Continuous Optimization – ServiceNow” is an additional component of the BMC Helix Continuous Optimization product. It allows to extract data from ServiceNow CMDB. The integration supports the extraction of both configuration metrics (based on ServiceNow fields) and relationships (based on ServiceNow topology).

The documentation is targeted at BMC Helix Continuous Optimization administrators, in charge of configuring and monitoring the integration between BMC Helix Continuous Optimization and ServiceNow CMDB.

Moviri Integrator for BMC Helix Continuous Optimization - ServiceNow is compatible with BMC Helix Continuous Optimization 19.11 and onward.

Collecting data by using the ServiceNow

To collect data by using the ServiceNow ETL, do the following tasks:

I. ServiceNow Prerequisites.

II. ServiceNow Configuration JSON File

III. Configure ServiceNow ETL.

Step I. ServiceNow Prerequisites

StepDetails

Check that the ServiceNow version is supported


  1. ServiceNow CMDB
  2. Table API version v.2
Grant the correct privileges in ServiceNow


  • Valid credentials (username/password) to access ServiceNow Table API. The account needs the following privileges:
    • web_service_adminrest_api_explorer, or admin ServiceNow role
    • Access to the ServiceNow tables listed in the ETL configuration. In addition, the accounts must have access to the following tables
      • cmdb_rel_ci
      • instance

Please refer to the official ServiceNow documentation to properly configure the account and privileges.

Verify the connection between TSCO instance and ServiceNow API (proxy supported)

To verify if the listed requirements, please execute the following command from the ETL Engine Server:

curl https://<servicenow-fqdn>/api/now/v2/table/instance -u <username>

The result of the command should have the following format:

{"result":[{"database_user":"","war_version":"","database_url":"","instance_name":"Source Instance","database_name":"","production":"true","validation_error":"","instance_url":"","sys_mod_count":"0","database_tablespace":"","source":"true","sys_updated_on":"2012-04-05 23:36:24","sys_tags":"","admin_password":"","database_password":"","database_type":"","sys_id":"f1fff5dc371120004f6a80f7bcbe5dca","instance_id":"source_instance","sys_updated_by":"admin","cluster_node":"","sys_created_on":"2012-04-05 23:36:24","sys_created_by":"admin","admin_user":"","primary":"true"}]}
Configure data extraction and hierarchy

A valid JSON file configuration, accessible by the ETL Engine running the “Moviri Integrator for BMC Helix Continuous Optimization – ServiceNow”. Please refer to "JSON File Configuration Format" section for more information about the JSON configuration file

Step II. ServiceNow Configuration Json File

JSON File Configuration Format

A. Decide What hierarchy you want to import and build in TSCO. Generally starts with Business Services → Business Application → Server Machines (Contains metrics).

B. Decide whether use the reference number for each nodes and their relationships or not. If you have two or more nodes belongs to the same ServiceNow table, it's highly recommended to use a reference number. So the relationship know which nodes it's referring to.

File Structure

The “Moviri Integrator for BMC Helix Continuous Optimization – ServiceNow” requires as input a JSON file following the JSON schema described in the following file (ServiceNow-schema.json).

The following table contains the description for each field (use “dot notation” to traverse element in the JSON schema):

Property

Description

Example

JSON Configuration File

configVersion

Version of the JSON file configuration

“1.0”

links

Array of “link” element, defining nodes and relationships

 

standaloneEntities

Array of “node” elements, identifying the list of entities that are not visited by any relationship. These nodes will appear under the domain configured in the ETL

 

"standaloneEntites": [{
"snowClassName": "cmdb_ci_win_server",
"snowFilter": "",
"tscoLookupField": "name",
"tscoNodeName": "name",
"tscoTypeName": "gen",
"tscoCatName": "SYS"
}
]

Link Element: define a set of hierarchies. You can have as many as links as necessary.

links.tscoRelType

Type of TSCO relationship

“contains”

links.nodes

Array of “node” elements identifying the levels that should be imported. The array must include a “root” and a “leaf” node

 

links.relationships

Array of “relationship” elements, identifying the connections that should be imported. It must include at least one element

 

Node Element: each nodes is a type of entity in TSCO.

node.type

The type of the node. This property accepts three possible values:

  • “root”: the node in the hierarchy that will be directly assigned to the target workspace domain in TSCO. Only 1 "root" node in each link.
  • “leaf”: the deepest node in the hierarchy. You can define 1 "leaf" node in each link
  • “inter”: intermediate node linking leaf node to root node. You can define as many "inter" node as necessary.

“root”

node.ref(Optional) If you use a reference number, then define ref on each nodes. Ref of each nodes within the same link should be unique"0001"

node.snowFilter

ServiceNow query that can be used to filter the type of node to be extracted from ServiceNow API

“parent.classification=Production^name=srv001”

node.snowClassName

ServiceNow class name that identifies the entity. It must be a valid ServiceNow table.

“cmdb_ci_server”

node.tscoLookupField

ServiceNow field (available in the snowClassName table) that will used as simple lookup value.

“name”

node.tscoNodeName

ServiceNow field (available in the snowClassName table) that will used as entity name

“name”

node.tscoTypeName

A valid TSCO entity type name

“gen”

node.tscoCatName

A valid TSCO entity category (“APP”, “SYS”, “WKLD”)

“SYS”

node.hidden(Optional) a hidden node will not be shown in TSCO hierarchy. Only "inter" node can be hidden. If not defining, default value is "no""yes"

node.metrics

Array of “metric” elements, identifying configuration metrics to be imported

 

node.tagType(Optional) Define the tag type for "inter" nodes' names above "leaf" as tag. For example, if tagType "Web_Server" is defined on nodes who are direct parent above leaf nodes, no matter the inter nodes is hidden or not, the inter node's name will be imported as tag with tag type "Web_Server"."Web_Server"

Metric Element: metrics imported from leaf nodes

metric.snowMetric

ServiceNow field (available in the snowClassName table) whose value will be imported in TSCO. Use “dot notation” to traverse fields represented as ServiceNow link

“ram”

manufacturer.name

metric.tscoMetric

A valid TSCO metric used to map the ServiceNow Field

“TOTAL_REAL_MEM”

“HW_VENDOR”

metric.scaleFactor

The scale factor to convert the ServiceNow field to the proper metric unit

1024

metric.tagType(Optional) If want to use this metric value as tag, define tagType here"OS_VER"
metric.useDisplayValue(Optional) If want to use this metric's display value, set it to true, default is falsetrue

Relationship Element: The 1-to-1 relationship between two nodes. The number of relationships are number of nodes -1.

relationship.snowRelType

ServiceNow relationship class type

“Depends On::Used by”

relationship.snowRelParType

ServiceNow class name that identifies the parent entity of the relationship. It must be a valid ServiceNow table. If use the reference number, then use corresponding node.ref as value

“cmdb_ci_service” / "0001"

relationship.snowRelChildType

ServiceNow class name that identifies the child entity of the relationship. It must be a valid ServiceNow table. If use the reference number, then use corresponding node.ref as value

“cmdb_ci_server” /"0002"

relationship.snowFilter

ServiceNow query that can be used to filter the list of relationships to be extracted from ServiceNow API

“parent.classification=Production^name=srv001”

Please refer to ServiceNow Administrator to create a proper JSON configuration file specific for your organization. ServiceNow provides useful tool to find all the required information to create the JSON configuration file, in particular:

  • ServiceNow REST API Explorer
  • (within the context of a Server or Business Service) Dependency View


Example I.

As example, you can refer to the following ServiceNow topology:

Please notice that this topology contains both Linux Servers (class “cmdb_ci_linux_server”, linked via Web Server, class “class_ci_web_server”) and Windows Servers (class “cmdb_ci_win_server”).

This topology can be represented by the following JSON configuration file (ServiceNow_Configuration_Example.json).

Considering the JSON configuration file described above, the “Moviri Integrator for BMC Helix Continuous Optimization – ServiceNow” will create the following hierarchy in the TSCO workspace:

Example II.

Considering the above example with modification: using reference number, have hidden node and use last inter node as leaf node's tag value. The configuration file will look like this example2Ref_hidden_tag.json

Note that in this case, the inter node above leaf node is defined to be "hidden", so they will be not imported as TSCO hierarchy. But since we defined tagType on the inter node above leaf node, even though the inter node is hidden, the name of the inter node still appears on leaf node as a tagType "WebServer"'s value. The hierarchy in TSCO will looks like this:

The leaf node will have a tagType called "WebServer" using the hidden inter node's name as values as PS_Apache01, PS_Apache02 or PS_Apache03.

Example III.

As example, you can refer to the following dependency views from ServiceNow:


These topologies can be represented by the following JSON configuration file (ServiceNow_Configuration_Example_1.json). They both starts with root (cmdb_ci_service) and goes to inter (cmdb_ci_service) and reaches to leaf (cmdb_ci_server).

Considering the JSON configuration file described above, the “Moviri Integrator for BMC Helix Continuous Optimization – ServiceNow” will create the following hierarchy in the TSCO workspace:


Step III. Configure the ETL

A. Configuring the basic properties

Some of the basic properties display default values. You can modify these values if required.

To configure the basic properties:

  1. In the console, navigate to Administration ETL & System Tasks, and select ETL tasks.
  2. On the ETL tasks page, click Add > Add ETL. The Add ETL page displays the configuration properties. You must configure properties in the following tabs: Run configuration, Entity catalog, and Amazon Web Services Connection

  3. On the Run Configuration tab, select Moviri - ServiceNow Extractor from the ETL Module list. The name of the ETL is displayed in the ETL task name field. You can edit this field to customize the name.



  4. Click the Entity catalog tab, and select one of the following options:
    • Shared Entity Catalog:

      • From the Sharing with Entity Catalog list, select the entity catalog name that is shared between ETLs.
    • Private Entity Catalog: Select if this is the only ETL that extracts data from the ServiceNow resources.
    1. Click the ServiceNow - Connection Parameters tab, and configure the following properties:

      Property Name

      Value Type

      Required

      Default

      Description

      ServiceNow API URL

      String

      Yes

       

      ServiceNow API URL, with the format http(s)://<servicenow>:<port>

      ServiceNow API username

      String

      Yes

       

      User used to access ServiceNow API

      ServiceNow API password

      String

      Yes

       

      Password for the user used to access ServiceNow API

      Semi-colon separated list of HTTP Headers (<header>:"<value>")StringNo
      Extra Http Header key-valye pair used for accessing ServiceNow API

      Use HTTP Proxy?

      String

      Yes

      No

      Select ‘yes’ if an HTTP proxy is required to connect to ServiceNow API

      Proxy Host

      String

       

       

      Proxy FQDN or IP Address

      Proxy Port

      String

       

       

      Proxy server port

      Proxy Username

      String

       

       

      Proxy server username

      Proxy Password

      String

       

       

      Proxy server password

6. Click the ServiceNow - Extraction tab, and configure the following properties:

Property Name

Value Type

Required

Default

Description

Use Reference Number in json ConfigurationBooleanYes
If uses Reference number. If "yes", "node.Ref" has to be defined configuration Json file, and relationship.snowRelParType and relationship.snowRelChiType needs to use the reference number refer to the corresponding nodes.

JSON file configuration full path

String

 Yes

 

Absolute path to the JSON configuration file accessible by the ETL engine

Enable Multiple Lookup FieldsStringYes
If uses multiple lookup. "Yes" for using multiple look up, "No" for default look up.
The following image shows sample configuration values for the basic properties.


7. (Optional) Override the default values of properties in the following tabs:

PropertyDescription
Module selection

Select one of the following options:

  • Based on datasource: This is the default selection.
  • Based on Open ETL template: Select only if you want to collect data that is not supported by

    Error rendering macro 'Include+'

    The 'Include+' macro can only be used in spaces managed by Scroll Versions / Scroll Translations.

    All 'Include+' and 'Excerpt Include+' macros must be converted to normal 'Include Page' and 'Excerpt Include' macros in such spaces.

    Please use the macro conversion tool to detect and fix similar issues in this space or ask a space administrator to do so.

    .
Module descriptionA short description of the ETL module.
Execute in simulation modeBy default, the ETL execution in simulation mode is selected to validate connectivity with the data source, and to ensure that the ETL does not have any configuration issues. In the simulation mode, the ETL does not load data into the database. This option is useful when you want to test a new ETL task. To run the ETL in the production mode, select No.
BMC recommends that you run the ETL in the simulation mode after ETL configuration and then run it in the production mode.
PropertyDescription
Associate new entities to

Specify the domain to which you want to add the entities created by the ETL.

Select one of the following options:

  • Existing domain: This option is selected by default. Select an existing domain from the Domain list. If the selected domain is already used by other hierarchy rules, select one of the following Domain conflict options:
    • Enrich domain tree: Select to create a new independent hierarchy rule for adding a new set of entities, relations, or both that are not defined by other ETLs.
    • ETL Migration: Select if the new ETL uses the same set of entities, relations, or both that are already defined by other ETLs.
  • New domain: Select a parent domain, and specify a name for your new domain.

By default, a new domain with the same ETL name is created for each ETL. When the ETL is created, a new hierarchy rule with the same name of the ETL task is automatically created in the active state. If you specify a different domain for the ETL, the hierarchy rule is updated automatically.

PropertyDescription
Task groupSelect a task group to classify the ETL.
Running on schedulerSelect one of the following schedulers for running the ETL:
  • Primary Scheduler: Runs on the Application Server.
  • Generic Scheduler: Runs on a separate computer.
  • Remote: Runs on remote computers.
Maximum execution time before warningIndicates the number of hours, minutes, or days for which the ETL must run before generating warnings or alerts, if any.
Frequency

Select one of the following frequencies to run the ETL:

  • Predefined: This is the default selection. Select a daily, weekly, or monthly frequency, and then select a time to start the ETL run accordingly.
  • Custom: Specify a custom frequency, select an appropriate unit of time, and then specify a day and a time to start the ETL run.
8. Click Save.
The ETL tasks page shows the details of the newly configured ServiceNow ETL.

(Optional) B. Configuring the advanced properties

You can configure the advanced properties to change the way the ETL works or to collect additional metrics.

To configure the advanced properties:

  1. On the Add ETL page, click Advanced.
  2. Configure the following properties:

    PropertyDescription
    Run configuration nameSpecify the name that you want to assign to this ETL task configuration. The default configuration name is displayed. You can use this name to differentiate between the run configuration settings of ETL tasks.
    Deploy statusSelect the deploy status for the ETL task. For example, you can initially select Test and change it to Production after verifying that the ETL run results are as expected.
    Log levelSpecify the level of details that you want to include in the ETL log file. Select one of the following options:
    • 1 - Light: Select to add the bare minimum activity logs to the log file.
    • 5 - Medium: Select to add the medium-detailed activity logs to the log file.
    • 10 - Verbose: Select to add detailed activity logs to the log file.

    Use log level 5 as a general practice. You can select log level 10 for debugging and troubleshooting purposes.

    Datasets

    Specify the datasets that you want to add to the ETL run configuration. The ETL collects data of metrics that are associated with these datasets.

    1. Click Edit.
    2. Select one (click) or more (shift+click) datasets from the Available datasets list and click >> to move them to the Selected datasets list.
    3. Click Apply.

    The ETL collects data of metrics associated with the datasets that are available in the Selected datasets list.

    PropertyDescription
    Metric profile selection

    Select the metric profile that the ETL must use. The ETL collects data for the group of metrics that is defined by the selected metric profile.

    • Use Global metric profile: This is selected by default. All the out-of-the-box ETLs use this profile.
    • Select a custom metric profile: Select the custom profile that you want to use from the Custom metric profile list. This list displays all the custom profiles that you have created.

    For more information about metric profiles, see Adding and managing metric profiles.
    Levels up to

    Specify the metric level that defines the number of metrics that can be imported into the database. The load on the database increases or decreases depending on the selected metric level.

    To learn more about metric levels, see Aging Class mapping.

    To learn more about metric levels, see Aging class mapping Open link .

    PropertyDescription
    Empty dataset behaviorSpecify the action for the loader if it encounters an empty dataset:
    • Warn: Generate a warning about loading an empty dataset.
    • Ignore: Ignore the empty dataset and continue parsing.
    ETL log file nameThe name of the file that contains the ETL run log. The default value is: %BASE/log/%AYEAR%AMONTH%ADAY%AHOUR%MINUTE%TASKID
    Maximum number of rows for CSV outputA numeric value to limit the size of the output files.
    CSV loader output file nameThe name of the file that is generated by the CSV loader. The default value is: %BASE/output/%DSNAME%AYEAR%AMONTH%ADAY%AHOUR%ZPROG%DSID%TASKID

    BMC Helix Continuous Optimization loader output file name

    The name of the file that is generated by the BMC Helix Continuous Optimization loader. The default value is: %BASE/output/%DSNAME%AYEAR%AMONTH%ADAY%AHOUR%ZPROG%DSID%TASKID

    Detail mode
    Specify whether you want to collect raw data in addition to the standard data. Select one of the following options:
    • Standard: Data will be stored in the database in different tables at the following time granularities: Detail (configurable, by default: 5 minutes), Hourly, Daily, and Monthly.
    • Raw also: Data will be stored in the database in different tables at the following time granularities: Raw (as available from the original data source), Detail (configurable, by default: 5 minutes), Hourly, Daily, and Monthly.
    • Raw only: Data will be stored in the database in a table only at Raw granularity (as available from the original data source).
    For more information, see Accessing data using public views and Sizing and scalability considerations.

    For more information, see Accessing data using public views Open link and Sizing and scalability considerations. Open link

    Remove domain suffix from datasource name (Only for systems) Select True to remove the domain from the data source name. For example, server.domain.com will be saved as server. The default selection is False.
    Leave domain suffix to system name (Only for systems)Select True to keep the domain in the system name. For example: server.domain.com will be saved as is. The default selection is False.
    Update grouping object definition (Only for systems)Select True if you want the ETL to update the grouping object definition for a metric that is loaded by the ETL. The default selection is False.
    Skip entity creation (Only for ETL tasks sharing lookup with other tasks)

    Select True if you do not want this ETL to create an entity and discard data from its data source for entities not found in BMC Helix Continuous Optimization. It uses one of the other ETLs that share a lookup to create a new entity. The default selection is False.

    PropertyDescription
    Hour maskSpecify a value to run the task only during particular hours within a day. For example, 0 – 23 or 1, 3, 5 – 12.
    Day of week maskSelect the days so that the task can be run only on the selected days of the week. To avoid setting this filter, do not select any option for this field.
    Day of month maskSpecify a value to run the task only on the selected days of a month. For example, 5, 9, 18, 27 – 31.
    Apply mask validationSelect False to temporarily turn off the mask validation without removing any values. The default selection is True.
    Execute after timeSpecify a value in the hours:minutes format (for example, 05:00 or 16:00) to wait before the task is run. The task run begins only after the specified time is elapsed.
    EnqueueableSpecify whether you want to ignore the next run command or run it after the current task. Select one of the following options:
    • False: Ignores the next run command when a particular task is already running. This is the default selection.
    • True: Starts the next run command immediately after the current running task is completed.

  3. Click Save.
    The ETL tasks page shows the details of the newly configured ServiceNow ETL.
Step IV. Run the ETL

After you configure the ETL, you can run it to collect data. You can run the ETL in the following modes:

A. Simulation mode: Only validates connection to the data source, does not collect data. Use this mode when you want to run the ETL for the first time or after you make any changes to the ETL configuration.

B. Production mode: Collects data from the data source.

A. Running the ETL in the simulation mode

To run the ETL in the simulation mode:

  1. In the console, navigate to Administration ETL & System Tasks, and select ETL tasks.
  2. On the ETL tasks page, click the ETL. The ETL details are displayed.



  3. In the Run configurations table, click Edit  to modify the ETL configuration settings.
  4. On the Run configuration tab, ensure that the Execute in simulation mode option is set to Yes, and click Save.
  5. Click Run active configuration. A confirmation message about the ETL run job submission is displayed.
  6. On the ETL tasks page, check the ETL run status in the Last exit column.
    OK Indicates that the ETL ran without any error. You are ready to run the ETL in the production mode.
  7.  If the ETL run status is Warning, Error, or Failed:
    1. On the ETL tasks page, click  in the last column of the ETL name row.
    2. Check the log and reconfigure the ETL if required.
    3. Run the ETL again.
    4. Repeat these steps until the ETL run status changes to OK.

B. Running the ETL in the production mode

You can run the ETL manually when required or schedule it to run at a specified time.

Running the ETL manually

  1. On the ETL tasks page, click the ETL. The ETL details are displayed.
  2. In the Run configurations table, click Edit  to modify the ETL configuration settings. The Edit run configuration page is displayed.
  3. On the Run configuration tab, select No for the Execute in simulation mode option, and click Save.
  4. To run the ETL immediately, click Run active configuration. A confirmation message about the ETL run job submission is displayed.
    When the ETL is run, it collects data from the source and transfers it to the database.

Scheduling the ETL run

By default, the ETL is scheduled to run daily. You can customize this schedule by changing the frequency and period of running the ETL.

To configure the ETL run schedule:

  1. On the ETL tasks page, click the ETL, and click Edit. The ETL details are displayed.

  2. On the Edit task page, do the following, and click Save:

    • Specify a unique name and description for the ETL task.
    • In the Maximum execution time before warning field, specify the duration for which the ETL must run before generating warnings or alerts, if any.
    • Select a predefined or custom frequency for starting the ETL run. The default selection is Predefined.
    • Select the task group and the scheduler to which you want to assign the ETL task.
  3. Click Schedule. A message confirming the scheduling job submission is displayed.
    When the ETL runs as scheduled, it collects data from the source and transfers it to the database.

Step V. Verify data collection

Verify that the ETL ran successfully and check whether the ServiceNow data is refreshed in the Workspace.

To verify whether the ETL ran successfully:

  1. In the console, click Administration > ETL and System Tasks > ETL tasks.
  2. In the Last exec time column corresponding to the ETL name, verify that the current date and time are displayed.
To verify that the ServiceNow data is refreshed:

  1. In the console, click Workspace.
  2. Expand (Domain name) > Systems > ServiceNow> Instances.
  3. In the left pane, verify that the hierarchy displays the new and updated ServiceNow instances.
  4. Click a ServiceNow entity, and click the Metrics tab in the right pane.
  5. Check if the Last Activity column in the Configuration metrics and Performance metrics tables displays the current date.


ServiceNow Workspace EntityDetails

Entities

Entities are defined from Configuration Json file node ServiceNow tables

Hierarchy

Hierarchies are defined as Configuration Json file relationships entities

Configuration and Performance metrics

Metrics are defined as Configuration Json file metric entities

Lookup ConsiderationLookup values are defined in the Configuration Json file
TagsTags are defined in the Configuration Json file

Was this page helpful? Yes No Submitting... Thank you

Comments