ServiceNow monitor adapter


The monitor adapter for ServiceNow checks for messages in a specified account on a POP3 mail server. The account information is designated in the configuration node for the adapter in Grid Manager. This adapter does not support multiple configuration nodes; however, multiple adapters can be configured within Grid Manager, each with a unique configuration.

The ServiceNow application monitor adapter is a mail-based monitor, which checks for messages on a specified account on the POP3 mail server. Ensure that the email notifications are configured for appropriate events on the Service-now application. You configure an adapter in TrueSight Orchestration Grid Manager. The configuration provides information about how the adapter interacts with the Service-now application.

The form view provides an easy-to-use interface for configuring adapters. The form view prevents human errors that might occur as a result of copying the configuration XML from the adapter user documentation into the UI when configuring an adapter. You can switch to the XML view to configure those elements and attributes that are not available as fields or to configure all the elements and attributes by using XML only. However, after you switch to the XML view, and save the configuration in the XML from that view, you cannot use the form view for modifying the configuration.

The following video (9:20) describes how to configure the ServiceNow monitor adapter. 

icon-play.png https://www.youtube.com/watch?v=FBwILOKM4bA

To configure the monitor adapter

  1. Log on to the TrueSight Orchestration Grid Manager.
  2. To access the adapters page, click the Manage tab and then click the Adapters tab.
  3. In the Adapters in Repository list, select the bmc-adapter-service-now-monitor [conbaosnow:20.12.02.00] check box corresponding to the type of adapter to be added.
  4. Click Add to Grid to include the adapter in the Adapters on Grid list.
  5. Click Configure corresponding to the newly added adapter.
  6. On the Add an Adapter Configurationpage, perform the following sub-steps to configure the adapter by using the form view or skip to step 7 to configure the adapter by using the XML view:
    1. Enter a name for the adapter.
    2. Use ServiceNowMonitor as the actor adapter name, which is the default adapter name used by the processes in the AO-AD-ServiceNow module.
    3. Enter a description for the adapter.
    4. Under Properties, enter or select values for the configuration elements. Include all required elements indicated with an asterisk (*).
    5. (Optional) Click Switch to XML View and use the following steps to specify elements and attributes that are not in the form view.
  7. (Optional) Configure the adapter in the XML view by using the following sub-steps:

    Note

    Switching to the XML view to specify those elements and attributes not included in the form means that you cannot thereafter use the form for modifying that configuration.

    1. Enter a name and a description for the adapter.
    2. Click Switch to XML View.
    3. On the Warning message that appears, click Switch View.
    4. In the Properties text box, use XML format to enter the configuration elements and attributes, and then click OK.

      Note

      If the default value for an optional element is acceptable, omit the element. Do not include empty elements.

  8. On the Warning message that appears, click Save.

    The adapter configuration with settings is saved in the XML view permanently. The newly configured adapter is now listed in the Adapters on Grid list.

    The following table describes the adapter configuration elements and attributes for the monitor adapter for Service-now that you can specify by using the form view, XML view, or both. You cannot use the form view to configure elements and attributes that do not have an entry in the UI label column.

    The [confluence_table-plus] macro is a standalone macro and it cannot be used inline. Click on this message for details.

The XML template for the monitor adapter configuration is given in the following figures:

Sample XML template for configuring the monitor adapter with a plain password

<config>
 <target>pop3mailserver.com</target>
 <user-name>user.name</user-name>
 <password>password</password>
 <javamail-debug>false</javamail-debug>
 <email-address>user.name@xyz.com</email-address>
 <protocol>pop3</protocol>
 <refresh>5</refresh>
 <mail-timeout />
 <connection-timeout>60</connection-timeout>
 <disable-auth-login>false</disable-auth-login>
 <disable-auth-plain>false</disable-auth-plain>
 <delete-after-read>false</delete-after-read>
 <max-messages-per-connection>20000</max-messages-per-connection>
</config>

 Sample XML template for configuring the monitor adapter with an encrypted Base64 password

<config>
 <target>pop3mailserver.com</target>
 <user-name>user.name</user-name>
 <password encryption-type = "Base64">cGFzc3dvcmQ=</password>
 <javamail-debug>false</javamail-debug>
 <email-address>user.name@xyz.com</email-address>
 <protocol>pop3</protocol>
 <refresh>5</refresh>
 <mail-timeout />
 <connection-timeout>60</connection-timeout>
 <disable-auth-login>false</disable-auth-login>
 <disable-auth-plain>false</disable-auth-plain>
 <delete-after-read>false</delete-after-read>
 <max-messages-per-connection>20000</max-messages-per-connection>
</config>

A sample event generated by the monitor adapter for the TrueSight Orchestration adapter manager is given in the following figure:

Sample monitor adapter event

<email-message>
 <from>
   <email-address>demo-mail@service-now.com</email-address>
 </from>
 <sent-date>Wed May 26 17:59:18 UTC 2010</sent-date>
 <sent-epoch-milliseconds>1274896758000</sent-epoch-milliseconds>
 <reply-to>
   <email-address>demo-mail@service-now.com</email-address>
 </reply-to>
 <recipients>
   <email-address>user.name@xyz.com</email-address>
 </recipients>
 <subject>--The Change has been approved--</subject>
 <body>
   <bodypart>--This email contains the details for a change record created.--
Approval: Rejected
Approval history:
Created by: admin
Description:
Number: CHG0030820
Correlation ID: My30
Ref:MSG0006239
</bodypart>
 </body>
</email-message>

Enabling custom logging

To enable custom logging for the adapter, you must specify a log file name. You can also provide additional parameters for logging.

Note

You must be using TrueSight Orchestration version 8.1 or later to use the custom logging feature. These parameters will be ignored in earlier versions of TrueSight Orchestration Platform.

These parameters are available with supported adapter versions. See TrueSight Orchestration Content documentation for details.

  • Log File Name: Provide a name for the log file.
    This file will be stored in the AO_HOME/tomcat/logs directory. If Log File Max Backup Index value is greater than 0, the log file name is suffixed with the backup index. For example, if the parameter value is a.log, backup log files will have names, such as a.log.1, a.log.2.
  • Log File Size: Specify a size limit for the log file. 
    If the value specified for Log File Max Backup Index is greater than 0, when the specified size is reached, the current file is renamed with the suffix .1. Otherwise, the log file will be reset and over-written. The default value is 10MB. The available units are KiloBytes (KB), MegaBytes (MB) or GigaBytes (GB).
  • Log File Max Backup Index: Enter the maximum number of backup files allowed. The default value is 10.
  • Log File Append: Select this option to append new log information to the existing information in the file. If unselected, the file will be overwritten with new log information.
  • Log Level: Enter the logging level using one of the following choices:

    Logging level

    Description

    DEBUG

    The most detailed logging level; logs low-level messages, normal execution, recoverable erroneous conditions, and unrecoverable erroneous conditions

    INFO

    (default)

    Logs normal execution, recoverable erroneous conditions, and unrecoverable erroneous conditions

    WARN

    Logs recoverable erroneous conditions and unrecoverable erroneous conditions

    ERROR

    The least detailed logging level; logs only error conditions that are not usually recoverable

Encrypting an element's contents

You can add the attribute secure="true" to an XML adapter element XML view to ensure that the element's contents is encrypted when displayed.

Note

You must be using TrueSight Orchestration Platform version 8.1 or later to use this encryption attribute.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*