Populate the Hostname in Events

Map target IPs to hostnames via a Redis key so ServiceNow events show the hostname.

1 min read Updated SS

To populate the hostname in events, follow the below steps:

  1. Copy and paste the latest UTP build in the directory below (remove the old UTP from this location),

    <a1home>/Appsone_Service/a1eventhandler/plugins

  2. Login to the redis cluster with the master redis IP and port.

    Add the key by executing the below command,

    HSET /utp/plugin/host-address UTP_PLUGIN_HOST-ADDRESS ‘{“<TargetIP1>”: “<serverHostName1>”, “<TargetIP2>”:”<serverHostName2>”}’

    For Example:

    HSET /utp/plugin/host-address UTP_PLUGIN_HOST-ADDRESS ‘{“192.0.2.182”: “HQServer111”, “192.0.2.183”:”HQServer112″}’

    Here, find the details below:

    • 192.0.2.18 and 192.0.2.184 are the host addresses for which the hostname must be populated.

    • serverHostName is the hostname that should be populated in a ticket.

    • If the redis key doesn’t exist in the redis cluster, the Host Address will be added as the hostname.

  3. Edit the ServiceNow templates.

    1. Open all ServiceNow templates where it is getting mounted.
    2. Update the instance name attribute values as below.

      “u_affected_instance_name”: “${LatestEvents_HostName}”

    3. Update the description attribute values as below.

      “u_description”: “${LatestEvents},healPermalink:${HealPermalink}”

      This attribute update provides a link to access all the signal event details.

      Note: This attribute update is not mandatory (update the changes only if the signal event details are required).

    4. Ensure it is added to all ServiceNow templates

    5. Restart A1EventHandler.

    Note: To configure the Signal page link to use the HAProxy IP and port instead of the UI-service IP and port in the ServiceNow tool, update the healPermalink value in the plugin-details.json file, which is mounted in the A1EventHandler.nomad file.

    For Example:

    “healPermalink”:”https://<haproxy-ip>:<haproxy_datarcvr_port>/heal-ui- service/#/problem/detail/{Account_Identifier}?signalId={Signal_ID}”