ServiceNow - Create Incident per Asset
  • 30 Oct 2024
  • 6 Minutes to read
  • Dark
    Light
  • PDF

ServiceNow - Create Incident per Asset

  • Dark
    Light
  • PDF

Article summary

ServiceNow - Create Incident per Asset creates an incident in ServiceNow for each entity that matches the parameters of the saved query supplied as a trigger (or from the entities selected in the asset table).

See Creating Enforcement Sets to learn more about adding Enforcement Actions to Enforcement Sets.

Note:

General Settings

  • Action name - The name of this Enforcement Action. The system sets a default name. You can change the name.
  • Configure Dynamic Values - Toggle on to enter a Dynamic Value statement. See Creating Enforcement Action Dynamic Value Statements to learn more about Dynamic Value statement syntax.

Use stored credentials from ServiceNow adapter - Select this option to use the ServiceNow connected adapter credentials.

When you select this option, the Select Adapter Connection drop-down is available, and you can choose which adapter connection to use for this Enforcement Action.

NOTE
To use this option, you must successfully configure a ServiceNow adapter connection.

Required Fields

These fields must be configured to run the Enforcement Set.

  • Incident short description - Specify the incident title.
  • Message severity (default: info) - Select the message severity: info, warning or error.
  • Compute Node - The Axonius node to use when connecting to the specified host. For more details, see Connecting Additional Axonius Nodes.

Additional Fields

These fields are optional.

Connection and Credentials

When Use stored credentials from the adapter is toggled off, some of the connection fields below are required to create the connection, while other fields are optional.

  • ServiceNow domain - URL for the ServiceNow admin panel.
  • User name and Password - To connect to ServiceNow, you will need to create a user with action privileges.
    • Client ID and Client Secret (optional) - The OAuth Client ID and Client Secret for OAuth access to ServiceNow. Refer to OAuth 2.0 with Inbound REST for full details on how to obtain the OAuth Token.
  • Refresh Token - When using the OAuth method of authentication, enter the value of the Refresh Token issued by a ServiceNow instance.
  • Apigee URL (optional) - The URL of the domain that the get request is sent to for acquiring APIgee token.
  • Resource Apigee (optional) - The resources you want the APIgee to access.
  • Verify SSL (optional) - Select whether to verify the SSL certificate of the server against the CA database inside of Axonius. For more details, see SSL Trust & CA Settings.
  • HTTPS Proxy (optional) - Connect the adapter to a proxy instead of directly connecting it to the domain.
  • Split by field values - Select a field to split assets by in the Assets table. Each incident will be split into multiple rows where each row lists a single field value - for example, a row with an incident per vulnerability per device.

  • Retry Count (default: 1) - If the action fails, Axonius will retry to execute it this many times for each device.

  • Incident description and Map Axonius fields to fields in the description - These fields allow you to create custom incident descriptions.

    • In Incident description, enter a description template that includes field placeholders for field mapping. The placeholder is enclosed by double {{ }}.
    • Then, in Map Axonius fields to fields in the description, enter the field placeholder in Placeholder text fields on the left and select an Axonius field in Axonius fields on the right. The value of the Axonius field is populated into the description in place of the placeholder text.

    In the example below, the template in Incident description maps the fields selected under Axonius fields into the placeholders dev_hostname, dev_ip, and dev_serial. Each asset that matches the query parameters will have its data added to the incident description.

    ECDescriptionFieldMapping.png

  • Multiple optional incident related settings:

    1. Incident Type
    2. Caller ID
    3. Requested for
    4. Symptom
    5. Assignment group
    6. Category
    7. Subcategory
    NOTE
    Since the valid values of these parameters are customer specific, Axonius does not validate any of these parameter's values. You must make sure inserted values are correct, otherwise, the request might fail.
  • Additional fields - Specify additional fields to be added as part of the incident as key/value pairs in a JSON format.
    For example:

    {"field1": "value1", "field2": "value2"}.
    
    • If supplied, Axonius will add the specified fields and values to the created incident. If one of the specified fields is invalid, the request might fail.
  • Table name (default: incident) - Specify the ServiceNow table name in which the incident will be created.

    • If supplied, the incident will be created in the specified table name.
    • If not supplied, the incident will be created in the 'incident' table.
  • Link created task to another new table record - Link this new task to another table with the following parameters:

    • Name of table to populate into (default: sc_req_item)
    • Field to base a relation on (default: request)
    • JSON entry to send
  • Axonius to ServiceNow field mapping - Field mapping allows you to map Axonius fields to the CMDB fields. The input should be key/value pairs in a JSON format.
    For example:

    {"axonius_field1":"servicenow_field1", "axonius_field2":"servicenow_field2"}
    
  • Send CSV data (required, default: False)

    • If enabled, the created issue will include an attached CSV file with the query results.
    • If disabled, the created issue will not include an attached CSV file with the query results.

Additional CSV Settings

  1. Split by asset entities - Select to create a CSV file where each asset on a device is shown as a separate row. This separates each asset as the 'expand' option in the application. It separates each asset by its entity. For example, you will be able to know which values were fetched from each adapter connection.

    a. If supplied, each value on a device or user is shown as a separate row.
    b. If not supplied all values on a device are in the same cell on the CSV file.

  2. Export CSV delimiter to use for multi-value fields (default: Export CSV delimiter to use for multi-value fields field under the System Settings section in the GUI Settings) - Specify a delimiter to separate between values within the same field of an exported CSV file, otherwise the delimiter defined in Export CSV delimiter to use for multi-value fields is used.

  3. Maximum rows (default: 1048500) - Specify the maximum number of rows to be included in the CSV file. When you set a value here the generated CSV file will include the top x rows, based on the specified values. Otherwise, the generated CSV file will include the default maximum rows, set as 1048500.

  4. Include associated devices (only for Vulnerabilities and Software) - For Software and Vulnerabilities queries. Toggle on this option to include the associated devices with the preferred hostname as a predefined field for each software or vulnerability. When you create a CSV file with associated devices (for Vulnerabilities or Software), if the exported query results are larger than the value set under Maximum rows (or the default value of 1048500), an appropriate notice is displayed at the end of the CSV file.

  5. Device fields - This option is available for Software and Vulnerabilities. Select the device fields to add. By default Preferred Host Name is selected. Click add to select more fields. At least one field must be selected. Click the bin icon to remove a device field.



Was this article helpful?