Populate the Hostname in Events
Map target IPs to hostnames via a Redis key so ServiceNow events show the hostname.
To populate the hostname in events, follow the below steps:
-
Copy and paste the latest UTP build in the directory below (remove the old UTP from this location),
<a1home>/Appsone_Service/a1eventhandler/plugins
-
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.
-
-
Edit the ServiceNow templates.
- Open all ServiceNow templates where it is getting mounted.
-
Update the instance name attribute values as below.
“u_affected_instance_name”: “${LatestEvents_HostName}”
-
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).
-
Ensure it is added to all ServiceNow templates
- 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}”